Skip to content
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

[otbn,dv] Exit on mismatch in otbn_top_sim #8144

Merged
merged 1 commit into from Sep 10, 2021

Conversation

rswarbrick
Copy link
Contributor

Now we'll print out the error message from one of the mismatches first
and then will stop a couple of cycles later (to allow things like
multiple errors in a cycle or wave dumping to proceed properly).

Example output:

Simulation running, end by pressing CTRL-c.
ERROR: At time 164, otbn_done_q != otbn_model_done (0 != 1).
ERROR: At time 164, insn_cnt != otbn_model_insn_cnt (0x27 != 0x26).
[171] %Error: otbn_top_sim.sv:347: Assertion failed in TOP.otbn_top_sim: Mismatch or model error (see message above)
%Error: ../src/lowrisc_ip_otbn_top_sim_0.1/otbn_top_sim.sv:347: Verilog $stop

@rswarbrick rswarbrick added Component:DV DV issue: testbench, test case, etc. Type:Enhancement Feature requests, enhancements Component:OTBN labels Sep 10, 2021
@rswarbrick rswarbrick added this to In review in DEPRECATED - OTBN Development via automation Sep 10, 2021
assign err_latched = model_err_latched | done_mismatch_latched | err_bits_mismatch_latched;

int bad_cycles;
always @(negedge IO_CLK or negedge IO_RST_N) begin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
always @(negedge IO_CLK or negedge IO_RST_N) begin
always_ff @(negedge IO_CLK or negedge IO_RST_N) begin

Now we'll print out the error message from one of the mismatches first
and then will stop a couple of cycles later (to allow things like
multiple errors in a cycle or wave dumping to proceed properly).

Example output:

    Simulation running, end by pressing CTRL-c.
    ERROR: At time 164, otbn_done_q != otbn_model_done (0 != 1).
    ERROR: At time 164, insn_cnt != otbn_model_insn_cnt (0x27 != 0x26).
    [171] %Error: otbn_top_sim.sv:347: Assertion failed in TOP.otbn_top_sim: Mismatch or model error (see message above)
    %Error: ../src/lowrisc_ip_otbn_top_sim_0.1/otbn_top_sim.sv:347: Verilog $stop

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
@rswarbrick rswarbrick merged commit aa98dee into lowRISC:master Sep 10, 2021
DEPRECATED - OTBN Development automation moved this from In review to Done Sep 10, 2021
@rswarbrick rswarbrick deleted the otbn-top-sim-early-exit branch September 10, 2021 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. Type:Enhancement Feature requests, enhancements
Development

Successfully merging this pull request may close these issues.

None yet

2 participants