https://open-source-silicon.dev logo
Channels
aa
abcc
activity
adiabatonauts
analog-design
announce
announcements
b2aws
b2aws-tutorial
bag
basebands
beagleboard
bluetooth
board-respin
cadence-genus
cadence-innovus
cadence-spectre
cadence-virtuoso
caravan
caravel
caravel-board
chilechipmakers
chip-yard
chipignite
chipignite2206q_stanford_bringup
chisel
coalition-for-digital-environmental-sustainability
community_denmark_dtu
containers
courses
design-review
design-services
dffram
digital-design
digital-electronics-learners
discord-mods
dynamic-power-estimation
efabless
electric
events
fasoc
fault
foss-asic-tools
fossee-iitb-esim
fossee-iitb-google-sky130
fpga
funding
fuserisc
general
generative-ai-silicon-challenge
genius-vlsi
gf180
gf180mcu
hardware-beginners
help-
ieee-sscs-cac-23
ieee-sscs-dc-21q3
ieee-sscs-dc-22
ieee-sscs-dc-23
ihp-sg13g2
images
infiniband
j-core
japan-region
junk
klayout
latam_vlsi
layouteditor
lvs
lvs-analysis
magic
magical
maker-projects
maker-zone
microwatt
mpw-2-silicon
mpw-one-clean-short
mpw-one-silicon
neuro-mem
nydesign
open_pdks
open-pdk
openadiabaticlogic
openfpga
openhighqualityresonators
openlane
openlane_cloudrunner
openlane-development
openocd
openpositarithmetic
openpower
openram
openroad
opentitan
osu
pa-test-chip
paracells
pd-openlane-and-sky130
picosoc
pll
popy_neel
power
private-shuttle
rad-lab-silicon
radio
rdircd
reram
researchers
rf-mmw-design
rios
riscv
sdram
serdes
shuttle
shuttle-precheck
shuttle-status
silicon-photonics
silicon-validation
silicon-validation-private
sky130
sky130-ci
sky130-pv-workshop
sky65
sky90
skywater
sram
stdcelllib
strive
swerv
system-verilog-learners
tapeout-job
tapeout-pakistan
team-awesome
timing-closure
toysram
travis-ci
uvm-learners
vendor-synopsys
venn
verification-be
verification-fe
verilog-learners
vh2v
vhdl
vhdl-learners
vliw
vlsi_verilog_using_opensource_eda
vlsi_verilog_using_opensoure_eda
vlsi-learners-group
vlsi101
waveform-viewers
xls
xschem
xyce
zettascale
Powered by
Title
n

Nelson Rodriguez

02/21/2023, 9:24 PM
Hi all, I am using a template to use as a guide while drawing. The smallest square is 0.28um x 0.28um [Fig 1]. I started working with a 0.005um x 0.005um grid and apparently the template changed its dimension by half [Fig 2] I measured the smallest cell and it gave me 0.14um x 0.14um, why did that happen?
t

Tim Edwards

02/21/2023, 10:35 PM
How did you make your template grid?
If you want a grid to design to, you can just do
grid 0.28um 0.28um
(you can add two more coordinates for offsets if you need to line it up correctly with your drawing).
n

Nelson Rodriguez

02/22/2023, 1:13 AM
@Tim Edwards you helped me drawing those lines, check this thread if you want.
t

Tim Edwards

02/22/2023, 1:17 AM
Ah. The problem is that the elements are specified in internal units. Instead, specify the element lines as physical units:
element add line track_1 0 0 3.64um 0
element add line track_2 0 0.28um 3.64um 0.28um
Then the distances should continue to track if you change the internal scale. If you're saving the elements in a .mag file and reading them back and they're changing scale, then let me know.
n

Nelson Rodriguez

02/22/2023, 2:11 AM
Tim, it's not working, I changed the extension to
.mag
and tried to source it
source ./template.mag
but nothing. Here is the code
# grid setup
grid 0.005um 0.005um
snap grid

