Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from migen import *
- from migen.build.platforms import papilio_pro
- from misoc.cores.uart.core import RS232PHY
- import wishbonebridge
- platform = papilio_pro.Platform()
- class WBTest(Module):
- def __init__(self):
- counter = Signal(32)
- self.sync += counter.eq(counter +1)
- led = platform.request("user_led")
- self.comb += led.eq(counter[25])
- self.submodules.phy = RS232PHY(platform.request("serial"), 32000000, 115200)
- self.submodules.bridge = wishbonebridge.WishboneStreamingBridge(self.submodules.phy, 32000000)
- self.comb += [
- self.bridge.wishbone.ack.eq(self.bridge.wishbone.stb),
- self.bridge.wishbone.dat_r.eq(0xdeadbeef)
- ]
- if __name__ == "__main__":
- top = WBTest()
- platform.build(top, build_dir="wbtest")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement