Is there an easier way to update all the annotations in a schematic? I want to annotate id, vdsat, etc. for all the devices in a circuit but it has changed from being subckt 1 in my toplevel testbench to subckt 2. Can I edit all these
i(@m.x1.xm1.msky130_fd_pr_pfet___g5v0d10v5[id])
at once without having to go back in and change them to x2 one by one?
🌍 1
m
Mitch Bailey
03/20/2023, 9:20 PM
xschem files are just text files, so you can use any *nix commands.
sed -i.bak 's/\.x1\./.x2./g' *.sch
should change all the
.x1.
to
.x2.
while saving a backup copy of each file in
filenam.bak
.
👍 1
s
Stefan Schippers
03/21/2023, 9:32 PM
@Mariana Huerta, @Mitch Bailey solution is perfect.
You can also add the
${path}
construct that represent the hierarchy above the current circuit.
If your hierarchy changes from .x1 to .x2 the
path
variable will be automatically updated. The additional advantage is that if you have two instances of the same circuit, using
${path}
instead of .x1 or .x2 allows each instance to update its own voltages.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.