more state in xctx context
This commit is contained in:
parent
fe46725c0c
commit
8902f3b56b
|
|
@ -823,8 +823,8 @@ void attach_labels_to_inst() /* offloaded from callback.c 20171005 */
|
|||
piny0 += y0;
|
||||
|
||||
get_square(pinx0, piny0, &sqx, &sqy);
|
||||
iptr=instpintable[sqx][sqy];
|
||||
wptr=wiretable[sqx][sqy];
|
||||
iptr=xctx->instpintable[sqx][sqy];
|
||||
wptr=xctx->wiretable[sqx][sqy];
|
||||
|
||||
skip=0;
|
||||
while(iptr) {
|
||||
|
|
|
|||
22
src/check.c
22
src/check.c
|
|
@ -52,7 +52,7 @@ void update_conn_cues(int draw_cues, int dr_win)
|
|||
struct wireentry *wireptr;
|
||||
xWire * const wire = xctx->wire;
|
||||
|
||||
hash_wires(); /* must be done also if xctx->wires==0 to clear wiretable */
|
||||
hash_wires(); /* must be done also if xctx->wires==0 to clear xctx->wiretable */
|
||||
if(!xctx->wires) return;
|
||||
if(!draw_dots) return;
|
||||
if(cadhalfdotsize*xctx->mooz<0.7) return;
|
||||
|
|
@ -77,7 +77,7 @@ void update_conn_cues(int draw_cues, int dr_win)
|
|||
y0 = wire[k].y2;
|
||||
}
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
for(wptr = wiretable[sqx][sqy] ; wptr ; wptr = wptr->next) {
|
||||
for(wptr = xctx->wiretable[sqx][sqy] ; wptr ; wptr = wptr->next) {
|
||||
i = wptr->n;
|
||||
if(i == k) {
|
||||
continue; /* no check wire against itself */
|
||||
|
|
@ -158,13 +158,13 @@ void trim_wires(void)
|
|||
y0 = xctx->wire[i].y1;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
k=1;
|
||||
for(wptr = wiretable[sqx][sqy] ; ; wptr = wptr->next) {
|
||||
for(wptr = xctx->wiretable[sqx][sqy] ; ; wptr = wptr->next) {
|
||||
if(!wptr) {
|
||||
if(k == 1) {
|
||||
x0 = xctx->wire[i].x2;
|
||||
y0 = xctx->wire[i].y2;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
wptr = wiretable[sqx][sqy];
|
||||
wptr = xctx->wiretable[sqx][sqy];
|
||||
k = 2;
|
||||
if(!wptr) break;
|
||||
} else break;
|
||||
|
|
@ -219,13 +219,13 @@ void trim_wires(void)
|
|||
y0 = xctx->wire[i].y1;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
k=1;
|
||||
for(wptr = wiretable[sqx][sqy] ; ; wptr = wptr->next) {
|
||||
for(wptr = xctx->wiretable[sqx][sqy] ; ; wptr = wptr->next) {
|
||||
if(!wptr) {
|
||||
if(k == 1) {
|
||||
x0 = xctx->wire[i].x2;
|
||||
y0 = xctx->wire[i].y2;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
wptr = wiretable[sqx][sqy];
|
||||
wptr = xctx->wiretable[sqx][sqy];
|
||||
k = 2;
|
||||
if(!wptr) break;
|
||||
} else break;
|
||||
|
|
@ -283,13 +283,13 @@ void trim_wires(void)
|
|||
xctx->wire[i].end1 = xctx->wire[i].end2 = 0;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
k=1;
|
||||
for(wptr = wiretable[sqx][sqy] ; ; wptr = wptr->next) {
|
||||
for(wptr = xctx->wiretable[sqx][sqy] ; ; wptr = wptr->next) {
|
||||
if(!wptr) {
|
||||
if(k == 1) {
|
||||
x0 = xctx->wire[i].x2;
|
||||
y0 = xctx->wire[i].y2;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
wptr = wiretable[sqx][sqy];
|
||||
wptr = xctx->wiretable[sqx][sqy];
|
||||
k = 2;
|
||||
if(!wptr) break;
|
||||
} else break;
|
||||
|
|
@ -321,7 +321,7 @@ void trim_wires(void)
|
|||
x0 = xctx->wire[i].x2;
|
||||
y0 = xctx->wire[i].y2;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
for(wptr = wiretable[sqx][sqy] ; wptr ; wptr = wptr->next) {
|
||||
for(wptr = xctx->wiretable[sqx][sqy] ; wptr ; wptr = wptr->next) {
|
||||
j = wptr->n;
|
||||
if(i == j || wireflag[j]) continue;
|
||||
if( touch(xctx->wire[j].x1, xctx->wire[j].y1, xctx->wire[j].x2, xctx->wire[j].y2, x0,y0) &&
|
||||
|
|
@ -403,7 +403,7 @@ void break_wires_at_pins(void)
|
|||
x0=xctx->inst[k].x0+rx1;
|
||||
y0=xctx->inst[k].y0+ry1;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
for(wptr=wiretable[sqx][sqy]; wptr; wptr=wptr->next) {
|
||||
for(wptr=xctx->wiretable[sqx][sqy]; wptr; wptr=wptr->next) {
|
||||
i = wptr->n;
|
||||
if( touch(xctx->wire[i].x1, xctx->wire[i].y1,
|
||||
xctx->wire[i].x2, xctx->wire[i].y2, x0,y0) )
|
||||
|
|
@ -454,7 +454,7 @@ void break_wires_at_pins(void)
|
|||
}
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
/* printf(" k=%d, x0=%g, y0=%g\n", k, x0, y0); */
|
||||
for(wptr=wiretable[sqx][sqy] ; wptr ; wptr = wptr->next) {
|
||||
for(wptr=xctx->wiretable[sqx][sqy] ; wptr ; wptr = wptr->next) {
|
||||
i = wptr->n;
|
||||
/* printf("check xctx->wire %d to xctx->wire %d\n", k, i); */
|
||||
if(i==k) {
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ char hiersep[20]=".";
|
|||
int netlist_show=0;
|
||||
int flat_netlist=0;
|
||||
int netlist_type=-1;
|
||||
char bus_replacement_char[3] = {0, 0, 0};
|
||||
char bus_char[3] = {0, 0, 0};
|
||||
int horizontal_move=0;
|
||||
int vertical_move=0;
|
||||
int color_ps=-1;
|
||||
|
|
@ -207,9 +207,6 @@ int dark_colorscheme=1;
|
|||
double color_dim=0.0;
|
||||
int no_undo=0;
|
||||
int enable_drill=0; /* 20171211 pass net hilights through components with 'propagate_to' property set on pins */
|
||||
struct instpinentry *instpintable[NBOXES][NBOXES];
|
||||
struct wireentry *wiretable[NBOXES][NBOXES];
|
||||
struct instentry *insttable[NBOXES][NBOXES];
|
||||
size_t get_tok_value_size;
|
||||
size_t get_tok_size;
|
||||
int batch_mode = 0; /* no tcl console if set; batch mode */
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void init_inst_iterator(double x1, double y1, double x2, double y2)
|
|||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
counti=0;
|
||||
/* printf("init_inst_iterator(): tmpi=%d, tmpj=%d\n", tmpi, tmpj); */
|
||||
instanceptr=insttable[tmpi][tmpj];
|
||||
instanceptr=xctx->insttable[tmpi][tmpj];
|
||||
countj=0;
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ struct instentry *inst_iterator_next()
|
|||
/* printf("inst_iterator_next(): j=%d\n", j); */
|
||||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
/* printf("j inst_iterator_next(): tmpi=%d tmpj=%d\n", tmpi, tmpj); */
|
||||
instanceptr=insttable[tmpi][tmpj];
|
||||
instanceptr=xctx->insttable[tmpi][tmpj];
|
||||
} else if(i<x2a && counti++<NBOXES) {
|
||||
i++;
|
||||
j=y1a;
|
||||
|
|
@ -81,7 +81,7 @@ struct instentry *inst_iterator_next()
|
|||
tmpi=i%NBOXES; if(tmpi<0) tmpi+=NBOXES;
|
||||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
/* printf("i inst_iterator_next(): tmpi=%d tmpj=%d\n", tmpi, tmpj); */
|
||||
instanceptr=insttable[tmpi][tmpj];
|
||||
instanceptr=xctx->insttable[tmpi][tmpj];
|
||||
} else {
|
||||
my_free(753, &instflag);
|
||||
return NULL;
|
||||
|
|
@ -108,7 +108,7 @@ void init_wire_iterator(double x1, double y1, double x2, double y2)
|
|||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
counti=0;
|
||||
/* printf("init_inst_iterator(): tmpi=%d, tmpj=%d\n", tmpi, tmpj); */
|
||||
wireptr=wiretable[tmpi][tmpj];
|
||||
wireptr=xctx->wiretable[tmpi][tmpj];
|
||||
countj=0;
|
||||
}
|
||||
|
||||
|
|
@ -129,14 +129,14 @@ struct wireentry *wire_iterator_next()
|
|||
if(j<y2a && countj++<NBOXES) {
|
||||
j++;
|
||||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
wireptr=wiretable[tmpi][tmpj];
|
||||
wireptr=xctx->wiretable[tmpi][tmpj];
|
||||
} else if(i<x2a && counti++<NBOXES) {
|
||||
i++;
|
||||
j=y1a;
|
||||
countj=0;
|
||||
tmpi=i%NBOXES; if(tmpi<0) tmpi+=NBOXES;
|
||||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
wireptr=wiretable[tmpi][tmpj];
|
||||
wireptr=xctx->wiretable[tmpi][tmpj];
|
||||
} else {
|
||||
my_free(754, &wireflag);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ static void instdelete(int n, int x, int y)
|
|||
{
|
||||
struct instentry *saveptr, **prevptr;
|
||||
|
||||
prevptr = &insttable[x][y];
|
||||
prevptr = &xctx->insttable[x][y];
|
||||
while( (*prevptr)->n != n) prevptr = &(*prevptr)->next;
|
||||
saveptr = (*prevptr)->next;
|
||||
my_free(821, prevptr);
|
||||
|
|
@ -36,11 +36,11 @@ static void instdelete(int n, int x, int y)
|
|||
static void instinsert(int n, int x, int y)
|
||||
{
|
||||
struct instentry *ptr, *newptr;
|
||||
ptr=insttable[x][y];
|
||||
ptr=xctx->insttable[x][y];
|
||||
newptr=my_malloc(236, sizeof(struct instentry));
|
||||
newptr->next=ptr;
|
||||
newptr->n=n;
|
||||
insttable[x][y]=newptr;
|
||||
xctx->insttable[x][y]=newptr;
|
||||
dbg(2, "instinsert(): inserting object %d at %d,%d\n",n,x,y);
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ void del_inst_table(void)
|
|||
|
||||
for(i=0;i<NBOXES;i++)
|
||||
for(j=0;j<NBOXES;j++)
|
||||
insttable[i][j] = delinstentry(insttable[i][j]);
|
||||
xctx->insttable[i][j] = delinstentry(xctx->insttable[i][j]);
|
||||
xctx->prep_hash_inst=0;
|
||||
dbg(1, "del_inst_table(): cleared object hash table\n");
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ static void instpindelete(int n,int pin, int x, int y)
|
|||
{
|
||||
struct instpinentry *saveptr, **prevptr, *ptr;
|
||||
|
||||
prevptr = &instpintable[x][y];
|
||||
prevptr = &xctx->instpintable[x][y];
|
||||
ptr = *prevptr;
|
||||
while(ptr) {
|
||||
if(ptr->n == n && ptr->pin == pin) {
|
||||
|
|
@ -145,14 +145,14 @@ static void instpininsert(int n,int pin, double x0, double y0, int x, int y)
|
|||
{
|
||||
struct instpinentry *ptr, *newptr;
|
||||
|
||||
ptr=instpintable[x][y];
|
||||
ptr=xctx->instpintable[x][y];
|
||||
newptr=my_malloc(237, sizeof(struct instpinentry));
|
||||
newptr->next=ptr;
|
||||
newptr->n=n;
|
||||
newptr->x0=x0;
|
||||
newptr->y0=y0;
|
||||
newptr->pin=pin;
|
||||
instpintable[x][y]=newptr;
|
||||
xctx->instpintable[x][y]=newptr;
|
||||
dbg(2, "instpininsert(): inserting inst %d at %d,%d\n",n,x,y);
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ static void del_inst_pin_table(void)
|
|||
|
||||
for(i=0;i<NBOXES;i++)
|
||||
for(j=0;j<NBOXES;j++)
|
||||
instpintable[i][j] = delinstpinentry(instpintable[i][j]);
|
||||
xctx->instpintable[i][j] = delinstpinentry(xctx->instpintable[i][j]);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ static void wiredelete(int n, int x, int y)
|
|||
{
|
||||
struct wireentry *saveptr, **prevptr;
|
||||
|
||||
prevptr = &wiretable[x][y];
|
||||
prevptr = &xctx->wiretable[x][y];
|
||||
while( (*prevptr)->n != n) prevptr = &(*prevptr)->next;
|
||||
saveptr = (*prevptr)->next;
|
||||
my_free(825, prevptr);
|
||||
|
|
@ -194,11 +194,11 @@ static void wireinsert(int n, int x, int y)
|
|||
{
|
||||
struct wireentry *ptr, *newptr;
|
||||
|
||||
ptr=wiretable[x][y];
|
||||
ptr=xctx->wiretable[x][y];
|
||||
newptr=my_malloc(238, sizeof(struct wireentry));
|
||||
newptr->next=ptr;
|
||||
newptr->n=n;
|
||||
wiretable[x][y]=newptr;
|
||||
xctx->wiretable[x][y]=newptr;
|
||||
dbg(2, "wireinsert(): inserting wire %d at %d,%d\n",n,x,y);
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ void del_wire_table(void)
|
|||
|
||||
for(i=0;i<NBOXES;i++)
|
||||
for(j=0;j<NBOXES;j++)
|
||||
wiretable[i][j] = delwireentry(wiretable[i][j]);
|
||||
xctx->wiretable[i][j] = delwireentry(xctx->wiretable[i][j]);
|
||||
xctx->prep_hash_wires=0;
|
||||
}
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ void hash_wire(int what, int n, int incremental)
|
|||
else wiredelete(n, tmpi, tmpj);
|
||||
|
||||
/* reset ends of all wires that *could* touch wire[n] */
|
||||
if(incremental) for(wptr = wiretable[tmpi][tmpj] ; wptr ; wptr = wptr->next) {
|
||||
if(incremental) for(wptr = xctx->wiretable[tmpi][tmpj] ; wptr ; wptr = wptr->next) {
|
||||
wire[wptr->n].end1 = wire[wptr->n].end2 = -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -382,11 +382,11 @@ void netlist_options(int i)
|
|||
const char * str;
|
||||
str = get_tok_value(xctx->inst[i].prop_ptr, "bus_replacement_char", 0);
|
||||
if(str[0] && str[1] && strlen(str) ==2) {
|
||||
bus_replacement_char[0] = str[0];
|
||||
bus_replacement_char[1] = str[1];
|
||||
bus_char[0] = str[0];
|
||||
bus_char[1] = str[1];
|
||||
/* tclsetvar("bus_replacement_char", str); */
|
||||
}
|
||||
/* fprintf(errfp, "netlist_options(): bus_replacement_char=%s\n", str); */
|
||||
/* fprintf(errfp, "netlist_options(): bus_char=%s\n", str); */
|
||||
|
||||
str = get_tok_value(xctx->inst[i].prop_ptr, "top_subckt", 0);
|
||||
if(str[0]) {
|
||||
|
|
@ -416,7 +416,7 @@ void print_wires(void)
|
|||
for(j=0;j<NBOXES;j++)
|
||||
{
|
||||
dbg(1, "print_wires(): %4d%4d :\n",i,j);
|
||||
ptr=wiretable[i][j];
|
||||
ptr=xctx->wiretable[i][j];
|
||||
while(ptr)
|
||||
{
|
||||
dbg(1, "print_wires(): %6d\n", ptr->n);
|
||||
|
|
@ -425,7 +425,7 @@ void print_wires(void)
|
|||
dbg(1, "print_wires(): \n");
|
||||
}
|
||||
}
|
||||
ptr=wiretable[0][1];
|
||||
ptr=xctx->wiretable[0][1];
|
||||
while(ptr)
|
||||
{
|
||||
select_wire(ptr->n,SELECTED, 1);
|
||||
|
|
@ -488,7 +488,7 @@ void wirecheck(int k) /* recursive routine */
|
|||
countj++;
|
||||
tmpj=j%NBOXES; if(tmpj<0) tmpj+=NBOXES;
|
||||
/*check if wire[k] touches wires in square [tmpi, tmpj] */
|
||||
ptr2=wiretable[tmpi][tmpj];
|
||||
ptr2=xctx->wiretable[tmpi][tmpj];
|
||||
while(ptr2)
|
||||
{
|
||||
if(wire[ptr2->n].node) {ptr2=ptr2->next; continue;} /* 20171207 net already checked. Move on */
|
||||
|
|
@ -769,7 +769,7 @@ void prepare_netlist_structs(int for_netlist)
|
|||
x0=inst[i].x0+rx1;
|
||||
y0=inst[i].y0+ry1;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
wptr=wiretable[sqx][sqy];
|
||||
wptr=xctx->wiretable[sqx][sqy];
|
||||
if (inst[i].node[0]) while(wptr)
|
||||
{
|
||||
if (touch(xctx->wire[wptr->n].x1, xctx->wire[wptr->n].y1,
|
||||
|
|
@ -834,7 +834,7 @@ void prepare_netlist_structs(int for_netlist)
|
|||
y0=inst[i].y0+ry1;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
|
||||
iptr=instpintable[sqx][sqy];
|
||||
iptr=xctx->instpintable[sqx][sqy];
|
||||
while (iptr)
|
||||
{
|
||||
if (iptr->n == i)
|
||||
|
|
@ -904,7 +904,7 @@ void prepare_netlist_structs(int for_netlist)
|
|||
y0=inst[i].y0+ry1;
|
||||
get_square(x0, y0, &sqx, &sqy);
|
||||
/* name instance nodes that touch named nets */
|
||||
wptr=wiretable[sqx][sqy];
|
||||
wptr=xctx->wiretable[sqx][sqy];
|
||||
dbg(2, "prepare_netlist_structs(): from attached nets\n");
|
||||
while (wptr)
|
||||
{
|
||||
|
|
@ -939,7 +939,7 @@ void prepare_netlist_structs(int for_netlist)
|
|||
|
||||
dbg(2, "prepare_netlist_structs(): from other instances\n");
|
||||
touches_unnamed=0;
|
||||
iptr=instpintable[sqx][sqy];
|
||||
iptr=xctx->instpintable[sqx][sqy];
|
||||
while (iptr)
|
||||
{
|
||||
if (iptr->n == i)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ extern int has_x;
|
|||
extern FILE *errfp;
|
||||
extern size_t my_strdup(int id, char **dest, const char *src);
|
||||
extern void my_free(int id, void *ptr);
|
||||
extern char bus_replacement_char[];
|
||||
extern char bus_char[];
|
||||
extern const char *tcleval(const char str[]);
|
||||
extern void *my_malloc(int id, size_t size);
|
||||
extern int my_snprintf(char *str, int size, const char *fmt, ...);
|
||||
|
|
@ -118,9 +118,9 @@ const char *expandlabel(const char *s, int *m)
|
|||
else
|
||||
*m=-1;
|
||||
if(dest_string.str) {
|
||||
if(netlist_type == CAD_SPICE_NETLIST && bus_replacement_char[0]) {
|
||||
strreplace(dest_string.str, '[', bus_replacement_char[0]);
|
||||
strreplace(dest_string.str, ']', bus_replacement_char[1]);
|
||||
if(netlist_type == CAD_SPICE_NETLIST && bus_char[0] && bus_char[1]) {
|
||||
strreplace(dest_string.str, '[', bus_char[0]);
|
||||
strreplace(dest_string.str, ']', bus_char[1]);
|
||||
}
|
||||
return dest_string.str;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -958,12 +958,12 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
printf("wires=%d\n", xctx->wires);
|
||||
printf("instances=%d\n", xctx->instances);
|
||||
printf("symbols=%d\n", xctx->symbols);
|
||||
printf("xctx->lastsel=%d\n", xctx->lastsel);
|
||||
printf("lastsel=%d\n", xctx->lastsel);
|
||||
printf("texts=%d\n", xctx->texts);
|
||||
printf("maxt=%d\n", xctx->maxt);
|
||||
printf("maxw=%d\n", xctx->maxw);
|
||||
printf("maxi=%d\n", xctx->maxi);
|
||||
printf("xctx->maxsel=%d\n", xctx->maxsel);
|
||||
printf("maxsel=%d\n", xctx->maxsel);
|
||||
printf("zoom=%.16g\n", xctx->zoom);
|
||||
printf("xorigin=%.16g\n", xctx->xorigin);
|
||||
printf("yorigin=%.16g\n", xctx->yorigin);
|
||||
|
|
@ -982,11 +982,11 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
printf("sch_path[%d]=%s\n",i,xctx->sch_path[i]? xctx->sch_path[i]:"<NULL>");
|
||||
printf("sch[%d]=%s\n",i,xctx->sch[i]);
|
||||
}
|
||||
printf("xctx->modified=%d\n", xctx->modified);
|
||||
printf("modified=%d\n", xctx->modified);
|
||||
printf("color_ps=%d\n", color_ps);
|
||||
printf("a3page=%d\n", a3page);
|
||||
printf("hilight_nets=%d\n", hilight_nets);
|
||||
printf("xctx->need_reb_sel_arr=%d\n", xctx->need_reb_sel_arr);
|
||||
printf("need_reb_sel_arr=%d\n", xctx->need_reb_sel_arr);
|
||||
printf("******* end global variables:*******\n");
|
||||
} else if(!strcmp(argv[1],"help")) {
|
||||
printf("xschem : function used to communicate with the C program\n");
|
||||
|
|
@ -1924,7 +1924,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
else if(!strcmp(argv[2],"cadsnap_default")) {
|
||||
Tcl_AppendResult(interp, tclgetvar("snap"),NULL);
|
||||
}
|
||||
else if(!strcmp(argv[2],"xctx->netlist_name")) {
|
||||
else if(!strcmp(argv[2],"netlist_name")) {
|
||||
Tcl_AppendResult(interp, xctx->netlist_name);
|
||||
}
|
||||
else if(!strcmp(argv[2],"cadsnap")) {
|
||||
|
|
@ -1962,7 +1962,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
my_snprintf(s, S(s), "%d",draw_window);
|
||||
Tcl_AppendResult(interp, s,NULL);
|
||||
}
|
||||
else if(!strcmp(argv[2],"xctx->ui_state")) {
|
||||
else if(!strcmp(argv[2],"ui_state")) {
|
||||
char s[30]; /* overflow safe 20161122 */
|
||||
my_snprintf(s, S(s), "%d",xctx->ui_state);
|
||||
Tcl_AppendResult(interp, s,NULL);
|
||||
|
|
@ -2108,7 +2108,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
int s = atoi(argv[3]);
|
||||
show_pin_net_names=s;
|
||||
}
|
||||
else if(!strcmp(argv[2],"xctx->netlist_name")) {
|
||||
else if(!strcmp(argv[2],"netlist_name")) {
|
||||
my_strncpy(xctx->netlist_name, argv[3], S(xctx->netlist_name));
|
||||
}
|
||||
else if(!strcmp(argv[2],"dim")) {
|
||||
|
|
@ -2219,7 +2219,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
else if(!strcmp(argv[2],"draw_window")) {
|
||||
draw_window=atoi(argv[3]);
|
||||
}
|
||||
else if(!strcmp(argv[2],"xctx->ui_state")) {
|
||||
else if(!strcmp(argv[2],"ui_state")) {
|
||||
xctx->ui_state=atoi(argv[3]);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -51,12 +51,12 @@ void global_spice_netlist(int global) /* netlister driver */
|
|||
record_global_node(2, NULL, NULL); /* delete list of global nodes */
|
||||
top_subckt = 0;
|
||||
spiceprefix=1;
|
||||
bus_replacement_char[0] = bus_replacement_char[1] = '\0';
|
||||
bus_char[0] = bus_char[1] = '\0';
|
||||
hiersep[0]='.'; hiersep[1]='\0';
|
||||
str_tmp = tclgetvar("bus_replacement_char");
|
||||
if(str_tmp && str_tmp[0] && str_tmp[1]) {
|
||||
bus_replacement_char[0] = str_tmp[0];
|
||||
bus_replacement_char[1] = str_tmp[1];
|
||||
bus_char[0] = str_tmp[0];
|
||||
bus_char[1] = str_tmp[1];
|
||||
}
|
||||
netlist_count=0;
|
||||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ void global_tedax_netlist(int global) /* netlister driver */
|
|||
}
|
||||
statusmsg("",2); /* clear infowindow */
|
||||
record_global_node(2, NULL, NULL); /* delete list of global nodes */
|
||||
bus_replacement_char[0] = bus_replacement_char[1] = '\0';
|
||||
bus_char[0] = bus_char[1] = '\0';
|
||||
hiersep[0]='.'; hiersep[1]='\0';
|
||||
str_tmp = tclgetvar("bus_replacement_char");
|
||||
if(str_tmp && str_tmp[0] && str_tmp[1]) {
|
||||
bus_replacement_char[0] = str_tmp[0];
|
||||
bus_replacement_char[1] = str_tmp[1];
|
||||
bus_char[0] = str_tmp[0];
|
||||
bus_char[1] = str_tmp[1];
|
||||
}
|
||||
netlist_count=0;
|
||||
my_snprintf(netl_filename, S(netl_filename), "%s/.%s_%d",
|
||||
|
|
|
|||
|
|
@ -397,6 +397,7 @@ void alloc_xschem_data()
|
|||
xctx->prep_hash_wires = 0;
|
||||
xctx->modified = 0;
|
||||
xctx->netlist_name[0] = '\0';
|
||||
|
||||
for(i=0;i<CADMAXHIER;i++) xctx->sch_path[i]=NULL;
|
||||
my_strdup(1187, &xctx->sch_path[0],".");
|
||||
xctx->sch_inst_number[0] = 1;
|
||||
|
|
|
|||
23
src/xschem.h
23
src/xschem.h
|
|
@ -525,6 +525,9 @@ typedef struct {
|
|||
int prep_hash_wires;
|
||||
int modified;
|
||||
char netlist_name[PATH_MAX];
|
||||
struct instpinentry *instpintable[NBOXES][NBOXES];
|
||||
struct wireentry *wiretable[NBOXES][NBOXES];
|
||||
struct instentry *insttable[NBOXES][NBOXES];
|
||||
} Xschem_ctx;
|
||||
|
||||
struct Lcc { /* used for symbols containing schematics as instances (LCC, Local Custom Cell) */
|
||||
|
|
@ -611,10 +614,6 @@ extern int *enable_layer;
|
|||
extern int n_active_layers;
|
||||
extern int hilight_color;
|
||||
extern int do_print;
|
||||
extern int prepared_netlist_structs;
|
||||
extern int prepared_hilight_structs;
|
||||
extern int prepared_hash_instances;
|
||||
extern int prepared_hash_wires;
|
||||
extern int has_x;
|
||||
extern int no_draw;
|
||||
extern int sym_txt;
|
||||
|
|
@ -648,22 +647,17 @@ extern double cadgrid;
|
|||
extern double cadhalfdotsize;
|
||||
extern int draw_pixmap; /* pixmap used as 2nd buffer */
|
||||
extern int draw_window;
|
||||
extern int need_rebuild_selected_array;
|
||||
extern unsigned int rectcolor;
|
||||
extern XEvent xev;
|
||||
extern KeySym key;
|
||||
extern unsigned short enable_stretch;
|
||||
extern unsigned int button;
|
||||
extern unsigned int state; /* status of shift,ctrl etc.. */
|
||||
extern Selected *selectedgroup; /* array of selected objs to draw while moving */
|
||||
extern int lastselected;
|
||||
extern int currentsch;
|
||||
extern char *xschem_version_string;
|
||||
extern int max_selected;
|
||||
extern int split_files;
|
||||
extern char *netlist_dir;
|
||||
extern char user_top_netl_name[PATH_MAX];
|
||||
extern char bus_replacement_char[];
|
||||
extern char bus_char[];
|
||||
extern char *undo_dirname;
|
||||
extern int cur_undo_ptr;
|
||||
extern int tail_undo_ptr;
|
||||
|
|
@ -676,12 +670,8 @@ extern int yyparse_error;
|
|||
extern char *xschem_executable;
|
||||
extern int depth;
|
||||
extern int *fill_type; /* 20171117 for every layer: 0: no fill, 1, solid fill, 2: stipple fill */
|
||||
extern int areax1,areay1,areax2,areay2,areaw,areah;
|
||||
extern Tcl_Interp *interp;
|
||||
extern XRectangle xrect[];
|
||||
extern int xschem_h, xschem_w; /* 20171130 window size */
|
||||
extern double mousex,mousey; /* mouse coord. */
|
||||
extern double mousex_snap,mousey_snap; /* mouse coord. snapped to grid */
|
||||
extern double cadsnap;
|
||||
extern int horizontal_move;
|
||||
extern int vertical_move;
|
||||
|
|
@ -699,7 +689,6 @@ extern char hiersep[20];
|
|||
extern int quit;
|
||||
extern int show_erc;
|
||||
extern int hilight_nets;
|
||||
extern int modified;
|
||||
extern int color_ps;
|
||||
extern int only_probes;
|
||||
extern int pending_fullzoom;
|
||||
|
|
@ -709,10 +698,6 @@ extern int dark_colorscheme;
|
|||
extern double color_dim;
|
||||
extern int no_undo;
|
||||
extern int enable_drill;
|
||||
extern struct wireentry *wiretable[NBOXES][NBOXES];
|
||||
extern struct instpinentry *instpintable[NBOXES][NBOXES];
|
||||
extern double mx_double_save, my_double_save;
|
||||
extern struct instentry *insttable[NBOXES][NBOXES];
|
||||
extern size_t get_tok_value_size;
|
||||
extern size_t get_tok_size;
|
||||
extern int batch_mode; /* no TCL console */
|
||||
|
|
|
|||
|
|
@ -3289,7 +3289,6 @@ set_ne globfilter {*}
|
|||
## list of tcl procedures to load at end of xschem.tcl
|
||||
set_ne tcl_files {}
|
||||
set_ne netlist_dir "$USER_CONF_DIR/simulations"
|
||||
set_ne user_top_netl_name {}
|
||||
set_ne bus_replacement_char {} ;# use {<>} to replace [] with <> in bussed signals
|
||||
set_ne hspice_netlist 0
|
||||
set_ne top_subckt 0
|
||||
|
|
@ -3961,7 +3960,7 @@ font configure Underline-Font -underline true -size 24
|
|||
}
|
||||
.menubar.simulation.menu add command -label "Set top level netlist name" \
|
||||
-command {
|
||||
input_line {Set netlist file name} {xschem set user_top_netl_name} [xschem get user_top_netl_name] 40
|
||||
input_line {Set netlist file name} {xschem set netlist_name} [xschem get netlist_name] 40
|
||||
}
|
||||
.menubar.simulation.menu add command -label {Configure simulators and tools} -command {simconf}
|
||||
.menubar.simulation.menu add command -label {Utile Stimuli Editor (GUI)} \
|
||||
|
|
|
|||
Loading…
Reference in New Issue