<@U01819B63HP> I am trying to make an symbol of a ...
# xschem
k
@Stefan Schippers I am trying to make an symbol of a filesource device from XSPICE primitives however I am facing an issue while streaming text from symbol to the netlist. The symbol definition is the following:
Copy code
format="@name  [@@c1 @@c2]  @filesrc
.model @filesrc @filesrc_model (file=\"@file\" \
+ amploffset=[0.0 0.0] amplscale=[1.0 1.0] \
+ timeoffset=0 timescale=1 \
+ timerelative=false amplstep=false)"

template="name=afsrc
file=sck.txt
filesrc=filesrc
filesrc_model=filesource
And it streams an incorrect netilst instance & model:
Copy code
afsrc [?1 in filesrc
.model filesrc filesource (file=sck.txt amploffset=[0.0 0.0] amplscale=[1.0 1.0] timeoffset=0 timescale=1 timerelative=false
+ amplstep=false)
The correct one is:
Copy code
afsrc [in GND] filesrc
.model filesrc filesource (file="sck.txt" amploffset=[0.0 0.0] amplscale=[1.0 1.0] timeoffset=0 timescale=1 timerelative=false
+ amplstep=false)
So there are two issues: (1) streaming the ports in a correct way
[in GND]
and (2) to preserve the quotes in the filename
"sck.txt"
Any idea how to solve it ?