Hi, I am trying to do the layout of this circuit i...
# magic
f
Hi, I am trying to do the layout of this circuit in magic using Tcl script. I found this script, but I don't understand which "place_nmos" / "place_pmos" correspond to. Someone can help me how identify it?
t
An important question is where did you "find" this Tcl script? It's not one of mine, and it doesn't belong to the PDK scripts that come with open_pdks. It is presumably intended to work within some system that has defined Tcl procedures for
place_nmos
and
place_pmos
, unless those procedures are defined earlier in your script.
f
t
Thanks, that makes more sense. The script is using the cell generators in the magic PDK. It's a pretty complicated script that encodes the layout of an analog bias circuit, but is dependent on existing cells such as
cascode_bias
and
folded_cascode_p_in_stripped
which may have been created by hand or by other scripts. The
place_nmos
and
place_pmos
procedures are defined at the top of the script, and the arguments are
x_center y_center width length nf index
, where dimension values are in microns.
f
Okay, but I don't understand where are placed the mos in the schematic view. For example, M1 where is?
Here I have another script with the schematic view, how I can identify mosfet from layout to schematic?
t
There is no obvious relationship between the schematic and script, so I don't know if there is an exact correspondence. The
index
argument to
place_nmos
or
place_pmos
is creating a device with the given index for the instance name (i.e., use index
1
for device
M1
in the schematic, which would then have the instance name
M1
in the layout. But by placing an entire cell called
cascode_bias
, it's clear that the hierarchy of the layout does not match the schematic even if the circuit does match, so there will not be a 1:1 match of device instances between the schematic and layout.
f
Okay, so If I want correct my script to match schematic I can use:
place_pmos x0 y0 5 1 10 16
for M16 mosfet ?