Quantcast
Channel: Cadence Custom IC Design Forum
Viewing all articles
Browse latest Browse all 4891

Simulation fails to start when using variable1=calcVal()+variable

$
0
0

In my explorer, I have an 'ac' testbench and an 'tran' testbench. I am using the ac simulation to quickly get the circuit bandwidth, and adjust the input frequency in the tran sim based on the ac simulation. But for a corner, I need to add or subtract a small constant (ac_temp_factor). Here are my expressions:


fsin=calcVal("bw3db_ac" "testLib:calcVal_TEST:ac" ?getFirstSweepPoint   t)+1.0*ac_temp_factor

ac_temp_factor=-1*(temp==-40)+1*(temp==125)  (set separately in the corners form)

However, I get an error at the start of the simulation:

----
Error found by spectre during circuit read-in.
    ERROR (SFE-874): "input.scs" 10: Cannot run the simulation because syntax error `Unexpected quoted string ""testLib:calcVal_TEST:ac". Expected close parenthesis' was encountered at line 10, column 28. Correct the syntax error and rerun the simulation.
    ERROR (SFE-683): "input.scs" 10: Badly formed parameters statement.

----

If I replace ac_temp_factor with constant, calcVal("bw3db_ac" "testLib:calcVal_TEST:ac" ?getFirstSweepPoint t)+1.0, the sim runs OK, but if I use the variable ac_temp_factor I get this error.

input.scs:

----

// Point Netlist Generated on: Mar  1 18:17:08 2023
// Generated for: spectre
// Design Netlist Generated on: Mar  1 17:45:47 2023
// Design library name: testLib
// Design cell name: calcVal_TEST
// Design view name: schematic
simulator lang=spectre
global 0
parameters ac_temp_factor=-1*(temp==-40)+1*(temp==125) \
    fsin=calcVal("bw3db_ac" "testLib:calcVal_TEST:ac" ?getFirstSweepPoint \
    t)+ac_temp_factor

include "netlist"
simulatorOptions options psfversion="1.4.0" reltol=1e-3 vabstol=1e-6 \
    iabstol=1e-12 temp=-40 tnom=25 scalem=1.0 scale=1.0 gmin=1e-12 \
    rforce=1 maxnotes=5 maxwarns=5 digits=5 cols=80 pivrel=1e-3 \
    sensfile="../psf/sens.output" dochecklimit=no checklimitdest=psf
tran tran stop=1u write="spectre.ic" writefinal="spectre.fc" \
    annotate=status maxiters=5
finalTimeOP info what=oppoint where=rawfile
modelParameter info what=models where=rawfile
element info what=inst where=rawfile
outputParameter info what=output where=rawfile
designParamVals info what=parameters where=rawfile
primitives info what=primitives where=rawfile
subckts info what=subckts where=rawfile
saveOptions options save=allpub

---

File netlist:

simulator lang=spectre

// Library name: evros_wl_tpc_sim
// Cell name: calcVal_TEST
// View name: schematic
R0 (IN OUT) resistor r=1e3
C0 (OUT 0) capacitor c=1e-9
V0 (IN 0) vsource dc=0 mag=1 type=sine ampl=1 freq=fsin

-----


Viewing all articles
Browse latest Browse all 4891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>