cocotb: ability to force/freeze signal
rather than just being able to deposit signals, it is helpful to force signals inside a design.
Would be great if cocotb would support that.
Maybe as an signalname attribute.
dut.signalname._force = 1
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (13 by maintainers)
Commits related to this issue
- Force, release and freeze capability added for VPI only at present. VHPI and other ways still to do. Added test in wlan_into #657 — committed to lukedarnell/cocotb by deleted user 7 years ago
- Force, release and freeze capability added for VPI only at present. VHPI and other ways still to do. Added test in wlan_into #657 — committed to thasti/cocotb by deleted user 7 years ago
- Force, release and freeze capability added for VPI only at present. VHPI and other ways still to do. Added test in wlan_into #657 — committed to thasti/cocotb by deleted user 7 years ago
- Force, release and freeze capability added for VPI only at present. VHPI and other ways still to do. Added test in wlan_into #657 — committed to thasti/cocotb by deleted user 7 years ago
- Force, release and freeze capability added for VPI only at present. VHPI and other ways still to do. Added test in wlan_into #657 — committed to thasti/cocotb by deleted user 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
- Add force, release and freeze actions for simulator handles This commit adds the notion of SetActions to simulator handles. The default action type is 'Deposit', and actions for 'Force', 'Release' an... — committed to thasti/cocotb by thasti 7 years ago
Force/release would allow us to build a tool for what is called “testbench qualification” or “mutation coverage” - inject an error into the design, run a regression test and check that at least one of the tests finds the injected error. If the error is not detected, the testbench is too sloppy.
We could start by injecting stuck-at faults at the DUT ports (I have a pull request coming up for providing
_is_port
and_port_direction
attributes for discovered objects).This could be a good project for something like Google’s Summer of Code.
Ok, I will do a pull request with the changes.
Here’s the commit: https://github.com/lukedarnell/cocotb/commit/ad1d7c2fcff990970627b4c5e5a05ab24374fa36
It’s on top of a pretty old version, and porting to the latest master was non-trivial. Any volunteers to port this to the latest master?
@imphil @tonywmnix we do have changes with this functionality implemented as documented earlier in this issue. I’ll try and get a pull request to you in the next couple of days.
@s3bs we have a change that implements force, freeze, deposit and release.
The syntax is:
dut.stream_in_ready <= Force(1)
dut.stream_in_ready <= Release()
dut.stream_in_ready <= Deposit(BinaryValue('x'))
dut.stream_in_ready <= Freeze()
@chiggs @stuarthodgson Does that syntax make sense?
@lukedarnell Thank you for sharing, I’ll take a look! @themperek Yes, I’d be willing to help. Will come back to you as soon as I have an overview.
@lukedarnell any chance of trying out your patch? Sounds very intriguing!
@lukedarnell Any update on this?