from cores.ft601.ft601_perf_debug import FT601PerfDebug from devices import HdmiDigitizerPlatform, Usb3PluginPlatform from soc.cli import cli from soc.platforms import ZynqSocPlatform from soc.platforms.jtag.jtag_soc_platform import JTAGSocPlatform from util.nmigen_misc import connect_leds class Top(Elaboratable): def __init__(self): pass def elaborate(self, platform): m = Module() ft601 = platform.request("ft601") ft601_perf_debug = m.submodules.ft601_perf_debug = FT601PerfDebug( ft601) m.d.comb += platform.request("led", 0).eq(1) #connect_leds(m, platform, Const(1), upper_bits=False) return m if __name__ == "__main__": with cli(Top, runs_on=(Usb3PluginPlatform, HdmiDigitizerPlatform), possible_socs=(JTAGSocPlatform, ZynqSocPlatform)) as platform: pass
pll.output_domain("bitclk", 4) pll.output_domain("sync", 16) usb3_plugin = platform.request("usb3_plugin", "north") m.submodules.mmio_gpio = MmioGpio([ usb3_plugin.jtag.tms, usb3_plugin.jtag.tck, usb3_plugin.jtag.tdi, usb3_plugin.jtag.tdo, usb3_plugin.jtag_enb, usb3_plugin.program, usb3_plugin.init, usb3_plugin.done, ]) counter = m.submodules.counter = CounterStreamSource(32) m.submodules.tx = PluginModuleStreamerTx(usb3_plugin.lvds, counter.output, bitclk_domain="bitclk") return m if __name__ == "__main__": with cli(Top, runs_on=(MicroR2Platform, ), possible_socs=(ZynqSocPlatform, )) as platform: from devices.plugins.usb3_plugin_resource import usb3_plugin_connect usb3_plugin_connect(platform, "north")
def __init__(self): self.test_register = ControlSignal(32) self.test_register2 = ControlSignal(32) def elaborate(self, platform): m = Module() plugin = platform.request("plugin_stream_input") rx = m.submodules.rx = PluginModuleStreamerRx(plugin) counter = Signal(24) m.d.sync += counter.eq(counter + 1) jtag_analyze = StreamEndpoint(32, is_sink=False, has_last=False) m.d.comb += jtag_analyze.payload.eq(Cat(platform.jtag_signals, counter[0:21])) m.d.comb += jtag_analyze.valid.eq(1) in_domain = DomainRenamer("wclk_in") counter = m.submodules.counter = in_domain(CounterStreamSource(32)) ft601 = platform.request("ft601") m.submodules.ft601 = in_domain(FT601StreamSink(ft601, jtag_analyze)) return m if __name__ == "__main__": with cli(Top, runs_on=(Usb3PluginPlatform,), possible_socs=(JTAGSocPlatform,)) as platform: pass