-
Notifications
You must be signed in to change notification settings - Fork 53
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
Parameterize Zicntr and Xif features #951
Parameterize Zicntr and Xif features #951
Conversation
Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
rtl/cv32e40x_cs_registers.sv
Outdated
csr_rdata_int = mhpmcounter_rdata[csr_raddr[4:0]][31:0]; | ||
csr_counter_read_o = 1'b1; | ||
CSR_HPMCOUNTER28, CSR_HPMCOUNTER29, CSR_HPMCOUNTER30, CSR_HPMCOUNTER31 : begin | ||
if (ZICNTR) begin : zicntr_counters |
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.
ZICNTR is a misleading name. Please rename all ZICNTR and zicntr to ZICNTR_ZIHPM and zicntr_zihpm respectively. Or separate ZICNTR and ZIHPM local parameters
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.
Good point, will parameterize them separately.
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.
Pushed this now, also LEC clean.
rtl/cv32e40x_cs_registers.sv
Outdated
csr_counter_read_o = 1'b1; | ||
CSR_HPMCOUNTER28H, CSR_HPMCOUNTER29H, CSR_HPMCOUNTER30H, CSR_HPMCOUNTER31H : begin | ||
if (ZICNTR) begin : zicntr_hcounters | ||
csr_rdata_int = mhpmcounter_rdata[csr_raddr[4:0]][63:32]; |
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.
One less space before =
Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
Parameterized Zicntr only registers.
Parameterized speculative reads for Xif.
LEC clean with ZICNTR=1'b1 and X_EXT=1'b1.
Logically equivalent to cv32e40s with all core exclusive features disabled (ZICNTR=1'b0, X_EXT=1'b0, etc.).