Hello everyone, one question, I'm working with standard cells and I was wondering , if it's possible...
n
Hello everyone, one question, I'm working with standard cells and I was wondering , if it's possible to draw reference lines to represent the tracks of my cell. I've been looking for in some tutorials but I couldn't find nothing about it. Thanks.
a
what foes the reference lines mean?
m
In the GUI there is an option to draw tracks which you can turn on (in the display controls)
n
@Arman Avetisyan Yes I was referring to tracks. @Matt Liberty hey thanks, but could you indicate me the menu tab that has the option?
m
image.png
the layers drawn are controlled by the layer visibility
you'll need to zoom in to see them as fully zoomed out they are too dense and we skip them
n
@Matt Liberty sorry for asking again, but the image you attached here, is from Magic?? I couldn't find that Display Control 😓 I checked all tabs (File, Edit, Cell, Window, Layers, Drc, Options) but nothing.
m
No openroad's gui. I doubt magic has any way to show tracks as it is a gds tool and tracks don't exist in gds
😯 1
@Tim Edwards does magic have a way to show routing tracks?
n
Matt, can I design my cells using openroad GUI?
m
are you using openlane?
ie the P&R flow
n
Yes, but I thought to make layouts we only had magic
m
What sort of "cells" are you designing? Custom layout needs to be done in magic (or klayout). Synthesis from RTL goes through OpenRoad
n
Standard cells (inv, nand, nor, etc)
m
you'll have to use magic for that
Sorry I'm no magic expert but Tim Edwards is the maintainer
🍺 1
n
Ok, thanks for all 👍🏻 yeah, I'm sure he knows the answer.
t
@Matt Liberty: There are various ways you can show routing tracks. The
grid
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).
👍 2
Using
grid
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.
👍 1
m
That makes sense - you can manually tune a grid to match the expect tracks
👍 1
n
I'll play with the grid for now. Then I'll check that element command, if there is code to do, it sounds interesting. Thanks a lot to both @Tim Edwards @Matt Liberty
t
But I gather that what @Nelson Rodriguez is looking for is to draw reference lines for the tracks as a guide for the layout of the standard cell. In that case, the
grid
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.
n
That's right. I was checking that command too in the ocd site. I've just add the line you wrote in my console window and works excellent!!
@Tim Edwards It seems to work. I was drawing the tracks based on the minimum metal-1 length (
0.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:
Copy code
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:
Copy code
#!/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?
t
I think I have never added a method to save elements into a cell; they are considered transient. What you're doing is fine; just remove the
openwrapper
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
.
Also if you use
-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.
Actually I did code in a method to save elements to a file and read them back. It has not been very well tested. Is there a section
<< elements >>
in the saved .mag file?
n
Tim give me a minute, I was running
magic -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?
Ok @Tim Edwards I deleted the bin and lib files before compiling the newest version of magic and run
magic -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]
t
@Nelson Rodriguez: If the icon boxes are all black, make sure you have the cairo graphics library (development) package installed, and use the
configure --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.
@Nelson Rodriguez: And I obviously don't use this function much, because I've forgotten how it works. After every
element add line <name>
command, issue a 2nd command
element configure <name> flags persistent
, and it will get saved to the .mag file.
n
1. Issue with panel of layers, solved 2. How to keep elements, solved. Thank you Tim.