diff --git a/compiler/ptx.py b/compiler/ptx.py index 0e69ce67..ed9c8e74 100644 --- a/compiler/ptx.py +++ b/compiler/ptx.py @@ -63,10 +63,15 @@ class ptx(design.design): # self.spice.append("\n.SUBCKT {0} {1}".format(self.name, # " ".join(self.pins))) - self.spice_device="M{{0}} {{1}} {0} m={1} w={2}u l={3}u".format(spice[self.tx_type], - self.mults, - self.tx_width, - drc["minwidth_poly"]) + # Just make a guess since these will actually be decided in the layout later. + area_sd = 2.5*drc["minwidth_poly"]*self.tx_width + perimeter_sd = 2*drc["minwidth_poly"] + 2*self.tx_width + self.spice_device="M{{0}} {{1}} {0} m={1} w={2}u l={3}u pd={4}u ps={4}u as={5}p ad={5}p".format(spice[self.tx_type], + self.mults, + self.tx_width, + drc["minwidth_poly"], + perimeter_sd, + area_sd) self.spice.append("\n* ptx " + self.spice_device) # self.spice.append(".ENDS {0}".format(self.name)) diff --git a/compiler/verify/magic.py b/compiler/verify/magic.py index 8cbf1075..b2e66aa2 100644 --- a/compiler/verify/magic.py +++ b/compiler/verify/magic.py @@ -124,6 +124,8 @@ def write_netgen_script(cell_name, sp_name): f.write("flatten class {{{0}.spice precharge_array}}\n".format(cell_name)) f.write("property {{{0}.spice nfet}} remove as ad ps pd\n".format(cell_name)) f.write("property {{{0}.spice pfet}} remove as ad ps pd\n".format(cell_name)) + f.write("property {{{0} n}} remove as ad ps pd\n".format(sp_name)) + f.write("property {{{0} p}} remove as ad ps pd\n".format(sp_name)) # Allow some flexibility in W size because magic will snap to a lambda grid # This can also cause disconnects unfortunately! # f.write("property {{{0}{1}.spice nfet}} tolerance {{w 0.1}}\n".format(OPTS.openram_temp,