Test termination: Delegate decision to testbench instead of using explicit $finish. #1125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces explicit use of
$finish()
in RVFI tracer with proper propagation of end-of-test information to the verification testbench:$finish()
statement the RFVI tracer now outputs the end-of-test event and the test exit code on new outputend_of_test_o
.1'b1
into bit 0 of memory variabletohost
) and to report the exit code of the test (bits [31:1] of the word written intotohost
upon end-of-test). The Verilator testbench end-of-test messages were aligned on those of the VCS testbench.Once the end-of-test condition is detected, the
end_of_test_o
output of RVFI tracer is set and held indefinitely.FORNOW: Upon hitting the programmable timeout, the RVFI tracer raises an end-of-test condition with the test exit code value
31'h7fff_ffff
, equivalent to writing32'hffff_ffff
intotohost
. Once the timeout feature is moved outside of the RVFI tracer, this behavior may be removed.