How can I find the source of an ssc_build() error when the stack trace doesn't list the offending file

1 view (last 30 days)
I'm running ssc_build() on a package directory that was produced from a manufacturer's unprotected .lib file via subcircuit2ssc(). After adding and configuring/connecting a component to overcome the unsupported SPICE command subcircuit2ssc() complained about, ssc_build() is now throwing an error about the parameter violation shown below (italicized for clarity). That's the whole stack trace. The volt_pulse_fcn file is protected, but the error message is clear enough.
Failed to generate 'DRV595DAP__TI_PWM_CTRLR_LIB'
Caused by:
Error using ee.additional.spice_sources.volt_pulse_fcn> (line 61)
['']: Total pulse width must be less than or equal to Pulse period, PER.
I ran a search on the entire package directory's contents and "ee.additional.spice_sources.volt_pulse_fcn" never shows up. "ee.additional.spice_sources.volt_pulse()" does show up in one (attached) file a few times. Searching for only "volt_pulse" gives the same results. In each instance, the pulse width (PW) value is significantly less (orders of magnitude) than the PER value.
If I remove various files from the package directory, ssc_build complains about missing dependencies (of course) but that's the only error. It's only once I put the attached file back into the package directory that ssc_build throws the error quoted above. That's not definitive, but a data point.
I'm not sure how to proceed without a thread to pull on.

Answers (1)

Joel Van Sickel
Joel Van Sickel on 13 Jun 2022
This one: V2 = ee.additional.spice_sources.volt_pulse(V1={-1e-3,'V'},V2={1e-3,'V'},TD={0,'s'},TR={500e-9,'s'},TF={500e-9,'s'}, ...
has .5us rise and fall time, which by itself adds up to the periof of 1e-6. With the PW of 1e-15, the pulse width is just a little bit larger than period. Try 495e-9 for rise and fall time.

Community Treasure Hunt

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

Start Hunting!

Translated by