Skip to content

Commit

Permalink
Better debug signals for simple test circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Oct 5, 2023
1 parent b7fcd8b commit afa9c63
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def transform_methods_to_testbenchios(

m.submodules.dut = self._dut

for name, attr in [(name, getattr(self._dut, name)) for name in dir(self._dut)]:
for name, attr in vars(self._dut).items():
if guard_nested_collection(attr, Method) and attr:
tb_cont, mc = transform_methods_to_testbenchios(attr)
self._io[name] = tb_cont
Expand All @@ -166,7 +166,10 @@ def transform_methods_to_testbenchios(
return m

def debug_signals(self):
return [auto_debug_signals(io) for io in self._io.values()]
sigs = {'_dut': auto_debug_signals(self._dut)}
for name, io in self._io.items():
sigs[name] = auto_debug_signals(io)
return sigs


class TestModule(Elaboratable):
Expand Down

0 comments on commit afa9c63

Please sign in to comment.