Sud_ana
07/24/2024, 5:12 PMc-route
between the drain
of bottom transistor to source
of top transistor. Is there any reason the route stops at the guard ring tie cell of bottom transistor rather than extending to the top transistors after it recognizes the port names correctly. The top and bottom are individual components within a top level component and I have tried to change the S/D routing from metal2
to metal 3
. but irrespective of the routing layer the smart route and c routes all terminate within the transistor. The smart route and c route all work within inter-digitized pair and single transistor but how to define it to route from one component to another ? @Sakib PathenSakib Pathen
07/24/2024, 5:14 PMSud_ana
07/24/2024, 7:25 PMdef Cascode_CS(pdk: MappedPDK, L1, W1, L2, W2, cs_type):
Cascode_CS = Component(name="Cascode_cs")
if (cs_type=="nfet"):
fet_M1=nmos(pdk, length=L1, width=W1, with_tie=False, sd_route_topmet="met3", gate_route_topmet="met3")
fet_M2=nmos(pdk, length=L2, width=W2, with_tie=False, sd_route_topmet="met3", gate_route_topmet="met3")
M1_ref = prec_ref_center(fet_M1)
Cascode_CS.add(M1_ref)
Cascode_CS.add_ports(M1_ref.get_ports_list(), prefix="M1_")
M2_ref = prec_ref_center(fet_M2)
Cascode_CS.add(M2_ref)
Cascode_CS.add_ports(M2_ref.get_ports_list(), prefix="M2_")
M1_dim = prec_ref_center(M1_ref)
M2_dim = prec_ref_center(M2_ref)
movey(M2_ref, 0.5*(evaluate_bbox(M1_ref)[1]+evaluate_bbox(M2_ref)[1]) + pdk.util_max_metal_seperation())
Cascode_CS << c_route(pdk,Cascode_CS.ports["M2_multiplier_0_source_W"],Cascode_CS.ports["M1_multiplier_0_drain_W"])
# Cascode_CS << smart_route(pdk, Cascode_CS.ports["M1_multiplier_0_drain_N"],Cascode_CS.ports["M2_multiplier_0_source_S"],M1_ref, M2_ref)
shift_amount = -prec_center(Cascode_CS.flatten())[1]
tap_ring = tapring(pdk,
enclosed_rectangle=evaluate_bbox(Cascode_CS.flatten(), padding=pdk.util_max_metal_seperation()))
tap_ring_ref = Cascode_CS << tap_ring
tap_ring_ref.movey(shift_amount)
return Cascode_CS
Sakib Pathen
07/25/2024, 2:43 PMfrom gdsfactory import Component
from glayout.flow.pdk.mappedpdk import MappedPDK
from glayout.flow.placement.two_transistor_interdigitized import two_nfet_interdigitized
from glayout.flow.placement.two_transistor_interdigitized import two_pfet_interdigitized
from glayout.flow.primitives.fet import nmos
from glayout.flow.primitives.guardring import tapring
from glayout.flow.pdk.util.comp_utils import prec_ref_center, movey, evaluate_bbox, prec_center
from glayout.flow.pdk.util.port_utils import remove_ports_with_prefix
from glayout.flow.routing.smart_route import smart_route
from glayout.flow.routing.c_route import c_route
from glayout.flow.pdk.sky130_mapped import sky130_mapped_pdk
def Cascode_CS(pdk: MappedPDK, L1, W1, L2, W2, cs_type):
Cascode_CS = Component(name="Cascode_cs")
if (cs_type=="nfet"):
fet_M1=nmos(pdk, length=L1, width=W1, with_tie=False)
fet_M2=nmos(pdk, length=L2, width=W2, with_tie=False)
M1_ref = prec_ref_center(fet_M1)
Cascode_CS.add(M1_ref)
Cascode_CS.add_ports(M1_ref.get_ports_list(), prefix="M1_")
M2_ref = prec_ref_center(fet_M2)
Cascode_CS.add(M2_ref)
Cascode_CS.add_ports(M2_ref.get_ports_list(), prefix="M2_")
M1_dim = prec_ref_center(M1_ref)
M2_dim = prec_ref_center(M2_ref)
movey(M2_ref, 0.5*(evaluate_bbox(M1_ref)[1]+evaluate_bbox(M2_ref)[1]) + pdk.util_max_metal_seperation())
remove_ports_with_prefix(Cascode_CS, "M2_")
Cascode_CS.add_ports(M2_ref.get_ports_list(), prefix="M2_")
Cascode_CS << c_route(pdk,Cascode_CS.ports["M2_multiplier_0_source_W"],Cascode_CS.ports["M1_multiplier_0_drain_W"])
# Cascode_CS << smart_route(pdk, Cascode_CS.ports["M1_multiplier_0_drain_N"],Cascode_CS.ports["M2_multiplier_0_source_S"],M1_ref, M2_ref)
shift_amount = -prec_center(Cascode_CS.flatten())[1]
tap_ring = tapring(pdk,
enclosed_rectangle=evaluate_bbox(Cascode_CS.flatten(), padding=pdk.util_max_metal_seperation()))
tap_ring_ref = Cascode_CS << tap_ring
tap_ring_ref.movey(shift_amount)
return Cascode_CS
Cascode_CS(sky130_mapped_pdk, 1,1,2,2,"nfet").show()
Sakib Pathen
07/25/2024, 2:43 PMSakib Pathen
07/25/2024, 2:44 PMSud_ana
07/25/2024, 9:17 PM