underscore names on submodules possibly interfering with verilator
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 16 Apr 2021 20:00:26 +0000 (21:00 +0100)
committerStaf Verhaegen <staf@stafverhaegen.be>
Wed, 21 Apr 2021 17:45:29 +0000 (19:45 +0200)
c4m/nmigen/jtag/tap.py

index caf2ce41a9bf4b044faa1bc22a4bb0aea6d9ea3c..1cdc833e2c93cc11c912aa6e325001cde6c052b1 100755 (executable)
@@ -356,13 +356,13 @@ class TAP(Elaboratable):
         cmd_preload = 2
         cmd_bypass = 2**ir_width - 1 # All ones
 
-        m.submodules._fsm = fsm = _FSM(bus=self.bus)
+        m.submodules.fsm = fsm = _FSM(bus=self.bus)
         m.domains.posjtag = fsm.posjtag
         m.domains.negjtag = fsm.negjtag
 
         # IR block
         select_ir = fsm.isir
-        m.submodules._irblock = irblock = _IRBlock(
+        m.submodules.irblock = irblock = _IRBlock(
             ir_width=ir_width, cmd_idcode=cmd_idcode, tdi=self.bus.tdi,
             capture=(fsm.isir & fsm.capture),
             shift=(fsm.isir & fsm.shift),
@@ -377,7 +377,7 @@ class TAP(Elaboratable):
         m.d.comb += select_id.eq(fsm.isdr &
                                  ((ir == cmd_idcode) | (ir == cmd_bypass)))
         m.d.comb += id_bypass.eq(ir == cmd_bypass)
-        m.submodules._idblock = idblock = _IDBypassBlock(
+        m.submodules.idblock = idblock = _IDBypassBlock(
             manufacturer_id=self._manufacturer_id,
             part_number=self._part_number,
             version=self._version, tdi=self.bus.tdi,