From: Luke Kenneth Casson Leighton Date: Mon, 3 May 2021 12:00:10 +0000 (+0100) Subject: must only try to connect jtag when variant requests it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d99a274dfdc18b11aac25b00ca32b7910061776d;p=libresoc-litex.git must only try to connect jtag when variant requests it --- diff --git a/sim.py b/sim.py index 306adf4..550339e 100755 --- a/sim.py +++ b/sim.py @@ -165,21 +165,22 @@ class LibreSoCSim(SoCSDRAM): self.add_constant("MEMTEST_DATA_DEBUG", 1) - # add JTAG platform pins - platform.add_extension([ - ("jtag", 0, - Subsignal("tck", Pins(1)), - Subsignal("tms", Pins(1)), - Subsignal("tdi", Pins(1)), - Subsignal("tdo", Pins(1)), - ) - ]) + if "jtag" in variant: + # add JTAG platform pins + platform.add_extension([ + ("jtag", 0, + Subsignal("tck", Pins(1)), + Subsignal("tms", Pins(1)), + Subsignal("tdi", Pins(1)), + Subsignal("tdo", Pins(1)), + ) + ]) - jtagpads = platform.request("jtag") - self.comb += self.cpu.jtag_tck.eq(jtagpads.tck) - self.comb += self.cpu.jtag_tms.eq(jtagpads.tms) - self.comb += self.cpu.jtag_tdi.eq(jtagpads.tdi) - self.comb += jtagpads.tdo.eq(self.cpu.jtag_tdo) + jtagpads = platform.request("jtag") + self.comb += self.cpu.jtag_tck.eq(jtagpads.tck) + self.comb += self.cpu.jtag_tms.eq(jtagpads.tms) + self.comb += self.cpu.jtag_tdi.eq(jtagpads.tdi) + self.comb += jtagpads.tdo.eq(self.cpu.jtag_tdo) # Debug ---------------------------------------------------------------