Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from nmigen import *
- from nmigen.build import Platform
- from numato_mimas_v2 import *
- class TestLEDModule(Elaboratable):
- def __init__(self):
- self.count = Signal(32, reset = 0)
- def elaborate(self, platform: Platform) -> Module:
- m = Module()
- m.d.sync += self.count.eq(self.count + 1)
- if platform is not None:
- led = platform.request('led', 1)
- m.d.comb += led.o.eq(self.count[20])
- return m
- if __name__ == "__main__":
- NumatoMimasV2Platform().build(TestLEDModule())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement