Harald Pretl
06/12/2023, 10:25 AM.include
(this I know how to do), but a mechanism that xschem puts the file contents directly into the resulting netlist?Stefan Schippers
06/12/2023, 4:11 PMspice_sym_def="tcleval([read_data_nonewline [abs_sym_path comp_65nm_read.cir]])"
will read the file comp_65nm_read.cir
looking in the xschem search paths.
the read_data_nonewline
will read the file into the netlist (with no additional newline added 🙂 ), the abs_sym_path
builds the absolute path of the given file name looking for a match (the 1st found) in the search paths, This is more portable than specifying the absolute path of the file. You can also use environment vars, like
spice_sym_def="tcleval([read_data_nonewline $env(HOME)/comp_65nm_read.cir])"
The comp_65nm_read.cir
file is the description of the subcircuit:
* comp_65nm_read.cir
.subckt comp_65nm_read PLUS OUT MINUS
v1 x 0 1.1
e1 out x plus minus 0.5
.ends
Harald Pretl
06/12/2023, 5:09 PM