From: Cole Poirier Date: Fri, 30 Oct 2020 21:33:00 +0000 (-0700) Subject: versa_ecp5.py add 4 arbitrarily assigned gpio pins to be used by X-Git-Tag: 24jan2021_ls180~120 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=937cdd60698bef5e1d93f10fb9c866b78d49f2ed;p=soc.git versa_ecp5.py add 4 arbitrarily assigned gpio pins to be used by Libre-SOC JTAG interface on ulx3s --- diff --git a/src/soc/litex/florent/versa_ecp5.py b/src/soc/litex/florent/versa_ecp5.py index 1dfd049d..6bd917d8 100755 --- a/src/soc/litex/florent/versa_ecp5.py +++ b/src/soc/litex/florent/versa_ecp5.py @@ -85,6 +85,23 @@ class ULX3S85FTestSoC(ulx3s.BaseSoC): device = "LFE5U-85F", **kwargs) + # get 4 arbitrarily assinged logical pins, each gpio has + # 2 distinct physical single non-differential pins p and n + gpio0 = self.platform.request("gpio", 0) + gpio1 = self.platform.request("gpio", 1) + + # assign p, n litex 'subsignals' of each gpio to jtag pins + jtag_tdi = gpio0.n + jtag_tms = gpio0.p + jtag_tck = gpio1.n + jtag_tdo = gpio1.p + + # wire the pins up to CPU JTAG + self.comb += self.cpu.jtag_tdi.eq(jtag_tdi) + self.comb += self.cpu.jtag_tms.eq(jtag_tms) + self.comb += self.cpu.jtag_tdi.eq(jtag_tdi) + self.comb += jtag_tdo.eq(self.cpu.jtag_tdo) + # Build # ----------------------------------------------------------------------------