import symbolic.cmos # do not remove
BIT_WIDTH = 16
-
+widths = {32: 600.0, 16: 490}
def coriolis_setup():
with Config(Cfg.Parameter.Priority.UserFile) as cfg:
])) + v_margin
# experiment, over-ride
- width = 490
+ width = widths[BIT_WIDTH]
#width = 1310
#height = 370
},
orientation=Transformation.Orientation.ID,
)
- add.set_ab(160.0, 800.0)
+ add.set_ab(160.0, 50.0 * BIT_WIDTH)
sub = AddSub(
'sub', editor,
west_pins=[
},
orientation=Transformation.Orientation.ID,
)
- sub.set_ab(165.0, 800.0)
+ sub.set_ab(165.0, 50.0 * BIT_WIDTH)
o = 00.0
alu16 = ALU16(
import symbolic.cmos # do not remove
BIT_WIDTH = 16
-
+widths = {16 : 465.0, 32: 800.0}
+offsets = {16 : 0.0, 32: 200.0}
def coriolis_setup():
with Config(Cfg.Parameter.Priority.UserFile) as cfg:
orientation=Transformation.Orientation.ID,
)
+ o = offsets[BIT_WIDTH]
alu16 = ALU16(
'alu16', editor, submodules=[add, sub],
north_pins=[
- {'net': 'o({})', 'x': 365.0, 'delta': -5.0, 'repeat': BIT_WIDTH},
+ {'net': 'o({})', 'x': o+365.0, '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': o+205.0, 'delta': 5.0, 'repeat': BIT_WIDTH},
+ {'net': 'b({})', 'x': o+295.0, 'delta': 5.0, 'repeat': BIT_WIDTH},
],
west_pins=[
{'net': 'rst', 'y': 10.0, 'layer': 'METAL2'},
],
)
- alu16.set_ab( 465, 800 )
+ alu16.set_ab( widths[BIT_WIDTH], BIT_WIDTH * 50.0 )
return alu16.build()