/t.py
Last active
December 24, 2018 01:32
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