-
Notifications
You must be signed in to change notification settings - Fork 45
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
Ambiguous reset condition - nonce_offset_i #444
Comments
Duplicates: #339 |
Can we include this in the lint PR? |
Formality will not match #2. We can include fix #2 in the PR, though it will break our RTL=RTL formal verification that is otherwise passing for all other proposed fixes. |
We can sequence it as separate PRs, but I think this fix is a quality of life fix for integrators that should be pulled into 1.1. I'll let other weigh in on it if they have any objections. I think fix 2 is my preference. Properly reset the signal. |
Sure... let me send out summary and let's do PR with formality passing. There's some low hanging fruit in the remainder that we can swarm on quickly as an incremental. |
@Nitsirks and @nstewart-amd - Could we please close this and other lint issues once the 1.1 Lint PR is completed? |
"./pcrvault/rtl/pv_gen_hash.sv"
Register nonce_offset_i is in "else" condition but not in reset condition of synchronous always block.
This asymmetry can lead to complications with LINT, netlist synthesis, and formal verification closure.
Current:
always_ff @(posedge clk or negedge rst_b) begin : api_regs
if (~rst_b) begin
gen_hash_fsm_ps <= GEN_HASH_IDLE;
block_offset_i <= '0;
read_entry <= '0;
read_offset <= '0;
end
else begin
gen_hash_fsm_ps <= gen_hash_fsm_ns;
block_offset_i <= block_offset_nxt;
nonce_offset_i <= nonce_offset_nxt;
read_entry <= read_entry_nxt;
read_offset <= read_offset_nxt;
end
end
Recommend:
always_ff @(posedge clk or negedge rst_b) begin : api_regs
if (~rst_b) begin
gen_hash_fsm_ps <= GEN_HASH_IDLE;
block_offset_i <= '0;
read_entry <= '0;
read_offset <= '0;
end
else begin
gen_hash_fsm_ps <= gen_hash_fsm_ns;
block_offset_i <= block_offset_nxt;
//nonce_offset_i <= nonce_offset_nxt;
read_entry <= read_entry_nxt;
read_offset <= read_offset_nxt;
end
end
always_ff @(posedge clk) begin : api_regs_noreset
nonce_offset_i <= nonce_offset_nxt;
end
or Recommend:
always_ff @(posedge clk or negedge rst_b) begin : api_regs
if (~rst_b) begin
gen_hash_fsm_ps <= GEN_HASH_IDLE;
block_offset_i <= '0;
nonce_offset_i <= '0;
read_entry <= '0;
read_offset <= '0;
end
else begin
gen_hash_fsm_ps <= gen_hash_fsm_ns;
block_offset_i <= block_offset_nxt;
nonce_offset_i <= nonce_offset_nxt;
read_entry <= read_entry_nxt;
read_offset <= read_offset_nxt;
end
end
The text was updated successfully, but these errors were encountered: