handle xyce y-devices in nspice netlists
This commit is contained in:
parent
f50a3b15fa
commit
77c99c2202
|
|
@ -4229,7 +4229,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
constrained_move = atoi(argv[3]);
|
||||
}
|
||||
else if(!strcmp(argv[2], "cursor1_x")) { /* set graph cursor1 position */
|
||||
xctx->graph_cursor1_x = atof(argv[3]);
|
||||
xctx->graph_cursor1_x = atof_spice(argv[3]);
|
||||
|
||||
if(xctx->rects[GRIDLAYER] > 0) {
|
||||
Graph_ctx *gr = &xctx->graph_struct;
|
||||
|
|
@ -4240,7 +4240,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
}
|
||||
}
|
||||
else if(!strcmp(argv[2], "cursor2_x")) { /* set graph cursor2 position */
|
||||
xctx->graph_cursor2_x = atof(argv[3]);
|
||||
xctx->graph_cursor2_x = atof_spice(argv[3]);
|
||||
|
||||
if(xctx->rects[GRIDLAYER] > 0) {
|
||||
Graph_ctx *gr = &xctx->graph_struct;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,15 @@ BEGIN{
|
|||
first=1
|
||||
user_code=0 #20180129
|
||||
|
||||
# used to handle strange xyce primitives that have a type word before the instance name
|
||||
xyceydev["ymemristor"] = 1
|
||||
xyceydev["ylin"] = 1
|
||||
xyceydev["ydelay"] = 1
|
||||
xyceydev["ytransline"] = 1
|
||||
xyceydev["ypgbr"] = 1
|
||||
xyceydev["ypowergridbranch"] = 1
|
||||
xyceydev["yacc"] = 1
|
||||
|
||||
while( (ARGV[1] ~ /^[-]/) || (ARGV[1] ~ /^$/) ) {
|
||||
if(ARGV[1] == "-xyce") { xyce = 1}
|
||||
for(i=2; i<= ARGC;i++) {
|
||||
|
|
@ -270,7 +279,20 @@ function process( i,j, iprefix, saveinstr, savetype, saveanalysis)
|
|||
gsub(","," ",$0)
|
||||
print $0
|
||||
} else {
|
||||
num=split($1,name,",")
|
||||
# handle uncommon xyce primitives that have a prefix before the device name
|
||||
if(tolower($1) in xyceydev) {
|
||||
devprefix = $1
|
||||
num = split($3, name, ",")
|
||||
$1 = ""
|
||||
for(i = 0; i < num; i++) {
|
||||
if(i) $1 = $1 ","
|
||||
$1 = $1 devprefix
|
||||
}
|
||||
num = split($1, name, ",")
|
||||
$0 = $0
|
||||
} else {
|
||||
num = split($1, name, ",")
|
||||
}
|
||||
if(num==0) print ""
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue