bump file_version to 1.3 from 1.2 (Spectre global attribute F {...})

This commit is contained in:
stefan schippers 2025-08-01 10:37:18 +02:00
parent 06dfef3876
commit 4cf22d61a5
9 changed files with 14 additions and 11 deletions

View File

@ -122,6 +122,8 @@ p{padding: 15px 30px 10px;}
<li><kbd>v</kbd> : XSCHEM Version string
<li><kbd>S</kbd> : Global property associated to the .sch file for SPICE netlisting</li>
<li><kbd>V</kbd> : Global property associated to the .sch file for VERILOG netlisting</li>
<li><kbd>F</kbd> : Global property associated to the .sch file for SPECTRE netlisting
(file format 1.3 and newer) </li>
<li><kbd>G</kbd> : Global property associated to the .sch file for VHDL netlisting OR
Global property associated to the .sym file for netlisting (in 1,2 file
format <kbd>K</kbd> is used, although backward compatibility is guaranteed)</li>
@ -189,11 +191,11 @@ T {NF=@nf} -5 -15 0 1 0.15 0.15 {}
<h3>VERSION STRING</h3>
<p>
Example: <kbd><br>
v {xschem version=2.9.7 file_version=1.2}</kbd>
v {xschem version=3.4.7 file_version=1.3}</kbd>
</p>
<p>
Two attributes are defined, the xschem version and the file format version.
Current file format version is 1.2. This string is guaranteed to be the first one in XSCHEM .sch and .sym files.
Current file format version is 1.3. This string is guaranteed to be the first one in XSCHEM .sch and .sym files.
A comment can be added (by manually editing the xschem schematic or symbol file) as shown below:
</p>
@ -236,7 +238,8 @@ template="name=U1 footprint=TO220"}</kbd>
telling netlisters what to do with the symbol, while global property
strings in schematic files corresponding to the active netlisting mode of XSCHEM are
copied verbatim to the netlist.<br>
the object tag (S, V, G, E, K) is followed by the property string enclosed in curly braces
File formats 1.3 and newer introduce also the SPECTRE global attribute ('F') for Spectre netlists.<br>
the object tag (S, V, G, E, F, K) is followed by the property string enclosed in curly braces
(<kbd>{...}</kbd>). This allows strings to contain any white space and newlines.
Curly braces if present in the string are automatically escaped with the '\' character
by XSCHEM when saving data.<br>

View File

@ -461,7 +461,7 @@ function print_header()
"device @name @device\n" \
"@comptag\"\n"
}
print "v {xschem version=3.4.8RC file_version=1.2}"
print "v {xschem version=3.4.8RC file_version=1.3}"
template_attrs = "template=\"" template_attrs "\"\n"
if(FILENAME ~/\.sym$/) {

View File

@ -700,7 +700,7 @@ function print_sym(sym, template, format, subckt_name, sym_type, extra, dir, pin
print "start print symbol: " sym
print "v {xschem version=3.4.8RC file_version=1.2}" > sym
print "v {xschem version=3.4.8RC file_version=1.3}" > sym
print "K {type=" sym_type > sym
# print "format=\"@name @pinlist @symname " format_translate(template) "\"" > sym
iii = format_translate(template, extra)

View File

@ -68,7 +68,7 @@ function beginfile(f)
text_voffset=20
lab_voffset=4
ip=op=n_pin=0
print "v {xschem version=3.4.8RC file_version=1.2}" > sym
print "v {xschem version=3.4.8RC file_version=1.3}" > sym
if(template !~/^{[ \t\n]*$/) {
printf "%s", "K {type=subcircuit\nformat=\"@name @pinlist @symname\"\n" >sym
printf "%s\n", "template=\"name=x1\"" >sym

View File

@ -401,7 +401,7 @@ function print_sym(sym, template, format, subckt_name, sym_type, extra, dir, pin
print "start print symbol: " sym
print "v {xschem version=3.4.8RC file_version=1.2}" > sym
print "v {xschem version=3.4.8RC file_version=1.3}" > sym
print "K {type=" sym_type > sym
# print "format=\"@name @pinlist @symname " format_translate(template) "\"" > sym
iii = format_translate(template, extra)

View File

@ -61,7 +61,7 @@ function beginfile(f)
text_voffset=10
lab_voffset=4
ip=op=n_pin=n_p=n_l=0
print "v {xschem version=3.4.8RC file_version=1.2}" > sym
print "v {xschem version=3.4.8RC file_version=1.3}" > sym
if(template=="") {
printf "%s", "K {type=subcircuit\nformat=\"@name @pinlist @symname\"\n" >sym
printf "%s\n", "template=\"name=x1\"" >sym

View File

@ -393,7 +393,7 @@ function attrs(a)
function header()
{
print "v {xschem version=3.4.8RC file_version=1.2}"
print "v {xschem version=3.4.8RC file_version=1.3}"
}
function round(n)

View File

@ -24,7 +24,7 @@
#define CADGLOBALS
#define XSCHEM_VERSION "3.4.8RC"
#define XSCHEM_FILE_VERSION "1.2"
#define XSCHEM_FILE_VERSION "1.3" /* 1.3 introduces F {..} field for global Spectre attribute */
#if HAS_PIPE == 1
/* fdopen() */

View File

@ -5415,7 +5415,7 @@ proc create_symbol {name {in {}} {out {}} {inout {}}} {
set symname [file rootname $name].sym
set res [catch {open $symname {WRONLY CREAT EXCL}} fd]
if {$res} {puts $fd; return 0} ;# Error. Print reason and exit.
puts $fd {v {xschem version=3.4.8RC file_version=1.2}}
puts $fd {v {xschem version=3.4.8RC file_version=1.3}}
puts $fd {K {type=subcircuit format="@name @pinlist @symname" template="name=X1"}}
set x -150
set y 0