-
Notifications
You must be signed in to change notification settings - Fork 560
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
[rtl] Fix non-DSP reset in ibex_counter #2228
Conversation
Apologies, I should have re-generated the bitstream after addressing this review comment. I assumed this is purely cosmetically but it actually led to a Vivado synthesis failure :/ |
fdccb6c
to
d92213a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @nasahlpa .
To me it looks like this PR adds a lot more code and makes things much less readable and more complex. It negatively impacts maintenance. I think what we should do:
- Revert the previous PR which introduced the issue.
- Do a PR that maybe doesn't address the comment you mentioned but that implements the change without making it much more complex.
d92213a
to
52ba52a
Compare
As discussed offline:
|
52ba52a
to
603cf8d
Compare
603cf8d
to
d249e50
Compare
d249e50
to
ec5bedb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nasahlpa , this is pretty elegant :-)
rtl/ibex_counter.sv
Outdated
`else | ||
localparam string UseDsp = "no"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use an int type here as well for consistency. Thanks for adding the comment on Vivado requiring int
instead of string
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks.
rtl/ibex_counter.sv
Outdated
counter_q <= '0; | ||
end else begin | ||
counter_q <= counter_d; | ||
generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use generate regions, some tools don't support this and this is why our style guide doesn't permit it: https://github.com/lowRISC/style-guides/blob/master/VerilogCodingStyle.md#generate-constructs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks.
When targeting Xilinx FPGAs, we utilize a DSP for counters with a width of less than 49-bit. In this case, a sync. reset is needed. However, currently, there is a bug in the RTL where also a sync. reset is used for the non-DSP counters on the FPGA. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
ec5bedb
to
83696ec
Compare
Thanks Pascal for addressing the remaining comments, I think we can merge this today. |
When targeting Xilinx FPGAs, we utilize a DSP for counters with a width of less than 49-bit. In this case, a sync. reset is needed. However, currently, there is a bug in the RTL where also a sync. reset is used for the non-DSP counters on the FPGA.