alexforencich/cocotbext-axi

Missing signal results in AssertionError During handling of the above exception, another exception occurred:

jahagirdar opened this issue · 5 comments

While instantiating and AxiSlave or AxiMaster object if the dut does not contain a required signal (eg one of id's) or the signal width is different, then instead of printing the assertion statement I get something like

Traceback (most recent call last):
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 633, in _resume_coro_upon
    trigger.prime(self._react)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/triggers.py", line 685, in prime
    callback(self)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 384, in _react
    self._event_loop(trigger)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 487, in _event_loop
    self._schedule(coro, trigger=trigger)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 957, in _schedule
    self._unschedule(coroutine)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 571, in _unschedule
    self._cleanup()
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 1094, in _cleanup
    assert not self._pending_coros
AssertionError
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/p/venv/lib64/python3.6/site-packages/cocotb/__init__.py", line 233, in _initialise_testbench
    _initialise_testbench_(argv_)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/__init__.py", line 322, in _initialise_testbench_
    regression_manager._execute()
  File "/p/venv/lib64/python3.6/site-packages/cocotb/regression.py", line 554, in _execute
    return self._start_test()
  File "/p/venv/lib64/python3.6/site-packages/cocotb/regression.py", line 576, in _start_test
    cocotb.scheduler._add_test(self._test_task)
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 844, in _add_test
   NullTrigger(name=f"Start {test_coro!s}", outcome=outcomes.Value(None)),
  File "/p/venv/lib64/python3.6/site-packages/cocotb/scheduler.py", line 636, in _resume_coro_upon
    self._trigger2coros.pop(trigger)
KeyError: <NullTrigger for Start <Test test_digital> at 0x7f34beb70208>
     0.00ns ERROR    cocotb.scheduler                   Failing test at simulator request before test run completion: Simulator shut do
wn prematurely


Got a minimal example that I can take a look at?

Will create one and upload it soon

The MWE is at
https://github.com/jahagirdar/mwe-axierror
The result of running the test is at
https://github.com/jahagirdar/mwe-axierror/actions/runs/5447194793/jobs/9908892004

The working branch uncomments the *id signals and the github actions passes for it.

Yeah, after taking another look at what's going on, it definitely seems to be some sort of issue with cocotb's assertion rewriting.