"Unable set up RisingEdge(c) Trigger" with Cadence IUS/Xcelium and VHDL
See original GitHub issueWhen 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?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Troubleshooting Xcelium Errors/Warnings with xmhelp ...
The xmhelp utility gives you detailed information about an error or warning message that you may get during the various phases of your...
Read more >Logic Simulation | Vivado Design Suite User Guide - Xilinx
Cadence Xcelium Parallel Simulator ... Set up an install location in Vivado IDE (if not using the Vivado ... fs, ps, ns, us,...
Read more >cocotb/Lobby - Gitter
I see on cocotb/cocotb#1359 that warnings are being added for the combination of VHDL + Cadence. Is the implication that Verilog works as...
Read more >Incisive Simulator Tcl Command Reference
of design abstraction for Verilog, VHDL, and mixed-language. Using the coverage command, you can: □. Setup coverage variables (coverage ...
Read more >Cadence AMS Simulator User Guide -- B. Tcl-Based Debugging
Note: The expr command cannot evaluate calls to Verilog functions. ... For VHDL, you can deposit to ports, signals, and variables if no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
Makefile
such that it uses the shim when compiling with Xcelium:To add a bit more context here for people coming to this bug:
Steps to reproduce the issue
The output will include the following lines:
where Xcelium indicates that it does not support the
vhpiStateP
property ofvhpi_get()
.Analysis
The calling code in question is
vhpi_get(vhpiStateP, new_hdl);
at https://github.com/cocotb/cocotb/blob/ac41bea02b9e09a617fca95421f36dac5029d247/cocotb/share/lib/vhpi/VhpiCbHdl.cpp#L452-L458vhpi_get()
obtains the property of an object, in this case ofnew_hdl
, a callback handle.vhpiStateP
indicates which type of property we’d like to get: the state of the callback.vhpi_get()
should return one of three options:vhpiEnable
,vhpiDisable
orvhpiMature
. Instead, Xcelium returnsvhpiUndefined
, indicating that it does not support getting thevhpiStateP
property from a callback handle.It should be noted that using
vhpiStateP
is not really obscure, as seen in the example code in the VHDL IEEE Std 1076-2019 spec section “23.8 vhpi_enable_cb”: