Skip to content

Commit

Permalink
Corrected the MOSFET generated cell drawing routine in magic for
Browse files Browse the repository at this point in the history
sky130 so that unchecking the "top gate contact" and "bottom gate
contact" options works in the case of a narrow gate for which the
drawing routine uses alternating contacts.  Previously, unchecking
these options would have no effect on the drawn layout.
  • Loading branch information
RTimothyEdwards committed Dec 12, 2024
1 parent 0c1df35 commit 4f0439c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.506
1.0.507
11 changes: 9 additions & 2 deletions sky130/magic/sky130.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -6446,6 +6446,11 @@ proc sky130::mos_device {parameters} {
set $key [dict get $parameters $key]
}

# "topc" and "botc" may be modified for alternating top-bottom gate
# contacts. If so, original values are in "oldtopc" and "oldbotc".
if {![dict exists $parameters oldtopc]} {set oldtopc $topc}
if {![dict exists $parameters oldbotc]} {set oldbotc $botc}

# Draw the diffusion and poly
pushbox
box size 0 0
Expand Down Expand Up @@ -6680,7 +6685,7 @@ proc sky130::mos_device {parameters} {
popbox
}
# Top poly contact
if {$topc} {
if {$topc && $oldtopc} {
pushbox
box move n ${hw}um
box move n ${gate_to_polycont}um
Expand Down Expand Up @@ -6718,7 +6723,7 @@ proc sky130::mos_device {parameters} {
popbox
}
# Bottom poly contact
if {$botc} {
if {$botc && $oldbotc} {
pushbox
box move s ${hw}um
box move s ${gate_to_polycont}um
Expand Down Expand Up @@ -6852,6 +6857,8 @@ proc sky130::mos_draw {parameters} {
if {$nf > 1 && $l < $min_allc} {
set intc 1
set evenodd 1
dict set parameters oldtopc $topc
dict set parameters oldbotc $botc
set topc 1
set botc 1
dict set parameters topc 1
Expand Down

0 comments on commit 4f0439c

Please sign in to comment.