diff --git a/doc/xschem_man/developer_info.html b/doc/xschem_man/developer_info.html index 90176fba..09748bdb 100644 --- a/doc/xschem_man/developer_info.html +++ b/doc/xschem_man/developer_info.html @@ -260,8 +260,15 @@ in this case only the verilog-related global property has some definition. This
Example: N 890 -130 890 -110 {lab=ANALOG_GND}
- The net 'N' tag is followed by the end point coordinates x1,y1 - x2,y2
+ The net 'N' tag is followed by the end point coordinates x1,y1 - x2,y2.
(stored and read as double precision numbers) and a property string, used in this case to name the net.
+ In most cases you don't need to specify attributes for nets (one exception is the bus attribute)
+ as the lab attribute is set by xschem when creating a netlist or more generally when
+ building the connectivity.
+ This means that almost always nets in a xschem schematic are set as in following example:
+ N 890 -130 890 -110 {}
+ Xschem schematic files store only geometrical data and attributes of the graphic primitives,
+ the connectivity and the logical network is obtained by xschem.
@@ -283,7 +290,7 @@ in this case only the verilog-related global property has some definition. This
followed by the number of points (integer),
the x,y coordinates of the polygon points and the property string (empty in this example).
If the last point is coincident to the first point a closed polygon is drawn.
- A 'fill=true' arribute may be given to fill a cloded polygon, in this case a polygon line looks like:
+ A 'fill=true' arribute may be given to fill a closed polygon, in this case a polygon line looks like:
P 3 5 2450 -210 2460 -170 2500 -170 2510 -210 2450 -210 {fill=true}
diff --git a/src/draw.c b/src/draw.c
index 73e201a7..c5c59b54 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -2286,7 +2286,7 @@ static void show_node_measures(int measure_p, double measure_x, double measure_p
diffy = xctx->graph_values[idx][measure_p] - yy1;
diffx = measure_x - measure_prev_x;
yy = yy1 + diffy / diffx * (xctx->graph_cursor1_x - measure_prev_x);
- if(SIGN0(gr->gy1) != SIGN0(gr->gy2) && fabs(yy) < 1e-4 * fabs(gr->gh)) yy = 0.0;
+ if(XSIGN0(gr->gy1) != XSIGN0(gr->gy2) && fabs(yy) < 1e-4 * fabs(gr->gh)) yy = 0.0;
if(yy != 0.0 && fabs(yy * gr->unity) < 1.0e-3) {
fmt1="%.2e";
fmt2="%.2e%c";
@@ -2416,7 +2416,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr)
last = ofs;
for(p = ofs ; p < ofs + xctx->graph_npoints[dset]; p++) {
xx = gv[p];
- wrap = (sweep_idx == 0 && cnt > 1 && SIGN(xx - prev_x) != SIGN(prev_x - prev_prev_x));
+ wrap = (sweep_idx == 0 && cnt > 1 && XSIGN(xx - prev_x) != XSIGN(prev_x - prev_prev_x));
if(first != -1) { /* there is something to plot ... */
if(xx > end || xx < start || /* ... and we ran out of graph area ... */
wrap) { /* ... or sweep variable changed direction */
@@ -2445,7 +2445,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr)
point[poly_npoints].x = S_X(xx);
if(dataset == -1 || dataset == sweepvar_wrap) {
if(measure_p == -1 && flags & 2 && cnt) { /* cursor1: show measurements on nodes in graph */
- if(SIGN(xx - xctx->graph_cursor1_x) != SIGN(prev_x - xctx->graph_cursor1_x)) {
+ if(XSIGN(xx - xctx->graph_cursor1_x) != XSIGN(prev_x - xctx->graph_cursor1_x)) {
measure_p = p;
measure_x = xx;
measure_prev_x = prev_x;
diff --git a/src/xinit.c b/src/xinit.c
index 9d2e94c9..5e16f1fc 100644
--- a/src/xinit.c
+++ b/src/xinit.c
@@ -1172,7 +1172,7 @@ static void create_new_tab(int *window_count, const char *fname)
/* tcl code to create the tab button */
my_snprintf(nn, S(nn), "%d", n);
tclvareval(
- "button ", ".tabs.x", nn, " -padx 2 -pady 0 -text Tab2 "
+ "button ", ".tabs.x", nn, " -padx 2 -pady 0 -anchor nw -text Tab2 "
"-command \"xschem new_schematic switch_tab .x", nn, ".drw\"", NULL);
tclvareval("bind .tabs.x",nn,"