Skip to content

Commit

Permalink
soc/cores/jtag: adding Efinix JTAG support in JTAGPHY
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Oct 17, 2023
1 parent d95d5bd commit aad8311
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions litex/soc/cores/jtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ def __init__(self, jtag=None, device=None, data_width=8, clock_domain="sys", cha
# Lattice.
elif device[:5] == "LFE5U":
jtag = ECP5JTAG()
# Efinix
elif device[:2] == "Ti":
jtag = EfinixJTAG(platform)
# Altera/Intel.
elif AlteraJTAG.get_primitive(device) is not None:
platform.add_reserved_jtag_decls()
Expand Down Expand Up @@ -511,6 +514,16 @@ def __init__(self, jtag=None, device=None, data_width=8, clock_domain="sys", cha
class EfinixJTAG(LiteXModule):
# id refer to the JTAG_USER{id}
def __init__(self, platform, id=1):
self.reset = Signal()
self.capture = Signal()
self.shift = Signal()
self.update = Signal()

self.tck = Signal()
self.tms = Signal()
self.tdi = Signal()
self.tdo = Signal()

self.name = f"jtag_{id}"
self.platform = platform
self.id = id
Expand Down Expand Up @@ -543,6 +556,18 @@ def __init__(self, platform, id=1):
block["pins"] = pins
self.platform.toolchain.ifacewriter.blocks.append(block)

self.comb += [
self.reset.eq(pins.RESET),
self.capture.eq(pins.CAPTURE),
self.shift.eq(pins.SHIFT),
self.update.eq(pins.UPDATE),

self.tck.eq(pins.TCK),
self.tms.eq(pins.TMS),
self.tdi.eq(pins.TDI),
pins.TDO.eq(self.tdo),
]

def bind_vexriscv_smp(self, cpu):
self.comb += [
# JTAG -> CPU.
Expand Down

0 comments on commit aad8311

Please sign in to comment.