I am using magic to create a mask set for a contac...
# magic
d
I am using magic to create a mask set for a contact aligner. It consists primarily of MOSFET of different sizes that could be used to create a spice desk for design. I have created a TCL script that creates the most fet with a width and length, puts the FET to a mini pad frame, and labels the W/L and the source-drain and gate connect sections (The body is on the back of the wafer. While we put this into a procedure and make an array of these structures, I would rather save each structure as its own cell and then use another script to assemble them. I want to run a for loop through the widths and lengths, but I can not seem to figure out how to save a cell, delete the cell, or write a new cell. (It overwrites things.) I tried to flush, selecting everything, and erasing new windows. Do I need to write a script that opens magic writers to the new cell and then closes magic? This is my own nmos process, but I am using scmos with an rcfile to start the tool. I have tried looking at the sky130 pdf tcl and python commands. (This is part of a project where I teach layout to lower-division students. I like magic because of the instant DRC checking.)
t
If you can share the Tcl script, I can help you debug the issues. If you want to create a new cell, just use
load
with a new cell name; then your script can draw into that.
save <cellname>
will write the file if it has not been created yet; otherwise use
writeall force <cellname>
. There is usually no reason to delete a cell in magic's in-memory database unless you're doing something like replacing a cell with a flattened version of itself. If you're trying to delete a cell from disk, there's the Tcl
file delete ...
command.
d
It worked! Here is a simple script to test the idea: Thanks.
for {set i 10} {$i <15 } {incr i} { puts "I inside first loop: $i" set cell_name ./mag/${i}_test.mag load $cell_name box 0 0 $i $i paint metal1 save ./mag/$cell_name }