mirror of https://github.com/VLSIDA/OpenRAM.git
Small format cleanup
This commit is contained in:
parent
da334e47aa
commit
3074cf3b86
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
import contact
|
import contact
|
||||||
import debug
|
import debug
|
||||||
from tech import drc, parameter
|
from tech import drc, parameter, layer
|
||||||
from vector import vector
|
from vector import vector
|
||||||
from ptx import ptx
|
from ptx import ptx
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
|
|
@ -975,42 +975,44 @@ class pbitcell(bitcell_base.bitcell_base):
|
||||||
"""
|
"""
|
||||||
Connects wells between ptx modules and places well contacts
|
Connects wells between ptx modules and places well contacts
|
||||||
"""
|
"""
|
||||||
# extend pwell to encompass entire nmos region of the cell up to the
|
if "pwell" in layer:
|
||||||
# height of the tallest nmos transistor
|
# extend pwell to encompass entire nmos region of the cell up to the
|
||||||
max_nmos_well_height = max(self.inverter_nmos.well_height,
|
# height of the tallest nmos transistor
|
||||||
self.readwrite_nmos.well_height,
|
max_nmos_well_height = max(self.inverter_nmos.well_height,
|
||||||
self.write_nmos.well_height,
|
self.readwrite_nmos.well_height,
|
||||||
self.read_nmos.well_height)
|
self.write_nmos.well_height,
|
||||||
well_height = max_nmos_well_height + self.port_ypos \
|
self.read_nmos.well_height)
|
||||||
- self.nwell_enclose_active - self.gnd_position.y
|
well_height = max_nmos_well_height + self.port_ypos \
|
||||||
# FIXME fudge factor xpos
|
- self.nwell_enclose_active - self.gnd_position.y
|
||||||
well_width = self.width + 2*self.nwell_enclose_active
|
# FIXME fudge factor xpos
|
||||||
offset = vector(self.leftmost_xpos - self.nwell_enclose_active, self.botmost_ypos)
|
well_width = self.width + 2*self.nwell_enclose_active
|
||||||
self.add_rect(layer="pwell",
|
offset = vector(self.leftmost_xpos - self.nwell_enclose_active, self.botmost_ypos)
|
||||||
offset=offset,
|
self.add_rect(layer="pwell",
|
||||||
width=well_width,
|
offset=offset,
|
||||||
height=well_height)
|
width=well_width,
|
||||||
|
height=well_height)
|
||||||
|
|
||||||
# extend nwell to encompass inverter_pmos
|
# extend nwell to encompass inverter_pmos
|
||||||
# calculate offset of the left pmos well
|
# calculate offset of the left pmos well
|
||||||
inverter_well_xpos = -(self.inverter_nmos.active_width + 0.5 * self.inverter_to_inverter_spacing) \
|
if "nwell" in layer:
|
||||||
- self.nwell_enclose_active
|
inverter_well_xpos = -(self.inverter_nmos.active_width + 0.5 * self.inverter_to_inverter_spacing) \
|
||||||
inverter_well_ypos = self.inverter_nmos_ypos + self.inverter_nmos.active_height \
|
- self.nwell_enclose_active
|
||||||
+ self.inverter_gap - self.nwell_enclose_active
|
inverter_well_ypos = self.inverter_nmos_ypos + self.inverter_nmos.active_height \
|
||||||
|
+ self.inverter_gap - self.nwell_enclose_active
|
||||||
|
|
||||||
|
# calculate width of the two combined nwells
|
||||||
|
# calculate height to encompass nimplant connected to vdd
|
||||||
|
well_width = 2 * (self.inverter_nmos.active_width + 0.5 * self.inverter_to_inverter_spacing) \
|
||||||
|
+ 2 * self.nwell_enclose_active
|
||||||
|
well_height = self.vdd_position.y - inverter_well_ypos \
|
||||||
|
+ self.nwell_enclose_active + drc["minwidth_tx"]
|
||||||
|
|
||||||
# calculate width of the two combined nwells
|
# FIXME fudge factor xpos
|
||||||
# calculate height to encompass nimplant connected to vdd
|
offset = [inverter_well_xpos + 2*self.nwell_enclose_active, inverter_well_ypos]
|
||||||
well_width = 2 * (self.inverter_nmos.active_width + 0.5 * self.inverter_to_inverter_spacing) \
|
self.add_rect(layer="nwell",
|
||||||
+ 2 * self.nwell_enclose_active
|
offset=offset,
|
||||||
well_height = self.vdd_position.y - inverter_well_ypos \
|
width=well_width,
|
||||||
+ self.nwell_enclose_active + drc["minwidth_tx"]
|
height=well_height)
|
||||||
|
|
||||||
# FIXME fudge factor xpos
|
|
||||||
offset = [inverter_well_xpos + 2*self.nwell_enclose_active, inverter_well_ypos]
|
|
||||||
self.add_rect(layer="nwell",
|
|
||||||
offset=offset,
|
|
||||||
width=well_width,
|
|
||||||
height=well_height)
|
|
||||||
|
|
||||||
# add well contacts
|
# add well contacts
|
||||||
# connect pimplants to gnd
|
# connect pimplants to gnd
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,8 @@ class ptx(design.design):
|
||||||
# The well is not included in the height and width
|
# The well is not included in the height and width
|
||||||
self.height = self.poly_height
|
self.height = self.poly_height
|
||||||
self.width = self.active_width
|
self.width = self.active_width
|
||||||
|
self.well_height = self.height
|
||||||
|
self.well_width = self.width
|
||||||
|
|
||||||
# This is the center of the first active contact offset (centered vertically)
|
# This is the center of the first active contact offset (centered vertically)
|
||||||
self.contact_offset = self.active_offset + vector(0.5 * self.active_contact.width,
|
self.contact_offset = self.active_offset + vector(0.5 * self.active_contact.width,
|
||||||
|
|
@ -353,10 +355,10 @@ class ptx(design.design):
|
||||||
if not (well_name in layer or "vtg" in layer):
|
if not (well_name in layer or "vtg" in layer):
|
||||||
return
|
return
|
||||||
|
|
||||||
center_pos = self.active_offset + vector(0.5*self.active_width,
|
center_pos = self.active_offset + vector(0.5 * self.active_width,
|
||||||
0.5*self.active_height)
|
0.5 * self.active_height)
|
||||||
well_ll = center_pos - vector(0.5*self.well_width,
|
well_ll = center_pos - vector(0.5 * self.well_width,
|
||||||
0.5*self.well_height)
|
0.5 * self.well_height)
|
||||||
if well_name in layer:
|
if well_name in layer:
|
||||||
self.add_rect(layer=well_name,
|
self.add_rect(layer=well_name,
|
||||||
offset=well_ll,
|
offset=well_ll,
|
||||||
|
|
@ -450,7 +452,7 @@ class ptx(design.design):
|
||||||
contact=self.add_via_center(layers=self.active_stack,
|
contact=self.add_via_center(layers=self.active_stack,
|
||||||
offset=pos,
|
offset=pos,
|
||||||
size=(1, self.num_contacts),
|
size=(1, self.num_contacts),
|
||||||
directions=("V","V"),
|
directions=("V", "V"),
|
||||||
implant_type=self.implant_type,
|
implant_type=self.implant_type,
|
||||||
well_type=self.well_type)
|
well_type=self.well_type)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue