<@U016EM8L91B> can i see an example of the problem...
# xyce
s
@User can i see an example of the problem 'parameters referencing other parameters defined on the same line' ? something like:
.param A=3 B=5 C=B+A
?
t
Yes. Mainly with AS, AD, PS, and PD being equations that reference W and NF. The example I was feeding to Xyce was just a standard output from xschem:
Copy code
XM10 out in VDD VDD sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=8 nf=2
+ ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)'
+ ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W'
+ sa=0 sb=0 sd=0 mult=1 m=1
and that was previously failing in Xyce, but now works correctly if you have the most recent version of Xyce compiled from git source.
e
@User Your example
.param A=3 B=5 C=B+A
has always worked in Xyce, as Xyce will parse that as being the equivalent as 3 separate
.param
statements. The use case we recently fixed had to do specifically with subcircuit parameter specified on an “X” line being allowed to refer to each other.
Xyce was treating “X” lines as the equivalent (for parsing purposes) of device instance lines. On device instances lines, parameters generally aren’t allowed to refer to each other. So for example,
m1 2 1 0 0 p1 L=0.35u W=2*L
wouldn’t work, and that is still the case. But “X” lines are a special case, so they are now treated differently.
s
@User @User Thanks for the explanation! will rebuild Xyce (hope my trilinos is still good 🙂 )
👍 1
t
@User: I was pleasantly surprised. I had built Xyce originally from the official distribution source. All I did was to pull the git repository and follow the same instructions I wrote for myself from compiling the original, and it all just worked.
👍 2