Specify names for TAP signals.
authorStaf Verhaegen <staf@stafverhaegen.be>
Mon, 16 Dec 2019 09:45:15 +0000 (10:45 +0100)
committerStaf Verhaegen <staf@stafverhaegen.be>
Mon, 16 Dec 2019 12:29:30 +0000 (13:29 +0100)
c4m/nmigen/jtag/tap.py

index c12eabf55246bd648d883fc4e7f662166185fc75..3bc33e78aac43b3df54b3b4d5d2166adab55a6c0 100755 (executable)
@@ -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)
 
         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.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
 
         ##
 
 
         ##