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

Converting a pspice model to schematic/spectre (max, table etc)

$
0
0

Hello,

I would like to have this pspice circuit as a sub circuit in virtuoso:

.subckt ccm-dcm1 1 2 3 4 5 params: L=1 fs=1E6
Et 1 2 value={(1-v(u))*v(3,4)/v(u)}
Gd 4 3 value={(1-v(u))*i(Et)/v(u)}
Ga 0 a value={MAX(i(Et),0)}
Va a b
Rdummy b 0 10
Eu u 0 table {MAX(v(5), v(5)*v(5)/(v(5)*v(5)+2*L*fs*i(Va)/v(3,4)))} (0 0) (1 1)
.ends

This is what I put in the schematic editor:

And this is the netlist:

simulator lang=spectre
global 0
Ga (0 a) bsource v=MAX(i(Et),0)
Eu (u 0) bsource v=table MAX(v(5), \
v(5)*v(5)/(v(5)*v(5)+2*L*fs*i(Va)/v(3,4))) (0 0) (1 1)
Et (v1 v2) bsource v=(1-v(u))*v(3,4)/v(u)
Va (a b) vsource dc=0 type=dc
Rdummy (b 0) resistor r=10
Gd (v4 v3) bsource i=(1-v(u))*i(Et)/v(u) 
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
tnom=27 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" \
checklimitdest=psf
dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
dcOpInfo 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

Of course, the simulation fails and I think the main issue (up to this point) is the table:

ERROR (SFE-874): "input.scs" 13: Cannot run the simulation because syntax error `Unexpected open parenthesis "(". Expected equals' was encountered at line 13, column 28. Correct the syntax error and rerun the simulation.

How do I properly implement this?


Viewing all articles
Browse latest Browse all 4889

Trending Articles



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