added "xschem setprop symbol" command, updated docs
This commit is contained in:
parent
728cfb22fc
commit
ca0708a4c3
|
|
@ -479,6 +479,9 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
Include ~/xxx here between <ul> and </ul>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<li><kbd> abort_operation</kbd></li><pre>
|
||||
Resets UI state, unselect all and abort any pending operation </pre>
|
||||
<li><kbd> add_symbol_pin</kbd></li><pre>
|
||||
|
|
@ -638,7 +641,9 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
<li><kbd> yorigin </kbd> y coordinate of origin </li>
|
||||
<li><kbd> zoom </kbd> zoom level </li>
|
||||
</ul>
|
||||
<li><kbd> getprop instance inst </kbd></li><pre>
|
||||
<li><kbd> getprop instance|instance_pin|symbol|text ref </kbd></li><pre>
|
||||
|
||||
getprop instance inst
|
||||
Get the full attribute string of 'inst'
|
||||
|
||||
getprop instance inst attr
|
||||
|
|
@ -666,6 +671,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
getprop symbol sym_name sym_attr [with_quotes]
|
||||
Get value of attribute 'sym_attr' of symbol 'sym_name'
|
||||
'with_quotes' (default:0) is an integer passed to get_tok_value()
|
||||
|
||||
getprop rect layer num attr
|
||||
Get attribute 'attr' of rectangle number 'num' on layer 'layer'
|
||||
|
||||
|
|
@ -1031,18 +1037,27 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
different between 'new_str' and 'old_str' </pre>
|
||||
<li><kbd> set_modify</kbd></li><pre>
|
||||
Force modify status on current schematic </pre>
|
||||
<li><kbd> setprop instance inst tok [val] [fast]</kbd></li><pre>
|
||||
<li><kbd> setprop instance|symbol|text|rect ref tok [val] [fast]</kbd></li><pre>
|
||||
|
||||
setprop instance inst tok [val] [fast]
|
||||
set attribute 'tok' of instance (name or number) 'inst' to value 'val'
|
||||
If 'val' not given (no attribute value) delete attribute from instance
|
||||
If 'fast' argument if given does not redraw and is not undoable
|
||||
|
||||
setprop symbol name tok [val]
|
||||
Set attribute 'tok' of symbol name 'name' to 'val'
|
||||
If 'val' not given (no attribute value) delete attribute from symbol
|
||||
|
||||
setprop rect lay n tok [val] [fast|fastundo]
|
||||
Set attribute 'tok' of rectangle number'n' on layer 'lay'
|
||||
If 'val' not given (no attribute value) delete attribute from rect
|
||||
If 'fast' argument is given does not redraw and is not undoable
|
||||
If 'fastundo' s given same as above but action is undoable.
|
||||
|
||||
setprop rect 2 n fullxzoom
|
||||
setprop rect 2 n fullyzoom
|
||||
These commands do full x/y zoom of graph 'n' (on layer 2, this is hardcoded).
|
||||
|
||||
setprop text n tok [val] [fast|fastundo]
|
||||
Set attribute 'tok' of text number 'n'
|
||||
If 'val' not given (no attribute value) delete attribute from text
|
||||
|
|
@ -1143,6 +1158,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
<li><kbd> zoom_selected</kbd></li><pre>
|
||||
Zoom to selection </pre>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- TCL global variables -->
|
||||
|
|
|
|||
|
|
@ -1066,7 +1066,9 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
}
|
||||
}
|
||||
/************ end xschem get subcommands *************/
|
||||
/* getprop instance inst
|
||||
/* getprop instance|instance_pin|symbol|text ref
|
||||
*
|
||||
* getprop instance inst
|
||||
* Get the full attribute string of 'inst'
|
||||
*
|
||||
* getprop instance inst attr
|
||||
|
|
@ -1094,6 +1096,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
* getprop symbol sym_name sym_attr [with_quotes]
|
||||
* Get value of attribute 'sym_attr' of symbol 'sym_name'
|
||||
* 'with_quotes' (default:0) is an integer passed to get_tok_value()
|
||||
*
|
||||
* getprop rect layer num attr
|
||||
* Get attribute 'attr' of rectangle number 'num' on layer 'layer'
|
||||
*
|
||||
|
|
@ -3195,18 +3198,27 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
}
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
/* setprop instance inst tok [val] [fast]
|
||||
/* setprop instance|symbol|text|rect ref tok [val] [fast]
|
||||
*
|
||||
* setprop instance inst tok [val] [fast]
|
||||
* set attribute 'tok' of instance (name or number) 'inst' to value 'val'
|
||||
* If 'val' not given (no attribute value) delete attribute from instance
|
||||
* If 'fast' argument if given does not redraw and is not undoable
|
||||
*
|
||||
* setprop symbol name tok [val]
|
||||
* Set attribute 'tok' of symbol name 'name' to 'val'
|
||||
* If 'val' not given (no attribute value) delete attribute from symbol
|
||||
*
|
||||
* setprop rect lay n tok [val] [fast|fastundo]
|
||||
* Set attribute 'tok' of rectangle number'n' on layer 'lay'
|
||||
* If 'val' not given (no attribute value) delete attribute from rect
|
||||
* If 'fast' argument is given does not redraw and is not undoable
|
||||
* If 'fastundo' s given same as above but action is undoable.
|
||||
*
|
||||
* setprop rect 2 n fullxzoom
|
||||
* setprop rect 2 n fullyzoom
|
||||
* These commands do full x/y zoom of graph 'n' (on layer 2, this is hardcoded).
|
||||
*
|
||||
* setprop text n tok [val] [fast|fastundo]
|
||||
* Set attribute 'tok' of text number 'n'
|
||||
* If 'val' not given (no attribute value) delete attribute from text
|
||||
|
|
@ -3285,6 +3297,32 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
}
|
||||
Tcl_SetResult(interp, xctx->inst[inst].instname , TCL_VOLATILE);
|
||||
}
|
||||
} else if(argc > 2 && !strcmp(argv[2], "symbol")) {
|
||||
/* 0 1 2 3 4 5
|
||||
* xschem setprop symbol name token [value] */
|
||||
|
||||
int i, found=0;
|
||||
xSymbol *sym;
|
||||
if(argc < 4) {
|
||||
Tcl_SetResult(interp, "xschem setprop symbol needs 1 or 2 or 3 additional arguments", TCL_STATIC);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for(i=0; i<xctx->symbols; ++i) {
|
||||
if(!xctx->x_strcmp(xctx->sym[i].name,argv[3])){
|
||||
found=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
Tcl_SetResult(interp, "Symbol not found", TCL_STATIC);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
sym = &xctx->sym[i];
|
||||
if(argc > 5)
|
||||
my_strdup2(_ALLOC_ID_, &sym->prop_ptr, subst_token(sym->prop_ptr, argv[4], argv[5]));
|
||||
else
|
||||
my_strdup2(_ALLOC_ID_, &sym->prop_ptr, subst_token(sym->prop_ptr, argv[4], NULL)); /* delete attr */
|
||||
|
||||
} else if(argc > 5 && !strcmp(argv[2], "rect")) {
|
||||
/* 0 1 2 3 4 5 6 7
|
||||
* xschem setprop rect c n token [value] [fast|fastundo] */
|
||||
|
|
|
|||
Loading…
Reference in New Issue