From 2c2ecacb4a95e8c5297a2aa30c0c6a9ec18bd6ab Mon Sep 17 00:00:00 2001 From: Staf Verhaegen Date: Mon, 16 Dec 2019 10:45:15 +0100 Subject: [PATCH] Specify names for TAP signals. --- c4m/nmigen/jtag/tap.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/c4m/nmigen/jtag/tap.py b/c4m/nmigen/jtag/tap.py index c12eabf..3bc33e7 100755 --- a/c4m/nmigen/jtag/tap.py +++ b/c4m/nmigen/jtag/tap.py @@ -174,13 +174,21 @@ class TAP(Elaboratable): assert((ir_width is None) or (isinstance(ir_width, int) and ir_width >= 2)) assert(len(version) == 4) - self.name = name if name is not None else get_var_name(depth=src_loc_at+2, default="TAP") + if name is None: + name = get_var_name(depth=src_loc_at+2, default="TAP") + self.name = name self.bus = Interface(with_reset=with_reset, name=self.name+"_bus", src_loc_at=src_loc_at+1) # TODO: Handle IOs with different directions - self.core = Array(Pin(1, "io") for _ in range(io_count)) # Signals to use for core - self.pad = Array(Pin(1, "io") for _ in range(io_count)) # Signals going to IO pads + self.core = Array( + Pin(1, "io", name=name+"_coreio"+str(i), src_loc_at=src_loc_at+1) + for i in range(io_count) + ) # Signals to use for core + self.pad = Array( + Pin(1, "io", name=name+"_padio"+str(i), src_loc_at=src_loc_at+1) + for i in range(io_count) + ) # Signals going to IO pads ## -- 2.30.2