StefanSchippers / xschem

A schematic editor for VLSI/Asic/Analog custom designs, netlist backends for VHDL, Spice and Verilog. The tool is focused on hierarchy and parametric designs, to maximize circuit reuse.
Other
297 stars 21 forks source link

Feature with .model per instance doesn't work #190

Closed georgtree closed 3 months ago

georgtree commented 3 months ago

Hello! The worked previously feature to add individual to instance models doesn't work any more, for example:

name=X3 model=summer@name INOFFS0=0.0 INOFFS1=0.0 KIN0=1.0 KIN1=1.0 KOUT=1.0 OUTOFFS=0.0
device_model=".subckt summer@name in0 in1 out
.param INOFFS0=0.0 INOFFS1=0 
.param KIN0=1.0 KIN1=1.0
.param KOUT=1.0 OUTOFFS=0.0
A1 [in0 in1] out summer
.model summer summer in_offset=[{INOFFS0} {INOFFS1}] 
+ in_gain=[{KIN0} {KIN1}] 
+ out_gain={KOUT} out_offset={OUTOFFS}
.ends summer@name " 

generated netlist is:

X3 net2 net3 net4 summer@name INOFFS0=0.0 INOFFS1=0.0 KIN0=1.0 KIN1=1.0 KOUT=1.0 OUTOFFS=0.0
.subckt summerX3 in0 in1 out
.param INOFFS0=0.0 INOFFS1=0
.param KIN0=1.0 KIN1=1.0
.param KOUT=1.0 OUTOFFS=0.0
A1 [in0 in1] out summer
.model summer summer in_offset=[{INOFFS0} {INOFFS1}]
+ in_gain=[{KIN0} {KIN1}]
+ out_gain={KOUT} out_offset={OUTOFFS}
.ends summerX3
**** end user architecture code
.end

Thank you in advance!