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

Parametrization step 3 part 1 #1935

Merged
merged 46 commits into from
Mar 15, 2024

Conversation

cathales
Copy link
Contributor

This PR moves values out of packages so that they can be configured by the configuration structure.

This is the third step for #1451. Many values are moved but not all values are moved yet (do not close the issue).

See also the announcement on Mattermost

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

verible-verilog-format

core/cache_subsystem/wt_dcache_mem.sv|33|
core/cache_subsystem/wt_dcache_mem.sv|55|
core/cache_subsystem/wt_dcache_mem.sv|59|
core/cache_subsystem/wt_dcache_mem.sv|99|
core/cache_subsystem/wt_dcache_mem.sv|207|
core/cache_subsystem/wt_dcache_mem.sv|216|
core/cache_subsystem/wt_dcache_mem.sv|229|
core/cache_subsystem/wt_dcache_missunit.sv|122|
core/cache_subsystem/wt_dcache_missunit.sv|125|
core/cache_subsystem/wt_dcache_missunit.sv|128|
core/cache_subsystem/wt_dcache_wbuffer.sv|211|
core/csr_regfile.sv|303|
core/cva6.sv|69|
core/cva6.sv|73|
core/cva6.sv|90|
core/cva6.sv|170|
core/cva6.sv|180|
core/cva6.sv|501|
core/cvxif_example/cvxif_example_coprocessor.sv|114|
core/cvxif_fu.sv|33|
core/cvxif_fu.sv|37|
core/frontend/bht.sv|130|
core/frontend/frontend.sv|92|
core/frontend/frontend.sv|99|
core/frontend/frontend.sv|138|
core/frontend/frontend.sv|147|
core/frontend/frontend.sv|152|
core/frontend/instr_queue.sv|102|
core/frontend/instr_queue.sv|150|
core/frontend/instr_queue.sv|309|
core/include/build_config_pkg.sv|102|
core/include/build_config_pkg.sv|108|
core/include/config_pkg.sv|50|
core/include/config_pkg.sv|146|
core/include/config_pkg.sv|148|
core/include/config_pkg.sv|150|
core/include/config_pkg.sv|152|
core/include/config_pkg.sv|154|
core/include/config_pkg.sv|156|
core/include/config_pkg.sv|158|
core/include/config_pkg.sv|160|
core/include/config_pkg.sv|162|
core/include/config_pkg.sv|168|
core/load_store_unit.sv|92|
core/load_store_unit.sv|96|
core/load_store_unit.sv|167|
core/load_store_unit.sv|171|
core/load_store_unit.sv|173|
core/load_store_unit.sv|176|
core/load_unit.sv|93|
core/load_unit.sv|95|
core/load_unit.sv|476|
core/mmu_sv32/cva6_ptw_sv32.sv|68|
core/mmu_sv39/ptw.sv|63|
core/mmu_sv39/tlb.sv|48|
core/mmu_sv39/tlb.sv|59|
core/mult.sv|24|
core/multiplier.sv|26|
core/multiplier.sv|30|
core/multiplier.sv|42|
core/multiplier.sv|82|
core/scoreboard.sv|117|
core/scoreboard.sv|264|

@@ -30,7 +30,7 @@ module acc_dispatcher
logic [riscv::XLEN-1:0] rs1;
logic [riscv::XLEN-1:0] rs2;
fpnew_pkg::roundmode_e frm;
logic [ariane_pkg::TRANS_ID_BITS-1:0] trans_id;
logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id;
logic store_pending;
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic store_pending;
logic store_pending;

Comment on lines 41 to 43
logic req_ready;
logic resp_valid;
logic [riscv::XLEN-1:0] result;
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic req_ready;
logic resp_valid;
logic [riscv::XLEN-1:0] result;
logic req_ready;
logic resp_valid;
logic [riscv::XLEN-1:0] result;

@@ -41,7 +41,7 @@
logic req_ready;
logic resp_valid;
logic [riscv::XLEN-1:0] result;
logic [ariane_pkg::TRANS_ID_BITS-1:0] trans_id;
logic [CVA6Cfg.TRANS_ID_BITS-1:0] trans_id;
logic error;
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic error;
logic error;


