Beispiel #1
0
def ROM4(data, i, width):
    return fork([uncurry(LUT(data[i][w], 4)) for w in range(width)])
Beispiel #2
0
 def compress3to2():
     global n3to2s
     n3to2s = n3to2s + 1
     Op = Define3to2Op()
     return fork([XOr(3), Op()])
Beispiel #3
0
 def compress2to2():
     global n2to2s
     n2to2s = n2to2s + 1
     return fork([LUT2(I0 ^ I1), LUT2((I0 & I1) | (I1 & I2))])
Beispiel #4
0
 def compress3to2():
     global n3to2s
     n3to2s = n3to2s + 1
     return fork(
         [LUT3(I0 ^ I1 ^ I2),
          LUT3((I0 & I1) | (I1 & I2) | (I2 & I0))])
Beispiel #5
0
 def definition(io):
     swap = uncurry(fork(And(2), Or(2)), prefix="I")
     #swap = uncurry( fork( And(2), Or(2) ) , prefix="in")
     wire(swap(io.I), io.O)