Пример #1
0
 def definition(io):
     adders = [FullAdder() for _ in range(N)]
     circ = m.braid(adders, foldargs={"cin": "cout"})
     m.wire(io.a, circ.a)
     m.wire(io.b, circ.b)
     m.wire(io.cin, circ.cin)
     m.wire(io.cout, circ.cout)
     m.wire(io.out, circ.out)
Пример #2
0
 def definition(io):
     dffs = m.braid(m.map_(DefineDFF(width, pipe_depth, retime_status),
                           array_size_1),
                    joinargs=["data_in", "data_out"],
                    forkargs=["clk", "en", "reset"])
     m.wire(dffs.data_in, io.data_in)
     m.wire(dffs.data_out, io.data_out)
     m.wire(dffs.clk, io.clk)
     m.wire(dffs.en, io.en)
     m.wire(dffs.reset, io.reset)
Пример #3
0
 def definition(siso):
     ffs = mantle.FFs(n, init=init, has_ce=has_ce, has_reset=has_reset)
     reg = m.braid(ffs, foldargs={"I": "O"})
     reg(siso.I)
     m.wire(reg.O, siso.O)
     m.wireclock(siso, reg)