In NVC, there seems to be a check, which doesn't allow this. When Cocotb tries to access the package, it gives the following error:
2.00ns WARNING gpi VHPI: DUT 'MY_DUT' doesn't match requested toplevel my_pkg
2.00ns ERROR gpi No root handle found
2.00ns INFO cocotb.regression pu_filter_random_test.basic_pu_filter_test failed
Traceback (most recent call last):
File "/cocotb/regression.py", line 158, in func
res = await cocotb.triggers.with_timeout(
File "/cocotb/triggers.py", line 1014, in with_timeout
res = await First(timeout_timer, trigger)
File "/cocotb/triggers.py", line 902, in _wait
return await first_trigger # the first of multiple triggers that fired
File "/cocotb/triggers.py", line 136, in __await__
return (yield self)
File "/cocotb/task.py", line 235, in __await__
return (yield self)
File "my_test.py", line 98, in run_phase
my_pkg = cocotb.handle.SimHandle(cocotb.simulator.get_root_handle("my_pkg"))
File "/cocotb/handle.py", line 1033, in SimHandle
t = handle.get_type()
AttributeError: 'NoneType' object has no attribute 'get_type'
Hi,
It's common to have constants defined in VHDL packages. Based on cocotb issue 1833, the only way to access the packages is using
In NVC, there seems to be a check, which doesn't allow this. When Cocotb tries to access the package, it gives the following error:
nvc version
cocotb version =
2.0.0.dev0+65d102f2
Is it possible to relax that check ?