return matched
def place_datapath(self, datapath_insts, x_orig, y_orig, fold):
- channel_sff1 = self.to_dbu(60)
+ channel_sff1 = self.to_dbu(0)
with SessionManager():
slice_height = self.to_dbu(50.0)
for i in range(len(datapath_insts)):
if ALU16.match_instance(datapath_insts, 'no2', 'nq', inst): continue
if ALU16.match_instance(datapath_insts, 'sff1', 'i', inst): continue
- self.place_datapath(datapath_insts, 160.0, 50.0, 1)
+ # place to right of add
+ add, sub = self.submodules
+ add_wid = self.from_dbu(add.ab.getWidth())
+ self.place_datapath(datapath_insts, add_wid, 40.0, 1)
def save(self):
self.name = self.name + '_r'
def build(self):
h_margin = 0.0
- v_margin = 50.0
+ v_margin = 40.0
if not self.build_submodules():
return False
])) + v_margin
# experiment, over-ride
- width = 580
+ width = 520
#width = 1310
#height = 370
add_wid = self.from_dbu(add.ab.getWidth())
sub_ht = self.from_dbu(sub.ab.getHeight())
+ sub_wid = self.from_dbu(sub.ab.getWidth())
self.place_submodule(add, 0, v_margin)
- self.place_submodule(sub, 400, v_margin)
+ self.place_submodule(sub, width-sub_wid, v_margin)
# TODO: replace with some form of lazy evaluation?
y_north = self.from_dbu(self.ab.getYMax())
'add', editor,
east_pins=[
{'net': 'a({})', 'y': 15.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
- {'net': 'b({})', 'y': 25.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
- {'net': 'o({})', 'y': 35.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
+ {'net': 'b({})', 'y': 20.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
+ {'net': 'o({})', 'y': 25.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
],
pads={
'b({})'.format(BIT_WIDTH-1): (
'sub', editor,
west_pins=[
{'net': 'a({})', 'y': 15.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
- {'net': 'b({})', 'y': 25.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
- {'net': 'o({})', 'y': 35.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
+ {'net': 'b({})', 'y': 20.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
+ {'net': 'o({})', 'y': 25.0, 'delta': 50.0, 'repeat': BIT_WIDTH, 'layer': 'METAL2'},
],
pads={
'b({})'.format(BIT_WIDTH-1): (
},
orientation=Transformation.Orientation.ID,
)
- sub.set_ab(180.0, 800.0)
+ sub.set_ab(165.0, 800.0)
+ o = 00.0
alu16 = ALU16(
'alu16', editor, submodules=[add, sub],
north_pins=[
- {'net': 'o({})', 'x': 365.0, 'delta': -5.0, 'repeat': BIT_WIDTH},
+ {'net': 'o({})', 'x': 355.0+o, 'delta': -5.0, 'repeat': BIT_WIDTH},
{'net': 'op'},
],
south_pins=[
- {'net': 'a({})', 'x': 205.0, 'delta': 5.0, 'repeat': BIT_WIDTH},
- {'net': 'b({})', 'x': 295.0, 'delta': 5.0, 'repeat': BIT_WIDTH},
+ {'net': 'a({})', 'x': 205.0+o, 'delta': 10.0, 'repeat': BIT_WIDTH},
+ {'net': 'b({})', 'x': 210.0+o, 'delta': 10.0, 'repeat': BIT_WIDTH},
],
west_pins=[
{'net': 'rst', 'y': 10.0, 'layer': 'METAL2'},