always_comb begin : way_select
cl_i = '0;
for (int unsigned i = 0; i < DCACHE_SET_ASSOC; i++) if (hit_way_i[i]) cl_i = data_i[i].data;
for (int unsigned i = 0; i < CVA6Cfg.DCACHE_SET_ASSOC; i++) if (hit_way_i[i]) cl_i = data_i[i].data;
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
for (int unsigned i = 0; i < CVA6Cfg.DCACHE_SET_ASSOC; i++) if (hit_way_i[i]) cl_i = data_i[i].data;
for (int unsigned i = 0; i < CVA6Cfg.DCACHE_SET_ASSOC; i++)
if (hit_way_i[i]) cl_i = data_i[i].data;

@@ -520,8 +520,7 @@ module cva6_hpdcache_subsystem
// AXI arbiter instantiation
// {{{
cva6_hpdcache_subsystem_axi_arbiter #(
.HPDcacheMemIdWidth (CVA6Cfg.MEM_TID_WIDTH),
.HPDcacheMemDataWidth (CVA6Cfg.AxiDataWidth),
.CVA6Cfg(CVA6Cfg),
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.CVA6Cfg(CVA6Cfg),
.CVA6Cfg (CVA6Cfg),

Comment on lines 40 to 43
output logic [ ADDR_WIDTH-1:0] addr_o,
output l_data_t wdata_o,
output logic we_o,
output l_be_t be_o,
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
output logic [ ADDR_WIDTH-1:0] addr_o,
output l_data_t wdata_o,
output logic we_o,
output l_be_t be_o,
output logic [ ADDR_WIDTH-1:0] addr_o,
output l_data_t wdata_o,
output logic we_o,
output l_be_t be_o,

Comment on lines 82 to 83
logic [CVA6Cfg.DCACHE_INDEX_WIDTH-1:0] idx; // physical address to invalidate
logic [CVA6Cfg.DCACHE_SET_ASSOC_WIDTH-1:0] way; // way to invalidate
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic [CVA6Cfg.DCACHE_INDEX_WIDTH-1:0] idx; // physical address to invalidate
logic [CVA6Cfg.DCACHE_SET_ASSOC_WIDTH-1:0] way; // way to invalidate
logic [CVA6Cfg.DCACHE_INDEX_WIDTH-1:0] idx; // physical address to invalidate
logic [CVA6Cfg.DCACHE_SET_ASSOC_WIDTH-1:0] way; // way to invalidate

Comment on lines 75 to 91
logic wr_cl_vld;
logic wr_cl_nc;
logic [ DCACHE_SET_ASSOC-1:0] wr_cl_we;
logic [ DCACHE_TAG_WIDTH-1:0] wr_cl_tag;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_cl_we;
logic [ CVA6Cfg.DCACHE_TAG_WIDTH-1:0] wr_cl_tag;
logic [ DCACHE_CL_IDX_WIDTH-1:0] wr_cl_idx;
logic [ DCACHE_OFFSET_WIDTH-1:0] wr_cl_off;
logic [ DCACHE_LINE_WIDTH-1:0] wr_cl_data;
logic [DCACHE_USER_LINE_WIDTH-1:0] wr_cl_user;
logic [ DCACHE_LINE_WIDTH/8-1:0] wr_cl_data_be;
logic [ DCACHE_SET_ASSOC-1:0] wr_vld_bits;
logic [ DCACHE_SET_ASSOC-1:0] wr_req;
logic [ CVA6Cfg.DCACHE_OFFSET_WIDTH-1:0] wr_cl_off;
logic [ CVA6Cfg.DCACHE_LINE_WIDTH-1:0] wr_cl_data;
logic [CVA6Cfg.DCACHE_USER_LINE_WIDTH-1:0] wr_cl_user;
logic [ CVA6Cfg.DCACHE_LINE_WIDTH/8-1:0] wr_cl_data_be;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_vld_bits;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_req;
logic wr_ack;
logic [ DCACHE_CL_IDX_WIDTH-1:0] wr_idx;
logic [ DCACHE_OFFSET_WIDTH-1:0] wr_off;
logic [ CVA6Cfg.DCACHE_OFFSET_WIDTH-1:0] wr_off;
logic [ riscv::XLEN-1:0] wr_data;
logic [ (riscv::XLEN/8)-1:0] wr_data_be;
logic [ DCACHE_USER_WIDTH-1:0] wr_user;
logic [ CVA6Cfg.DCACHE_USER_WIDTH-1:0] wr_user;
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic wr_cl_vld;
logic wr_cl_nc;
logic [ DCACHE_SET_ASSOC-1:0] wr_cl_we;
logic [ DCACHE_TAG_WIDTH-1:0] wr_cl_tag;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_cl_we;
logic [ CVA6Cfg.DCACHE_TAG_WIDTH-1:0] wr_cl_tag;
logic [ DCACHE_CL_IDX_WIDTH-1:0] wr_cl_idx;
logic [ DCACHE_OFFSET_WIDTH-1:0] wr_cl_off;
logic [ DCACHE_LINE_WIDTH-1:0] wr_cl_data;
logic [DCACHE_USER_LINE_WIDTH-1:0] wr_cl_user;
logic [ DCACHE_LINE_WIDTH/8-1:0] wr_cl_data_be;
logic [ DCACHE_SET_ASSOC-1:0] wr_vld_bits;
logic [ DCACHE_SET_ASSOC-1:0] wr_req;
logic [ CVA6Cfg.DCACHE_OFFSET_WIDTH-1:0] wr_cl_off;
logic [ CVA6Cfg.DCACHE_LINE_WIDTH-1:0] wr_cl_data;
logic [CVA6Cfg.DCACHE_USER_LINE_WIDTH-1:0] wr_cl_user;
logic [ CVA6Cfg.DCACHE_LINE_WIDTH/8-1:0] wr_cl_data_be;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_vld_bits;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_req;
logic wr_ack;
logic [ DCACHE_CL_IDX_WIDTH-1:0] wr_idx;
logic [ DCACHE_OFFSET_WIDTH-1:0] wr_off;
logic [ CVA6Cfg.DCACHE_OFFSET_WIDTH-1:0] wr_off;
logic [ riscv::XLEN-1:0] wr_data;
logic [ (riscv::XLEN/8)-1:0] wr_data_be;
logic [ DCACHE_USER_WIDTH-1:0] wr_user;
logic [ CVA6Cfg.DCACHE_USER_WIDTH-1:0] wr_user;
logic wr_cl_vld;
logic wr_cl_nc;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_cl_we;
logic [ CVA6Cfg.DCACHE_TAG_WIDTH-1:0] wr_cl_tag;
logic [ DCACHE_CL_IDX_WIDTH-1:0] wr_cl_idx;
logic [ CVA6Cfg.DCACHE_OFFSET_WIDTH-1:0] wr_cl_off;
logic [ CVA6Cfg.DCACHE_LINE_WIDTH-1:0] wr_cl_data;
logic [CVA6Cfg.DCACHE_USER_LINE_WIDTH-1:0] wr_cl_user;
logic [ CVA6Cfg.DCACHE_LINE_WIDTH/8-1:0] wr_cl_data_be;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_vld_bits;
logic [ CVA6Cfg.DCACHE_SET_ASSOC-1:0] wr_req;
logic wr_ack;
logic [ DCACHE_CL_IDX_WIDTH-1:0] wr_idx;
logic [ CVA6Cfg.DCACHE_OFFSET_WIDTH-1:0] wr_off;
logic [ riscv::XLEN-1:0] wr_data;
logic [ (riscv::XLEN/8)-1:0] wr_data_be;
logic [ CVA6Cfg.DCACHE_USER_WIDTH-1:0] wr_user;

@@ -318,6 +323,7 @@

wt_dcache_mem #(
.CVA6Cfg (CVA6Cfg),
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.CVA6Cfg (CVA6Cfg),
.CVA6Cfg(CVA6Cfg),

@@ -318,6 +323,7 @@

wt_dcache_mem #(
.CVA6Cfg (CVA6Cfg),
.DCACHE_CL_IDX_WIDTH(DCACHE_CL_IDX_WIDTH),
.wbuffer_t(wbuffer_t),
.NumPorts (NumPorts)
Copy link
Contributor

Choose a reason for hiding this comment

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

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.NumPorts (NumPorts)
.NumPorts(NumPorts)

Copy link
Contributor

✔️ successful run, report available here.

@ASintzoff ASintzoff merged commit 987c645 into openhwgroup:master Mar 15, 2024
6 checks passed
@cathales cathales deleted the parametrization branch March 15, 2024 17:23
@cathales cathales changed the title Parametrization step 3 Parametrization step 3 part 1 Mar 15, 2024
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.

2 participants