Skip to content

WDT32: Add reset to wden_p to fix WDOV X-propagation after reset#4142

Open
ashnaaseth2325-oss wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
ashnaaseth2325-oss:fix/wdt32-wden-p-reset
Open

WDT32: Add reset to wden_p to fix WDOV X-propagation after reset#4142
ashnaaseth2325-oss wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
ashnaaseth2325-oss:fix/wdt32-wden-p-reset

Conversation

@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor

1. SUMMARY

This PR fixes a reset inconsistency in the wden_p register within the WDT32 module that leads to simulation/synthesis mismatch during startup. The issue affects how the WDOV signal is computed immediately after reset due to an uninitialized register.
Primary changes are in flow/designs/src/chameleon/IPs/WDT32.v within the WDT32 module.


2. FIX

// Before
always @(posedge clk)
  wden_p <= WDEN;

// After
always @(posedge clk or posedge rst)
  if (rst) wden_p <= 1'b0;
  else     wden_p <= WDEN;

3. VERIFICATION

Simulated reset sequence with WDEN=1 asserted during reset and observed WDOV behavior after deassertion. The signal no longer transitions to X and remains stable at 0 until valid conditions are met. Behavior now matches synthesis, eliminating mismatch and X-propagation.

wden_p lacked an async reset, causing a simulation/synthesis
mismatch: WDOV could be driven X in simulation immediately
after reset deassertion when WDEN is asserted.

Signed-off-by: Ashnaa Seth <ashnaaseth2325@gmail.com>
Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds an asynchronous reset to the wden_p register in the WDT32 module to resolve X-propagation issues during simulation. While the change is correct, feedback suggests that a duplicate version of this IP module exists in another directory and should also be updated to ensure consistency across the repository.

Comment on lines +43 to +45
always @(posedge clk or posedge rst)
if (rst) wden_p <= 1'b0;
else wden_p <= WDEN;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The addition of the asynchronous reset to wden_p correctly addresses the X-propagation issue during simulation. However, the same IP module is duplicated at flow/designs/src/chameleon_hier/rtl/IPs/WDT32.v and remains unpatched in this pull request. To ensure consistency across the repository and prevent simulation/synthesis mismatches in designs using the hierarchical path, this fix should be applied to that file as well.

Signed-off-by: Ashnaa Seth <ashnaaseth2325@gmail.com>
Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
@ashnaaseth2325-oss
Copy link
Copy Markdown
Contributor Author

Hello @maliberty ,
I’ve addressed the feedback by applying the same reset fix to the duplicated WDT32 module under chameleon_hier to ensure consistency across both paths.
Please let me know if anything else needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant