added "xschem reset_flags" command to update and sync cached attributes of symbols and instances

This commit is contained in:
stefan schippers 2023-05-19 10:08:43 +02:00
parent df2111c277
commit 827d4c5aac
2 changed files with 18 additions and 0 deletions

View File

@ -481,6 +481,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
<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>
@ -962,6 +963,8 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
on first call and non zero on next calls
for faster operation
Example: xschem replace_symbol R3 capa.sym </pre>
<li><kbd> reset_flags</kbd></li><pre>
Reset cached instance and symbol cached flags (inst-&gt;flags, sym-&gt;flags) </pre>
<li><kbd> rotate</kbd></li><pre>
Rotate selected objects around their centers </pre>
<li><kbd> save</kbd></li><pre>
@ -1172,6 +1175,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
Zoom to selection </pre>
</ul>
<!-- TCL global variables -->

View File

@ -2901,6 +2901,20 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
}
}
/* reset_flags
* Reset cached instance and symbol cached flags (inst->flags, sym->flags) */
else if(!strcmp(argv[1], "reset_flags"))
{
int i;
for(i = 0; i < xctx->instances; i++) {
set_inst_flags(&xctx->inst[i]);
}
for(i = 0; i < xctx->symbols; i++) {
set_sym_flags(&xctx->sym[i]);
}
Tcl_ResetResult(interp);
}
/* rotate
* Rotate selected objects around their centers */
else if(!strcmp(argv[1], "rotate"))