cocotb: "Unable set up RisingEdge(c) Trigger" with Cadence IUS/Xcelium and VHDL
Current status: See https://github.com/cocotb/cocotb/issues/1076#issuecomment-1351266296 for a summary of the problem.
Cadence tracks the implementation of the missing functionality as Jira ticket AVSREQ-183427.
When I run examples/dff/tests with
make SIM=ius TOPLEVEL_LANG=vhdl COCOTB_LOG_LEVEL=DEBUG COCOTB_SCHEDULER_DEBUG=1 all
I am getting the following output:
0.00ns DEBUG cocotb.regression regression.py:555 in generate_tests Adding generated test "run_test_001" to module "dff_cocotb"
0.00ns INFO cocotb.regression regression.py:187 in initialise Found test dff_cocotb.run_test_001
0.00ns INFO cocotb.regression regression.py:321 in execute Running test 1/1: run_test_001
0.00ns DEBUG cocotb.scheduler scheduler.py:618 in add Adding new coroutine run_test_001
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine run_test_001 with outcome Value(None)
0.00ns INFO ...test.run_test_001.0x7f4ae5046780 decorators.py:253 in _advance Starting test: "run_test_001"
Description: Automatically generated test
0.00ns DEBUG ...test.run_test_001.0x7f4ae5046780 decorators.py:258 in _advance Sending Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine run_test_001 yielded run_test (mode 1)
0.00ns DEBUG cocotb.scheduler scheduler.py:645 in _trigger_from_unstarted_coro Scheduling nested coroutine: run_test
0.00ns DEBUG cocotb.scheduler scheduler.py:618 in add Adding new coroutine run_test
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine run_test with outcome Value(None)
0.00ns DEBUG cocotb.c handle.py:84 in __init__ Created
0.00ns DEBUG cocotb.scheduler scheduler.py:618 in add Adding new coroutine start
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine start with outcome Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _do_writes with outcome Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine _do_writes yielded _Event (mode 1)
0.00ns DEBUG cocotb.scheduler scheduler.py:372 in _event_loop Trigger fired: _Event
0.00ns DEBUG cocotb.scheduler scheduler.py:434 in _event_loop 1 pending coroutines for event _Event
_do_writes
0.00ns DEBUG cocotb.scheduler scheduler.py:441 in _event_loop Scheduling coroutine _do_writes
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _do_writes with outcome Value(<cocotb.triggers._Event object at 0x7f4ae491f548>)
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine _do_writes yielded ReadWrite(readwritesync) (mode 1)
0.00ns DEBUG cocotb.scheduler scheduler.py:444 in _event_loop Scheduled coroutine _do_writes
0.00ns DEBUG cocotb.scheduler scheduler.py:463 in _event_loop All coroutines scheduled, handing control back to simulator
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine start yielded Timer(2500000.00ps) (mode 1)
0.00ns DEBUG cocotb.d handle.py:84 in __init__ Created
0.00ns DEBUG cocotb.q handle.py:84 in __init__ Created
0.00ns DEBUG cocotb.scheduler scheduler.py:618 in add Adding new coroutine _monitor_recv
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _monitor_recv with outcome Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine _monitor_recv yielded RisingEdge(c) (mode 1)
0.00ns ERROR cocotb.RisingEdge.0x7f4ae4925c28 result.py:52 in raise_error Unable set up RisingEdge(c) Trigger
NoneType: None
0.00ns DEBUG cocotb.scheduler scheduler.py:372 in _event_loop Trigger fired: NullTrigger()
0.00ns DEBUG cocotb.scheduler scheduler.py:434 in _event_loop 1 pending coroutines for event NullTrigger()
_monitor_recv
0.00ns DEBUG cocotb.scheduler scheduler.py:441 in _event_loop Scheduling coroutine _monitor_recv
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _monitor_recv with outcome Error(TestError('Unable set up RisingEdge(c) Trigger'))
0.00ns DEBUG cocotb.scheduler scheduler.py:714 in schedule Coroutine completed: _monitor_recv
0.00ns DEBUG cocotb.scheduler scheduler.py:491 in unschedule TestComplete received: TestError
0.00ns DEBUG cocotb.scheduler scheduler.py:754 in finish_test finish_test called with TestError('Unable set up RisingEdge(c) Trigger')
0.00ns DEBUG cocotb.scheduler scheduler.py:780 in cleanup Killing start
0.00ns DEBUG ..tb.coroutine.start.0x7f4ae4924198 decorators.py:182 in kill kill() called on coroutine
0.00ns DEBUG cocotb.scheduler scheduler.py:780 in cleanup Killing _do_writes
0.00ns DEBUG ..routine._do_writes.0x7f4ae4924278 decorators.py:182 in kill kill() called on coroutine
0.00ns DEBUG cocotb.scheduler scheduler.py:780 in cleanup Killing run_test_001
0.00ns DEBUG ...test.run_test_001.0x7f4ae5046780 decorators.py:182 in kill kill() called on coroutine
0.00ns DEBUG cocotb.scheduler scheduler.py:444 in _event_loop Scheduled coroutine _monitor_recv
0.00ns DEBUG cocotb.scheduler scheduler.py:276 in _check_termination Test terminating, scheduling Timer
0.00ns DEBUG cocotb.scheduler scheduler.py:463 in _event_loop All coroutines scheduled, handing control back to simulator
0.00ns INFO cocotb.scoreboard.dff scoreboard.py:216 in add_interface Created with reorder_depth 0
0.00ns DEBUG cocotb.monitor.BitMonitor __init__.py:112 in add_callback Adding callback of function check_received_transaction to monitor
0.00ns DEBUG cocotb.monitor.BitMonitor __init__.py:112 in add_callback Adding callback of function model to monitor
0.00ns DEBUG cocotb.scheduler scheduler.py:618 in add Adding new coroutine _monitor_recv
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _monitor_recv with outcome Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine _monitor_recv yielded RisingEdge(c) (mode 4)
0.00ns ERROR cocotb.RisingEdge.0x7f4ae4925c28 result.py:52 in raise_error Unable set up RisingEdge(c) Trigger
NoneType: None
0.00ns DEBUG cocotb.scheduler scheduler.py:372 in _event_loop Trigger fired: NullTrigger()
0.00ns DEBUG cocotb.scheduler scheduler.py:378 in _event_loop Ignoring trigger NullTrigger() since we're terminating
0.00ns DEBUG cocotb.scheduler scheduler.py:618 in add Adding new coroutine _cr_twiddler
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _cr_twiddler with outcome Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:695 in schedule Scheduling coroutine _do_writes with outcome Value(None)
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine _do_writes yielded _Event (mode 4)
0.00ns DEBUG cocotb.scheduler scheduler.py:372 in _event_loop Trigger fired: _Event
0.00ns DEBUG cocotb.scheduler scheduler.py:378 in _event_loop Ignoring trigger _Event since we're terminating
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine _cr_twiddler yielded RisingEdge(c) (mode 4)
0.00ns ERROR cocotb.RisingEdge.0x7f4ae4925c28 result.py:52 in raise_error Unable set up RisingEdge(c) Trigger
NoneType: None
0.00ns DEBUG cocotb.scheduler scheduler.py:372 in _event_loop Trigger fired: NullTrigger()
0.00ns DEBUG cocotb.scheduler scheduler.py:378 in _event_loop Ignoring trigger NullTrigger() since we're terminating
0.00ns DEBUG cocotb.scheduler scheduler.py:701 in schedule Coroutine run_test yielded RisingEdge(c) (mode 4)
0.00ns ERROR cocotb.RisingEdge.0x7f4ae4925c28 result.py:52 in raise_error Unable set up RisingEdge(c) Trigger
NoneType: None
0.00ns DEBUG cocotb.scheduler scheduler.py:372 in _event_loop Trigger fired: NullTrigger()
0.00ns DEBUG cocotb.scheduler scheduler.py:378 in _event_loop Ignoring trigger NullTrigger() since we're terminating
1.00ns DEBUG cocotb.scheduler scheduler.py:303 in begin_test begin_test called with trigger: Timer(1000.00ps)
1.00ns DEBUG cocotb.scheduler scheduler.py:319 in begin_test Issue test result to regression object
1.00ns ERROR cocotb.regression regression.py:300 in handle_result Test Failed: run_test_001 (result was TestError)
1.00ns ERROR cocotb.regression regression.py:207 in tear_down Failed 1 out of 1 tests (0 skipped)
(I have modified line 695 of scheduler.py to read self.log.debug("Scheduling coroutine {} with outcome {}".format(coroutine.__name__, send_outcome)) here.)
Any hints as to how to approach debugging this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 32 (19 by maintainers)
Commits related to this issue
- Xcelium: Skip mixed-language discovery tests The mixed-language discovery tests result in a nested VPI/VHPI call structure, similar to what's tracked in https://github.com/cocotb/cocotb/issues/1076. ... — committed to imphil/cocotb by imphil a year ago
- Xcelium: Skip mixed-language discovery tests The mixed-language discovery tests result in a nested VPI/VHPI call structure, similar to what's tracked in https://github.com/cocotb/cocotb/issues/1076. ... — committed to cocotb/cocotb by imphil a year ago
- Remove fail markers for Xcelium VHDL Issue #1076 is resolved in upcoming Xcelium releases and the tests don't fail any more. Remove the associated markers. Since Xcelium VHDL was effectively unusabl... — committed to imphil/cocotb by imphil 9 months ago
- Remove fail markers for Xcelium VHDL Issue #1076 is resolved in Xcelium 23.09.004 and the tests don't fail any more. Remove the associated markers. Since Xcelium VHDL was effectively unusable before... — committed to imphil/cocotb by imphil 9 months ago
- Xcelium: Set feature flag to make VHDL toplevels work Xcelium 23.09.004 (and some other hotfix releases) contain a fix for https://github.com/cocotb/cocotb/issues/1076, which is enabled when setting ... — committed to imphil/cocotb by imphil 6 months ago
- Xcelium: Set feature flag to make VHDL toplevels work Xcelium 23.09.004 (and some other hotfix releases) contain a fix for https://github.com/cocotb/cocotb/issues/1076, which is enabled when setting ... — committed to imphil/cocotb by imphil 6 months ago
- Remove fail markers for Xcelium VHDL Issue #1076 is resolved in Xcelium 23.09.004 and the tests don't fail any more. Remove the associated markers. Since Xcelium VHDL was effectively unusable before... — committed to imphil/cocotb by imphil 9 months ago
- Xcelium: Set feature flag to make VHDL toplevels work Xcelium 23.09.004 (and some other hotfix releases) contain a fix for https://github.com/cocotb/cocotb/issues/1076, which is enabled when setting ... — committed to imphil/cocotb by imphil 6 months ago
- Xcelium: Set feature flag to make VHDL toplevels work Xcelium 23.09.004 (and some other hotfix releases) contain a fix for https://github.com/cocotb/cocotb/issues/1076, which is enabled when setting ... — committed to imphil/cocotb by imphil 6 months ago
- Xcelium: Set feature flag to make VHDL toplevels work Xcelium 23.09.004 (and some other hotfix releases) contain a fix for https://github.com/cocotb/cocotb/issues/1076, which is enabled when setting ... — committed to imphil/cocotb by imphil 6 months ago
- Remove fail markers for Xcelium VHDL Issue #1076 is resolved in Xcelium 23.09.004 and the tests don't fail any more. Remove the associated markers. Since Xcelium VHDL was effectively unusable before... — committed to imphil/cocotb by imphil 9 months ago
- Remove fail markers for Xcelium VHDL Issue #1076 is resolved in Xcelium 23.09.004 and the tests don't fail any more. Remove the associated markers. Since Xcelium VHDL was effectively unusable before... — committed to cocotb/cocotb by imphil 9 months ago
- Xcelium: Set feature flag to make VHDL toplevels work Xcelium 23.09.004 (and some other hotfix releases) contain a fix for https://github.com/cocotb/cocotb/issues/1076, which is enabled when setting ... — committed to PLC2/cocotb by imphil 6 months ago
We’re encountering this issue when using Xcelium too. Because it supports cross-language compilation, you can write a Verilog shim. This makes cocotb talk to the simulator over VPI which doesn’t encounter similar issues as the VHPI codepath.
Workaround example
Click to expand
The following cocotb test case + hdl files work fine in GHDL but fail with Xcelium:
adder.vhdl:
test.py:
Makefile:
To work around this, add a Verilog shim:
adder_shim.v:
and change your
Makefilesuch that it uses the shim when compiling with Xcelium: