Пример #1
0
def main():
  # build the model
  p = Path(12, 4505.6)
  p.stages = [nand(3, fast_fall=True),
              nand(3, fast_rise=True),
              nand(2, fast_fall=True),
              nand(2, fast_rise=True),
              inv(fast_fall=True),
              inv(fast_rise=True)]

  # add a side load of 1024 lambda at the last nand
  p.size()
  p.show()
Пример #2
0
def main():
  # build the model
  p = Path(4, 153.02/0.022/1.4)
  p.stages = [inv(fast_rise=True),
	      inv(fast_fall=True),
	      inv(fast_rise=True),
	      inv(fast_fall=True),
	      inv(fast_rise=True),
	      ]
  # add a side load of 1024 lambda at the last nand
#  p.sideloads[5] = 1024
  print "path effort: %0.01f" % p.pathEffort()
  print "stage effort: %0.02f" % p.optimalStageEffort()
  p.size()
  p.show()
Пример #3
0
def main():
  # build the model
  p = Path(12, 3218)
  p.stages = [nand(3, fast_fall=True),
              inv(be=4, fast_rise=True),
              nand(2, fast_fall=True),
              inv(be=16, fast_rise=True),
              nand(2, fast_fall=True),
              inv(fast_rise=True)]
  # add a side load of 1024 lambda at the last nand
  p.sideloads[3] = 731
  print "path effort: %0.01f" % p.pathEffort()
  print "stage effort: %0.02f" % p.optimalStageEffort()
  p.size()
  p.show()
  sizes = p.getSizes()
  template = open('decode_6s.ckt.in').read()
  out = open('decode.ckt', 'w')
  out.write(template.format(**sizes))
def sae_chain():
  '''
    size and return a schematic with the sae chain
  '''
  # build the model
  p = Path(4, 1576)
  p.stages = [nand(2, fast_fall=True),
              inv(fast_rise=True),
              inv(fast_fall=True),
              inv(fast_rise=True)]
  # add a side load of 1024 lambda at the last nand
  print "path effort: %0.01f" % p.pathEffort()
  print "stage effort: %0.02f" % p.optimalStageEffort()
  p.size()
  p.show()
  #sizes = p.getSizes()
  #template = open('sae_chain.ckt.in').read()
  #out = open('sae_chain.ckt', 'w')
  #out.write(template.format(**sizes))
  out = '''
.subckt sae_inv_chain sae wl wl_pulldown sae_b
x123 sae wl net_sae_1 {nand_pcell}
x124 net_sae_1 net_sae_2 {inv_pcell1}
x125 net_sae_2 sae_b {inv_pcell2}
x126 sae_b wl_pulldown {inv_pcell3}
.ends sae_inv_chain
'''
  names = {'nand_pcell': p.stages[0].getName(),
           'inv_pcell1': p.stages[1].getName(),
           'inv_pcell2': p.stages[2].getName(),
           'inv_pcell3': p.stages[3].getName()}
  out = out.format(**names)

  for i in p.stages:
    out += i.instantiate()
  return out
Пример #5
0
def main():
  # build the model
  short = Path(180, 7461)
  short.stages = [inv(),
              inv(),
              pmos(reduction=0.3)]
  short.sideload(1, 180)
  short.size()
  print "short inverter chain"
  print "path effort: %0.01f" % short.pathEffort()
  short.show()

  p = Path(180, 7461)
  p.stages = [inv(),
              inv(),
              inv(),
              pmos(reduction=0.25)]
  p.sideload(1, 180)
  p.sideload(1, short.stages[-1].getSizeP())
  # add a side load of 1024 lambda at the last nand
  print ""
  print "long inverter chain"
  print "path effort: %0.01f" % p.pathEffort()
  p.size()
  p.show()
  sizes = p.getSizes()
  out = '''
** Library name: schem
** Cell name: write
** View name: schematic
.subckt write bl0 bl_b0 blpc_b wrdata wren0 vcell inh_bulk_n inh_bulk_p
m5 bl0 blpc_b vdd! inh_bulk_p pmos L=2 W=80
m1 bl0 blpc_b bl_b0 inh_bulk_p pmos L=2 W=80
m0 bl_b0 blpc_b vdd! inh_bulk_p pmos L=2 W=80
m4 net23 wr2 bl_b0 inh_bulk_n nmos L=2 W=90
m3 net26 wr2 bl0 inh_bulk_n nmos L=2 W=90
xu0 wrdata net18 inv_pcell_13
xu2 wrdata net23 inv_pcell_14
xu1 net18 net26 inv_pcell_14
xu3 wren0 wr1 {inv_1}
xu4 wr1 wr2 {inv_2}
xu5 wr2 wr3 {inv_3}
m6 vcell wr2 Vcc_hi Vcc_hi pmos L=2 W={pmos_1}
m7 vcell wr3 Vcc_lo Vcc_hi pmos L=2 W={pmos_2}
.ends write
** End of subcircuit definition.

** Library name: ee313
** Cell name: inv
** View name: schematic
.subckt inv_pcell_13 a y
m1 y a vdd! vdd! pmos L=2 W=8
m2 y a 0 0 nmos L=2 W=4
.ends inv_pcell_13
** End of subcircuit definition.

** Library name: ee313
** Cell name: inv
** View name: schematic
.subckt inv_pcell_14 a y
m1 y a vdd! vdd! pmos L=2 W=12
m2 y a 0 0 nmos L=2 W=24
.ends inv_pcell_14
** End of subcircuit definition.
'''
  sizes = {'inv_1': p.stages[0].getName(),
           'inv_2': p.stages[1].getName(),
           'inv_3': p.stages[2].getName(),
           'pmos_1': short.stages[-1].getSizeP(),
           'pmos_2': p.stages[3].getSizeP()}
  out = out.format(**sizes)

  for stage in p.stages[0:3]:
    out += stage.instantiate()
  print out 
  open('../part1_sol_team_netlist/write.ckt', 'w').write(out)