Commit e6ff283a authored by Florent Kermarrec's avatar Florent Kermarrec
Browse files

examples/sim: add display example

parent 67422106
from migen import *
class DisplayTest(Module):
def __init__(self):
count = Signal(8)
self.sync += count.eq(count + 1)
self.sync += Display("Count: 0x%02x", count)
def generator(dut):
for i in range(32):
yield
if __name__ == "__main__":
dut = DisplayTest()
run_simulation(dut, generator(dut))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment