def __init__(self, width):
self.a = Signal(width)
self.b = Signal(width)
- self.o = Signal(width)
+ self.f = Signal(width)
def elaborate(self, platform):
m = Module()
- m.d.comb += self.eq(self.a + self.b)
+ m.d.sync += self.f.eq(self.a + self.b)
return m
if __name__ == "__main__":
alu = ADD(width=4)
- create_ilang(alu, [alu.a, alu.b, alu.o], "add")
+ create_ilang(alu, [alu.a, alu.b, alu.f], "add")
def pad_nums(s, sep="_"):
res = []
- for i in range(16):
+ for i in range(4):
res.append("%s%s%d" % (s, sep, i))
return res
a_pads = pad_nums("a")
-o_pads = pad_nums("o")
+o_pads = pad_nums("f")
chip = { 'pads.ioPadGauge' : 'pxlib'
- , 'pads.south' : a_pads[:8] + ["p_vddick_0", "p_vssick_0" ] + \
- a_pads[8:]
+ , 'pads.south' : a_pads[:2] + ["p_vddick_0", "p_vssick_0" ] + \
+ a_pads[2:]
, 'pads.east' : pad_nums("b")
- , 'pads.north' : o_pads[:8] + ["p_vddeck_0", "p_vsseck_0" ] + \
- o_pads[8:]
- , 'pads.west' : [ "op",
- "p_clk_0",
+ , 'pads.north' : o_pads[:2] + ["p_vddeck_0", "p_vsseck_0" ] + \
+ o_pads[2:]
+ , 'pads.west' : [ "p_clk_0",
"rst",
]
- , 'core.size' : ( l(3000), l(3000) )
- , 'chip.size' : ( l(5000), l(5000) )
+ , 'core.size' : ( l(1000), l(1000) )
+ , 'chip.size' : ( l(2500), l(2500) )
, 'chip.clockTree' : True
}