# vertical tracks
element add line tm1_vcc black 0 0 364um 0
element add line tm1_1 black 0 28um 364um 28um
element add line tm1_2 black 0 56um 364um 56um
element add line tm1_3 black 0 84um 364um 84um
element add line tm1_4 black 0 112um 364um 112um
element add line tm1_5 black 0 140um 364um 140um
element add line tm1_6 black 0 168um 364um 168um
element add line tm1_7 black 0 196um 364um 196um
element add line tm1_8 black 0 224um 364um 224um
element add line tm1_9 black 0 252um 364um 252um
element add line tm1_10 black 0 280um 364um 280um
element add line tm1_11 black 0 308um 364um 308um
element add line tm1_12 black 0 336um 364um 336um
element add line tm1_vdd black 0 364um 364um 364um

# horizontal tracks
element add line tm2_left black 0 0 0 364um
element add line tm2_1 black 28um 0 28um 364um
element add line tm2_2 black 56um 0 56um 364um
element add line tm2_3 black 84um 0 84um 364um 
element add line tm2_4 black 112um 0 112um 364um
element add line tm2_5 black 140um 0 140um 364um
element add line tm2_6 black 168um 0 168um 364um
element add line tm2_7 black 196um 0 196um 364um
element add line tm2_8 black 224um 0 224um 364um
element add line tm2_9 black 252um 0 252um 364um 
element add line tm2_10 black 280um 0 280um 364um
element add line tm2_11 black 308um 0 308um 364um 
element add line tm2_12 black 336um 0 336um 364um 
element add line tm2_vdd black 364um 0 364um 364um
It's like adding
um
or
u
generates an error or block the command:
@Tim Edwards While you help me with that, I created a script to generate a custom template, printing lines in internal units. In this case I had to double 0.28, drawing lines with a separation of 56.
t

Tim Edwards

02/22/2023, 2:10 PM
It's not adding the "um" that is causing the problem. It seems to be an integer overflow in the command or something like that.
element add line tm2_1 black 0.28um 0 0.28um 3.64um
works, but
element add line tm2_1 black 28um 0 28um 364um
does not. I think it should be easy to track down and fix. Meanwhile, your workaround is fine, as long as you understand what the scaling problem is.
I take that back; the line was there but was off-screen and I didn't zoom out enough to see it.
n

Nelson Rodriguez

02/23/2023, 8:44 PM
@Tim Edwards I found that with
scalegrid
I can set the magic internal units to be equal to lambda units. To check the current relation I type
scalegrid 1 1
if my ratio is
2 internal units : 1 lambda
, then I type
scalegrid 2 1
, to finally get
1 : 1.
I would like to know if everytime I open magic the ratio is set as
2 internal units : 1 lambda
. Having that
1 : 1
, when drawing the template, everything works. Also, I wanted to create a script to create custom standard cell templates to draw above it, setting the grid to
0.005 um 0.005 um
and the scalegrid to
1 : 1
but I would like to know if its possible to send to it the current ratio between the internal units and lambda, so I convert it to
1:1
with the script. I attach the script.
t

Tim Edwards

02/23/2023, 10:05 PM
The
tech lambda
command returns a list representing the scale numerator and denominator in a 2-value list (the numerator, denominator format allows the internal units to be larger than or smaller than lambda without requiring floating point). The two values you would need for any scaling would be
cif scale out
(to convert between internal units and microns, although beware that is in floating point and subject to round-off error), and
tech lambda
.
You can leave everything in your python script in microns and just change the
f.write
lines to:
f.write(f"element add line track_height_{i} black 0 {i*hp}um {(wt-1)*wp}um {i*hp}um\n")
and
f.write(f"element add line track_width_{i} black {i*wp}um 0 {i*wp}um {(ht-1)*hp}um\n")
(i.e., add
um
after every non-zero coordinate).
n

Nelson Rodriguez

02/24/2023, 2:04 AM
@Tim Edwards it works! It wasn't working because my last update of magic was in september 🤦‍♂️🏼