-
-
Save mithro/32e4bcbba355f9bb498f80f51f56b26d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from migen import * | |
class M(Module): | |
def __init__(self): | |
self.i_data = Signal() | |
self.o_data = Signal() | |
self.sync += [ | |
self.o_data.eq(self.i_data), | |
] | |
def stim(): | |
d = '01100111' | |
for i in range(len(d)+1): | |
if i < len(d): | |
yield dut.i_data.eq(int(d[i])) | |
yield | |
if i > 0: | |
print((yield dut.o_data)) | |
dut = M() | |
run_simulation(dut, stim()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment