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

Parameterize Zicntr and Xif features #951

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

halfdan-dolva
Copy link
Contributor

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.).

Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
Signed-off-by: Halfdan Bechmann Dolva <halfdan.bechmann@silabs.com>
@halfdan-dolva halfdan-dolva added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Sep 15, 2023
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
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

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];
Copy link
Contributor

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>
@Silabs-ArjanB Silabs-ArjanB merged commit eb509ad into openhwgroup:master Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants