Semiconductor Subcircuit generation from LTspice tool

2 views (last 30 days)
Good afternoon,
Trying to incorporate a semiconductor trough out the "ee.spice.semiconductorSubcircuit2lookup" funtion and by using the SPICEtool "LTspice" incorporated in Matlab2023a, the system is unable to find the simulator.
%% Generate lookup table data for three-terminal or 3-terminal devices from SPICE subcircuit
subcircuitFile = [matlabroot '\toolbox\physmod\elec\eedemos\applications\devicecharacteristics\ISC030N10NM6.lib'];
subcircuitName = "ISC030N10NM6_L1";
SPICEPath = "C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe";
SPICETool = "LTspice";
lookuptable = ...
ee.spice.semiconductorSubcircuit2lookup(SPICETool,subcircuitFile, ...
subcircuitName, 'SPICEPath', SPICEPath, 'terminals', [1,2,3], ...
'flagIdsVgs', 0, 'flagIdsVds', 1, 'T', 27);
The error is the following:
Error using ee.internal.spice.lookuptable.generateSemiconductorNetlist
Unable to find LTspice.
Error in ee.internal.spice.lookuptable.subcircuitGeneratelookup
Error in ee.internal.spice.lookuptable.semiconductorSubcircuit2lookup
Error in ee.spice.semiconductorSubcircuit2lookup
Is this a stable funtion to use with LTSpice or is it still ongoing?
Thank you in advance,
José Miguel.

Answers (1)

Keshav
Keshav on 28 Jul 2023
‘SPICETool’ is a name-value argument in the ‘ee.spice.semiconductorSubcircuit2lookup’ function. Therefore, in the function call, you need to provide the name before passing the value as 'LTspice'. You can look at the function call below for reference.
lookuptable = ...
ee.spice.semiconductorSubcircuit2lookup(subcircuitFile, ...
subcircuitName,'SPICETool',SPICETool, 'SPICEPath', SPICEPath, 'terminals', [1,2,3], ...
'flagIdsVgs', 0, 'flagIdsVds', 1, 'T', 27);
You can read more about this function in the below MathWorks documentation of ‘ee.spice.semiconductorSubcircuit2lookup’
  1 Comment
José Miguel Sanz Alcaine
José Miguel Sanz Alcaine on 12 Sep 2023
Hello, this worked and MATLAB got "busy" generating the different Temp files of .net and .log. However at some point, after few minutes, it fails giving the following warnings and errors:
Warning: .ac analysis fails. Use .tran to extract capacitance characteristics.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs-5.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs-4.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs-3.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs-2.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs-1.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs0.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs1.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs2.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs3.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs4.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs5.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs6.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs7.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs8.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs9.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs10.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs11.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs12.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs13.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs14.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs15.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs16.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs17.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs18.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs19.net
already exists.
Warning: Netlist
C:\Users\Miguel\AppData\Local\Temp\tp0a8614aa_4236_43db_a6d5_de346ec5b25a\ISC030N10NM6_L1_Capacitance_Vgs20.net
already exists.
Error using ee.internal.spice.runSIMetrix
Set the correct path of the SIMetrix executable.
Error in ee.internal.spice.runSIMetrix
Error in ee.internal.spice.lookuptable.subcircuitGeneratelookup/runSPICE
Error in ee.internal.spice.lookuptable.subcircuitGeneratelookup/getLookupTable
Error in ee.internal.spice.lookuptable.semiconductorSubcircuit2lookup
Error in ee.spice.semiconductorSubcircuit2lookup
Error in main (line 9)
ee.spice.semiconductorSubcircuit2lookup(subcircuitFile, ...
All these without me having any SImetrix sofware installed. My code is:
subcircuitFile = [matlabroot '\toolbox\physmod\elec\eedemos\applications\devicecharacteristics\ISC030N10NM6.lib'];
subcircuitName = "ISC030N10NM6_L1";
SPICEPath = "C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe";
SPICETool = 'LTspice';
lookuptable2 = ...
ee.spice.semiconductorSubcircuit2lookup(subcircuitFile, ...
subcircuitName,'SPICETool',SPICETool, 'SPICEPath', SPICEPath, 'terminals', [1,2,3], ...
'flagIdsVgs', 0, 'flagIdsVds', 1, 'T', 25);
and the .lib is attached. Any solution?
Thanks in advance,
José Miguel.

Sign in to comment.

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!