<@U016EM8L91B> Hello, i have seemingly run into a ...
# magic
s
@Tim Edwards Hello, i have seemingly run into a bug where magic seems to be modifying device parameters by 5nm at random. For example I create a device with the device generator with 150nm channel length and some width and number of fingers. The device generated is true to those values. I place it among with others and wire them all up. This file is drc clean and lvs checks out. I then "getcell" two copies of this file as subcircuits in another file. At first all is well and I start adding other devices and wiring them together. At "random" I will place or rotate a device like a resistor, independent of everything else, not wired or even close to anything, and hundreds of drc errors appear. I found that these errors appear in my two subcircuits which where drc clean until now. Going to their file and checking the layout, there are initially no errors, but moving anything one lambda and then back shows tens or hundreds of errors. Specifically transistors are stretched and squished by 5 nm at random. For example, a 5 finger transistor with 150 nm channel length now has the first 2 channels at 155nm the third at 150, the forth at 145 and the fifth at 155. This happens to all of the devices generated which have their own .mag file. To solve this I delete the instances from the layout, and also delete the .mag files of the devices from the folder so new ones can be created. I don't think I am causing it through ignorance since its pretty difficult to accidentally edit the subcell of each one so symmetrically. It happened three times but now I can't replicate it. I'm not sure what to do apart from keeping regular backups. I should mention that when i rotate a device and that causes the drc errors/device changes, I can rotate it back and they go away. So basically there's me pressing R repeatedly on a resistor or something and seeing the drc status go from a green 0 to a red 176 and back. Any info on this would be much appreciated.
t
Sounds weird, although when errors show up at 5nm (minimum grid) spacing, I tend to suspect a problem with the minimum grid. On sky130, the default grid is 10nm, and the startup script (.magicrc) does a 1:2 scaling to make it 5nm. If you didn't start magic with the startup script, you'd end up with a 10nm grid, and generated devices could have geometry off by 5nm. I'm not sure why that would change depending on orientation, though.
a
maybe a small rotations puts it off grid?
m
Weird, I think that I have also seen those 5nm shifts after moving pcells/mimcaps. Internal is 5nm using a docker container. I just found a reproducible way to "delete" a metal1 rectangle with
move
, could there be a relation? Open magic,
box size 5nm 5nm
,
paint metal1
,
select area
,
move n 20nm
,
move s 20nm