Nelson Rodriguez
09/01/2022, 1:01 AMArman Avetisyan
09/01/2022, 6:28 AMMatt Liberty
09/01/2022, 1:36 PMNelson Rodriguez
09/01/2022, 2:58 PMMatt Liberty
09/01/2022, 4:42 PMMatt Liberty
09/01/2022, 4:42 PMMatt Liberty
09/01/2022, 4:43 PMNelson Rodriguez
09/01/2022, 9:10 PMMatt Liberty
09/01/2022, 9:11 PMMatt Liberty
09/01/2022, 9:12 PMNelson Rodriguez
09/01/2022, 9:13 PMMatt Liberty
09/01/2022, 9:14 PMMatt Liberty
09/01/2022, 9:15 PMNelson Rodriguez
09/01/2022, 9:15 PMMatt Liberty
09/01/2022, 9:17 PMNelson Rodriguez
09/01/2022, 9:17 PMMatt Liberty
09/01/2022, 9:18 PMMatt Liberty
09/01/2022, 9:18 PMNelson Rodriguez
09/01/2022, 9:19 PMTim Edwards
09/01/2022, 9:21 PMgrid
command is one way---set the grid to be aligned with the standard cell tracks (grid <x> <y> <xoffset> <yoffset>
). You could also parse the tracks from a DEF file and convert them into lines in the layout using the element
command, and it wouldn't be too difficult to make that an option of def read
(but would need to be coded).Tim Edwards
09/01/2022, 9:23 PMgrid
also has the benefit that you can do snap grid
and automatically snap instances to the tracks, although normally you wouldn't be doing that manually. But if you were trying, for example, to align a handful of standard cells in an analog layout, it would work well.Matt Liberty
09/01/2022, 9:24 PMNelson Rodriguez
09/01/2022, 9:27 PMTim Edwards
09/01/2022, 9:30 PMgrid
and element
commands work well, although you would not want to use snap grid
because the grid would only be for a reference. The element
lines will show up better. http://opencircuitdesign.com/magic/commandref/element.html . e.g., element add line track_bottom black 0 0 200 0
. I never noticed before that the element
command doesn't take unit-valued measurements. I'll need to fix that.Nelson Rodriguez
09/01/2022, 9:34 PMNelson Rodriguez
09/02/2022, 1:25 AM0.14um
) for the vertical tracks and the minimum metal-2 length (0.14um
too) for the horizontal tracks.
Then I started drawing line by line trying to match them to the grid (just to make sure the space between lines) and found that to place one line element in 0.28um
with respect to other, I had to put a distance of 28
between them, so there was a ratio of 0.01um
per 1
for the line elements:
element add line track_1 0 0 364 0
element add line track_2 0 28 364 28
I wanted to add an image of the drawing but after saving the file and opening it again, the lines disappeared, don't know why (?)
2) After this issue, I thought to automate the process writing a tcl script with the grid pattern, so I wrote this:
#!/usr/bin/tclsh
openwrapper
tech load sky130A.tech
# vertical tracks
element add line tm1_vcc black 0 0 364 0
element add line tm1_1 black 0 28 364 28
element add line tm1_2 black 0 56 364 56
element add line tm1_3 black 0 84 364 84
element add line tm1_4 black 0 112 364 112
element add line tm1_5 black 0 140 364 140
element add line tm1_6 black 0 168 364 168
element add line tm1_7 black 0 196 364 196
element add line tm1_8 black 0 224 364 224
element add line tm1_9 black 0 252 364 252
element add line tm1_10 black 0 280 364 280
element add line tm1_11 black 0 308 364 308
element add line tm1_12 black 0 336 364 336
element add line tm1_vdd black 0 364 364 364
# horizontal tracks
element add line tm2_left black 0 0 0 364
element add line tm2_1 black 28 0 28 364
element add line tm2_2 black 56 0 56 364
element add line tm2_3 black 84 0 84 364
element add line tm2_4 black 112 0 112 364
element add line tm2_5 black 140 0 140 364
element add line tm2_6 black 168 0 168 364
element add line tm2_7 black 196 0 196 364
element add line tm2_8 black 224 0 224 364
element add line tm2_9 black 252 0 252 364
element add line tm2_10 black 280 0 280 364
element add line tm2_11 black 308 0 308 364
element add line tm2_12 black 336 0 336 364
element add line tm2_vdd black 364 0 364 364
But when I run it doing magic script.tcl
two windows are opening, one of them empty and the other without the layers left-hand side panel. Could you please point me out the errors?Tim Edwards
09/02/2022, 1:36 AMopenwrapper
line at the top, which is generating the 2nd window. Instead of loading the technology inside the script, just start magic with the usual startup script and the extra script (e.g., magic -d OGL -rcfile /path/to/sky130A.magicrc script.tcl
, or just source the extra script at any time from the console command line with source script.tcl
.Tim Edwards
09/02/2022, 1:39 AM-rcfile /path/to/sky130A.magicrc
then the internal units are subdivided which will make the values equal to 0.005um
per 1
. I have fixed the issue in magic and pushed to opencircuitdesign.com (not yet mirrored to github) so that subsequent versions of magic will just take real-valued units for the element measurements. For the version you have now, you'll have to put up with internal units that can change with grid scaling.Tim Edwards
09/02/2022, 1:42 AM<< elements >>
in the saved .mag file?Nelson Rodriguez
09/02/2022, 2:13 AMmagic -d OGL -rcfile /path/to/sky130A.magicrc script.tcl
but my magic current version seems to be outdated so I'm compiling the version from the OCD site. Just one question, when I compile magic again, will it overwrite the previous bin and lib files? or I have to delete them manually before to compile the newer version?Nelson Rodriguez
09/02/2022, 2:53 AMmagic -d OGL -rcfile /path/to/sky130A.magicrc script.tcl
and it works [fig 1] in my case script.tcl
is called cell12t_template.tcl
but, is it normal that the right-hand side panel appears in that way, with all boxes colored in black?
And you're right, because I used the rcfile
, the ratio is now 0.005um
per 1
which is the half I had previously, and that's why my tracks are now spaced 0.14um
and not 0.28um
[fig 2]
Finally, I saved a test.mag
file to check if there was a << elements >>
section in the .mag file, but no [Fig 3]Tim Edwards
09/02/2022, 1:30 PMconfigure --enable-cairo-offscreen
option enabled, and rebuild with make clean ; make
. It is a pretty common limitation for video card OpenGL implementations not to allow off-screen rendering.Tim Edwards
09/02/2022, 1:36 PMelement add line <name>
command, issue a 2nd command element configure <name> flags persistent
, and it will get saved to the .mag file.Nelson Rodriguez
09/03/2022, 10:13 AMLinen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.
Powered by