Advertisement
Guest User

Untitled

a guest
Aug 8th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. from nmigen import *
  2. from nmigen_boards import tinyfpga_bx, atlys
  3.  
  4. class SubMod(Elaboratable):
  5.     def elaborate(self, platform):
  6.         m = Module()
  7.         count = Signal(8)
  8.         m.d.sync += count.eq(count + 1)
  9.         return m
  10.  
  11. class SubModBoard(Elaboratable):
  12.     def elaborate(self, platform):
  13.         m = Module()
  14.         m.submodules.sub_mod  = SubMod()
  15.         return m
  16.  
  17. if __name__ == "__main__":
  18.     plat = tinyfpga_bx.TinyFPGABXPlatform()
  19.     # plat = atlys.AtlysPlatform()
  20.     plat.build(SubModBoard(), do_program=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement