diff --git a/doc/xschem_man/tutorial_instance_based_implementation.html b/doc/xschem_man/tutorial_instance_based_implementation.html
index 7c37523d..bf126675 100644
--- a/doc/xschem_man/tutorial_instance_based_implementation.html
+++ b/doc/xschem_man/tutorial_instance_based_implementation.html
@@ -21,11 +21,11 @@ p{padding: 15px 30px 10px;}
It is quite common to have in a design multiple instances of the same subcircuit.
Think for example of memory arrays and decoder circuits.
- In some cases there are numerous instances of the same identical circuit. This lead so a very
+ In some cases there are numerous instances of the same identical circuit. This leads to a very
large netlist and heavy simulation loads (both in time and space).
On the other hand typically only a small portion of these repetitive circuits are exercised in
- simulation. For example you might want to simulate the selection of the first 2 Wordlines in
- a 1024 wordlines memory array.
+ simulation. For example you might want to simulate the selection only of the first 2 wordlines
+ and the last 2 wordlines in a 1024 wordlines memory array.
In these situations it might be useful to keep the full subcircuit implementation for the circuit parts
@@ -71,7 +71,7 @@ p{padding: 15px 30px 10px;}
The definition is provided as text (a piece of netlist, like for example a parasitic spice netlist extraction).
- Putting this all together here is a schematic with 3 instances of comp_65nm.sch.
+ Putting this all together here is a schematic with 3 instances of comp_65nm.sym.
- x1 is the standard instance using the default comp_65nm.sch
diff --git a/src/draw.c b/src/draw.c
index baec27df..5fc01dc7 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -2078,7 +2078,7 @@ static void draw_graph_bus_points(const char *ntok, int n_bits, SPICE_DATA **idx
set_thick_waves(0, wcnt, wave_col, gr);
}
}
-
+#define MAX_POLY_POINTS 4096*16
/* wcnt is the nth wave in graph, idx is the index in spice raw file */
static void draw_graph_points(int idx, int first, int last,
XPoint *point, int wave_col, int wcnt, int n_nodes, Graph_ctx *gr, void *ct)
@@ -2102,6 +2102,7 @@ static void draw_graph_points(int idx, int first, int last,
c1 = c + gr->gh * 0.5 * s2; /* trace y-center, used for clipping */
}
if( !digital || (c1 >= gr->ypos1 && c1 <= gr->ypos2) ) {
+ int x;
for(p = first ; p <= last; p++) {
yy = gv[p];
if(digital) {
@@ -2116,11 +2117,23 @@ static void draw_graph_points(int idx, int first, int last,
poly_npoints++;
}
set_thick_waves(1, wcnt, wave_col, gr);
- if(xctx->draw_window) {
- XDrawLines(display, xctx->window, xctx->gc[wave_col], point, poly_npoints, CoordModeOrigin);
- }
- if(xctx->draw_pixmap) {
- XDrawLines(display, xctx->save_pixmap, xctx->gc[wave_col], point, poly_npoints, CoordModeOrigin);
+ for(x = 0; x < 2; x++) {
+ Drawable w;
+ int offset = 0, size;
+ XPoint *pt = point;
+ if(x == 0 && xctx->draw_window) w = xctx->window;
+ else if(x == 1 && xctx->draw_pixmap) w = xctx->save_pixmap;
+ else continue;
+ while(1) {
+ pt = point + offset;
+ size = poly_npoints - offset;
+ if(size > MAX_POLY_POINTS) size = MAX_POLY_POINTS;
+ /* dbg(0, "draw_graph_points(): drawing from %d, size %d\n", offset, size);*/
+ XDrawLines(display, w, xctx->gc[wave_col], pt, size, CoordModeOrigin);
+ if(offset + size >= poly_npoints) break;
+ offset += MAX_POLY_POINTS -1; /* repeat last point on next iteration */
+ }
+ /*XDrawLines(display, xctx->window, xctx->gc[wave_col], point, poly_npoints, CoordModeOrigin);*/
}
#if !defined(__unix__) && HAS_CAIRO==1
check_cairo_drawpoints(ct, wave_col, point, poly_npoints);
diff --git a/src/spice_netlist.c b/src/spice_netlist.c
index 1e023322..16167761 100644
--- a/src/spice_netlist.c
+++ b/src/spice_netlist.c
@@ -409,7 +409,7 @@ int global_spice_netlist(int global) /* netlister driver */
my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path))
{
- tclvareval("get_directory ", xctx->sch[xctx->currsch - 1], NULL);
+ tclvareval("get_directory [list ", xctx->sch[xctx->currsch - 1], "]", NULL);
my_strncpy(xctx->current_dirname, tclresult(), S(xctx->current_dirname));
/* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */
my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0));
diff --git a/src/tedax_netlist.c b/src/tedax_netlist.c
index 96e9d99d..42c22255 100644
--- a/src/tedax_netlist.c
+++ b/src/tedax_netlist.c
@@ -210,7 +210,7 @@ int global_tedax_netlist(int global) /* netlister driver */
my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path))
{
- tclvareval("get_directory ", xctx->sch[xctx->currsch - 1], NULL);
+ tclvareval("get_directory [list ", xctx->sch[xctx->currsch - 1], "]", NULL);
my_strncpy(xctx->current_dirname, tclresult(), S(xctx->current_dirname));
/* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */
my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0));
diff --git a/src/verilog_netlist.c b/src/verilog_netlist.c
index 8b29e623..8729c588 100644
--- a/src/verilog_netlist.c
+++ b/src/verilog_netlist.c
@@ -358,7 +358,7 @@ int global_verilog_netlist(int global) /* netlister driver */
if(!xctx->sym[i].type) continue;
my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path)) {
- tclvareval("get_directory ", xctx->sch[xctx->currsch - 1], NULL);
+ tclvareval("get_directory [list ", xctx->sch[xctx->currsch - 1], "]", NULL);
my_strncpy(xctx->current_dirname, tclresult(), S(xctx->current_dirname));
/* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */
my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0));
diff --git a/src/vhdl_netlist.c b/src/vhdl_netlist.c
index 30a822f5..0e0124bb 100644
--- a/src/vhdl_netlist.c
+++ b/src/vhdl_netlist.c
@@ -458,7 +458,7 @@ int global_vhdl_netlist(int global) /* netlister driver */
my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path))
{
- tclvareval("get_directory ", xctx->sch[xctx->currsch - 1], NULL);
+ tclvareval("get_directory [list ", xctx->sch[xctx->currsch - 1], "]", NULL);
my_strncpy(xctx->current_dirname, tclresult(), S(xctx->current_dirname));
/* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */
my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0));
diff --git a/src/xschem.tcl b/src/xschem.tcl
index 138c3ba4..2346d55b 100644
--- a/src/xschem.tcl
+++ b/src/xschem.tcl
@@ -1476,7 +1476,7 @@ proc simulate {{callback {}}} {
}
#eval exec {cmd /V /C "cd $netlist_dir&&$cmd}
eval exec $cmd &
- return -1 ;# no execute ID on windows
+ return 0 # no execute ID on windows
} else {
set execute(callback) $callback
set id [$fg $st sh -c "cd $netlist_dir; $cmd"]