regression fix: attempt to write into target netlist even if fopen() failed
This commit is contained in:
parent
eff273dd08
commit
21a8885b65
|
|
@ -227,6 +227,10 @@ void global_spice_netlist(int global) /* netlister driver */
|
|||
tclgetvar("netlist_dir"), skip_dir(xctx->sch[xctx->currsch]), getpid());
|
||||
dbg(1, "global_spice_netlist(): opening %s for writing\n",netl_filename);
|
||||
fd=fopen(netl_filename, "w");
|
||||
if(fd==NULL) {
|
||||
dbg(0, "global_spice_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
fprintf(fd, "** sch_path: %s\n", xctx->sch[xctx->currsch]);
|
||||
|
||||
if(xctx->netlist_name[0]) {
|
||||
|
|
@ -234,10 +238,6 @@ void global_spice_netlist(int global) /* netlister driver */
|
|||
} else {
|
||||
my_snprintf(cellname, S(cellname), "%s.spice", skip_dir(xctx->sch[xctx->currsch]));
|
||||
}
|
||||
if(fd==NULL) {
|
||||
dbg(0, "global_spice_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
first = 0;
|
||||
for(i=0;i<xctx->instances;i++) /* print netlist_commands of top level cell with 'place=header' property */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -147,6 +147,10 @@ void global_tedax_netlist(int global) /* netlister driver */
|
|||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||
tclgetvar("netlist_dir"), skip_dir(xctx->sch[xctx->currsch]), getpid());
|
||||
fd=fopen(netl_filename, "w");
|
||||
if(fd==NULL){
|
||||
dbg(0, "global_tedax_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
fprintf(fd, "## sch_path: %s\n", xctx->sch[xctx->currsch]);
|
||||
|
||||
if(xctx->netlist_name[0]) {
|
||||
|
|
@ -155,10 +159,6 @@ void global_tedax_netlist(int global) /* netlister driver */
|
|||
my_snprintf(cellname, S(cellname), "%s.tdx", skip_dir(xctx->sch[xctx->currsch]));
|
||||
}
|
||||
|
||||
if(fd==NULL){
|
||||
dbg(0, "global_tedax_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
/* netlist_options */
|
||||
for(i=0;i<xctx->instances;i++) {
|
||||
if(!(xctx->inst[i].ptr+ xctx->sym)->type) continue;
|
||||
|
|
|
|||
|
|
@ -103,6 +103,10 @@ void global_verilog_netlist(int global) /* netlister driver */
|
|||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||
tclgetvar("netlist_dir"), skip_dir(xctx->sch[xctx->currsch]),getpid());
|
||||
fd=fopen(netl_filename, "w");
|
||||
if(fd==NULL){
|
||||
dbg(0, "global_verilog_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
fprintf(fd, "// sch_path: %s\n", xctx->sch[xctx->currsch]);
|
||||
|
||||
if(xctx->netlist_name[0]) {
|
||||
|
|
@ -111,10 +115,6 @@ void global_verilog_netlist(int global) /* netlister driver */
|
|||
my_snprintf(cellname, S(cellname), "%s.v", skip_dir(xctx->sch[xctx->currsch]));
|
||||
}
|
||||
|
||||
if(fd==NULL){
|
||||
dbg(0, "global_verilog_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
dbg(1, "global_verilog_netlist(): opening %s for writing\n",netl_filename);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -143,6 +143,10 @@ void global_vhdl_netlist(int global) /* netlister driver */
|
|||
tclgetvar("netlist_dir"), skip_dir(xctx->sch[xctx->currsch]), getpid());
|
||||
fd=fopen(netl_filename, "w");
|
||||
|
||||
if(fd==NULL){
|
||||
dbg(0, "global_vhdl_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
fprintf(fd, "-- sch_path: %s\n", xctx->sch[xctx->currsch]);
|
||||
|
||||
if(xctx->netlist_name[0]) {
|
||||
|
|
@ -151,10 +155,6 @@ void global_vhdl_netlist(int global) /* netlister driver */
|
|||
my_snprintf(cellname, S(cellname), "%s.vhdl", skip_dir(xctx->sch[xctx->currsch]));
|
||||
}
|
||||
|
||||
if(fd==NULL){
|
||||
dbg(0, "global_vhdl_netlist(): problems opening netlist file\n");
|
||||
return;
|
||||
}
|
||||
dbg(1, "global_vhdl_netlist(): opening %s for writing\n",netl_filename);
|
||||
|
||||
dbg(1, "global_vhdl_netlist(): printing top level packages\n");
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ B 2 1200 -500 1880 -310 {flags=graph
|
|||
y1 = -0.0059
|
||||
y2 = 11
|
||||
divy = 6
|
||||
x1=0.0365975
|
||||
x2=0.0372189
|
||||
x1=0.0119263
|
||||
x2=0.0123791
|
||||
divx=10
|
||||
node="i(v.x1.vu)
|
||||
i(v.x0.vu)
|
||||
|
|
@ -31,8 +31,8 @@ B 2 1200 -830 1880 -520 {flags=graph
|
|||
y1 = -49
|
||||
y2 = 59
|
||||
divy = 12
|
||||
x1=0.0365975
|
||||
x2=0.0372189
|
||||
x1=0.0119263
|
||||
x2=0.0123791
|
||||
divx=10
|
||||
node="outp
|
||||
outm
|
||||
|
|
@ -46,21 +46,21 @@ B 2 1200 -1020 1880 -830 {flags=graph
|
|||
y1 = 2.4e-11
|
||||
y2 = 840
|
||||
divy = 6
|
||||
x1=0.0365975
|
||||
x2=0.0372189
|
||||
x1=0.0119263
|
||||
x2=0.0123791
|
||||
divx=10
|
||||
|
||||
|
||||
unitx=m
|
||||
color="4 7"
|
||||
node="\\"supply power;i(vcurrvnn) vnn * i(vcurrvpp) vpp * +\\"
|
||||
\\"running average supply power;i(vcurrvnn) vnn * i(vcurrvpp) vpp * + 1e-4 ravg()\\""}
|
||||
\\"running average supply power;i(vcurrvnn) vnn * i(vcurrvpp) vpp * + 1.0e-4 ravg()\\""}
|
||||
B 2 1200 -310 1880 -120 {flags=graph
|
||||
y1 = 0.0077
|
||||
y2 = 850
|
||||
divy = 6
|
||||
x1=0.0365975
|
||||
x2=0.0372189
|
||||
x1=0.0119263
|
||||
x2=0.0123791
|
||||
divx=10
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue