Replies: 4 comments
-
|
The result yielded by awaiting the call should be the value returned from SV. For example, the DPI 'call_sv_bfm' example contains code like this: pyhdl-if/examples/call/dpi/call_sv_bfm/call_sv_bfm.py Lines 26 to 28 in 45d00cc The error you are seeing seems familar -- and one that was fixed a while ago. Are you obtaining the pyhdl-if library via |
Beta Was this translation helpful? Give feedback.
-
|
I used pip to install pyhdl-if. I using the latest verion. |
Beta Was this translation helpful? Give feedback.
-
|
You can check the version of pyhdl-if using the following command: You should see output like: If you're using the dpi/call_sv_bfm example as-is, you should check the version of the virtual environment that the script creates: Looking at release dates, you probably want to have a release newer than 0.0.1.12736... |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, getting the latest verion fixed the dpi example but the cocotb example still has the same issue when running with VCS. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a read method in PY which calls SV BFM task to read values from a register.
The type of object that gets returned is '_Event'. What method do I need to call to get the register value from this object.
The code is something like this:
The error I get:
print("INSIDE READ Register ret_val Value => {}".format(ret_val.value))
^^^^^^^^^^^^^
AttributeError: '_Event' object has no attribute 'value'
Any ideas on how values can be passed from SV to PY?
Beta Was this translation helpful? Give feedback.
All reactions