-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose force/release to cocotb #1403
Conversation
This PR has a large number of conflicts. Can you try to rebase on top of the current master? |
13c3b4b
to
bc5c5c6
Compare
Indeed, I was a bit behind current master. Should be better now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the rebase, much easier to read now. I'm fine with the general approach and the implementation. Things do to before this can be merged:
- Please add documentation: this needs doc comments in the SetAction classes, and a couple paragraphs of text in the general user guide.
- Please also add a newsfragment, please see https://github.com/cocotb/cocotb/blob/master/documentation/source/newsfragments/README.rst for details.
- Please combine the commits into one and add a descriptive commit message. You can reset the author to be you, but please mention Julius Baxter and Luke Darnell as co-authors.
- Ensure that you have a
Fixes #657
in the commit message as well.
8fb99e1
to
890f4d0
Compare
890f4d0
to
29425c6
Compare
29425c6
to
4bf088a
Compare
4bf088a
to
81361b8
Compare
7d479ba
to
a8f08c7
Compare
2146c7c
to
b546a46
Compare
Any chance someone can test the VHPI implementation? I do not have access to a simulator implementing VHPI at the moment. |
@themperek can probably test that |
e16d9d3
to
387a5c8
Compare
Many thanks everyone for the constructive review yesterday. Today I was able to check the patch also compiles in a Python 3.6.8 environment and the testcase correctly works for Cadence Xcelium and Incisive. On my other machine (Python 3.8) I can test against iverilog (works fine) and ghdl (runs, but force/release is not implemented). Let me know in case there's something else you'd like to see happening for this PR. Edit: I realized that I can test VHPI by using TOPLEVEL_LANG=vhdl in conjunction with incisive and xcelium. Both worked fine. |
This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' and 'Freeze' are added initially. These actions allow placing procedural continuous assignments, which can be useful in the context of fault injection, testbench qualification or mutation coverage. The implementation is based on work done by Jules Baxter <julius.baxter@broadcom.com> and Luke Darnell <luke.darnell@broadcom.com>. Fixes cocotb#657
387a5c8
to
e40b41d
Compare
This isn't true, |
I'm aware of that. Perhaps 'not implemented' is the wording I should have used instead. In case I can establish access to Questa before this is merged I may try also adding an FLI implementation. |
Ah, if you don't have access to Questa, and have no way to test it, it's probably best to leave it out of this PR. I might take a look at adding a more thorough FLI implementation after this PR is in, it's definitely something we want. Thank you for the work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks for all reviews everyone, and thanks @thasti for following up on those.
I finally got around to looking at #657. I have mostly re-applied the patch prepared by @lukedarnell to current master, fixed small issues with it and gave it a test.
As it stands, a testbench running on a VPI simulator can do:
What's still to be done:
I'd already like to hear whether there are some thoughts on how it was implemented to figure out if any significant changes would be required in your opinion.