Sud_ana
06/27/2024, 11:46 AMstraight_route()
? For eg. I moved my pmos and nmos in the current mirror in x as well as y direction so that are not in the same straight row. I have defined the straight_route()
to connect the reference and mirror ports from these multiplier names, but the route function doesn’t route the connection all the way through for the ports as expected. I could use the L_route()
instead , but where do I get the string name of the instance ports for different instances ? I understand the _
denotes a hierarchy of the instances, but how do you get the hierarchical names (multiplier, source etc.) from the instances built when asking the function ?
def currentMirror(pdk: MappedPDK):
currMirrComp = Component()
pfet_ref = pmos(pdk, with_substrate_tap=False, with_dummy=(False, True))
pfet_mir = pmos(pdk, with_substrate_tap=False, with_dummy=(True, False))
cref_ref = currMirrComp << pfet_ref
cmir_ref = currMirrComp << pfet_mir
cref_ref.movex(evaluate_bbox(pfet_mir)[0] + pdk.util_max_metal_seperation())
cref_ref.movey(evaluate_bbox(pfet_mir)[1])
currMirrComp << straight_route(pdk, cref_ref.ports["multiplier_0_source_E"], cmir_ref.ports["multiplier_0_source_E"])
currMirrComp << straight_route(pdk, cref_ref.ports["multiplier_0_gate_E"], cmir_ref.ports["multiplier_0_gate_E"])
currMirrComp << c_route(pdk, cref_ref.ports["multiplier_0_drain_E"], cref_ref.ports["multiplier_0_gate_E"])
return currMirrComp
currentMirror(sky130).write_gds("cmirror_example.gds")