aquiles viza
04/09/2024, 9:44 PMum directive/command/string (what's cm?) but that's float point, so it's desirable to avoid doing arithmetic with that, using db coordinates instead.
How could I do it? for example, turning overlap=0.19um into an integer.
I want something tech agnostic, tech lambda just gives 1 2aquiles viza
04/09/2024, 10:55 PMbox 0 0 1um 1um
set um2db [expr int ([box width] * [lindex [tech lambda] 0] / [lindex [tech lambda] 1])]Tim Edwards
04/10/2024, 12:25 AMaquiles viza
04/10/2024, 4:06 AMexpr int([magic::u2i 0.19]) ; $ 38Tim Edwards
04/10/2024, 1:24 PMaquiles viza
04/10/2024, 6:25 PMmagic and then source a file that uses magic::u2i or something similar, it works as expected, but if I run magic <tclfile> then it don't recognizes the command. Also, the graphical interfaces has a different format.Tim Edwards
04/10/2024, 7:24 PMmagic::u2i is defined inside the sky130 device generator script, which is sourced from the sky130 startup script for magic.
If you run magic <tclfile>, then you should either load the device generator script from your <tclfile> script or else start magic with magic -rcfile $PDK_ROOT/sky130A/libs.tech/magic/sky130.magicrc <tclfile>.aquiles viza
04/10/2024, 7:27 PMsky130A.magicrc . I think this problem could be related to not sourcing files on usr/lib/magic/tcl/Tim Edwards
04/10/2024, 7:29 PM.magicrc file from a script. The problem is in the order in which things get read and executed. The .magicrc file is run before any of the GUI is set up. If you let magic start up and then source the .magicrc file, then many of the commands will not apply to the existing layout window. They might work if you closed the layout window and started a new one. The better option is to use the -rcfile option on the command line.Tim Edwards
04/10/2024, 7:31 PM.magicrc in the directory where you launch magic, and it will get read just like passing -rcfile .magicrc on the command line.aquiles viza
04/10/2024, 7:37 PM-rcfile as follows
$ magic -rcfile ../../magicrc # Pointing to PDK_ROOT/sky130A/libs.tech/...
> source INV.tcl
< (it works)
$ magic -rcfile ../../magicrc INV.tcl
< Error parsing "INV.tcl": invalid command name "magic::u2l"
< Main console display active (Tcl8.6.13 / Tk8.6.13)
< (it don't works)Tim Edwards
04/10/2024, 7:42 PMTim Edwards
04/10/2024, 7:44 PMTim Edwards
04/10/2024, 9:08 PMTim Edwards
04/11/2024, 12:58 AMaquiles viza
04/11/2024, 1:57 AMmagic a better tool.Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.
Powered by