-
Notifications
You must be signed in to change notification settings - Fork 707
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
Parameterization and other fixes for downstream project #1950
Conversation
@@ -433,6 +433,9 @@ module cache_ctrl | |||
state_d = IDLE; | |||
end | |||
end | |||
|
|||
default:; |
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.
[verible-verilog-format] reported by reviewdog 🐶
default:; | |
default: ; |
logic [31:0] halfword; | ||
logic [$clog2(CVA6Cfg.DCACHE_LINE_WIDTH)-1:0] cl_offset; |
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.
[verible-verilog-format] reported by reviewdog 🐶
logic [31:0] halfword; | |
logic [$clog2(CVA6Cfg.DCACHE_LINE_WIDTH)-1:0] cl_offset; | |
logic [ 31:0] halfword; | |
logic [ $clog2(CVA6Cfg.DCACHE_LINE_WIDTH)-1:0] cl_offset; |
halfword = '0; | ||
cl_offset = '0; |
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.
[verible-verilog-format] reported by reviewdog 🐶
halfword = '0; | |
cl_offset = '0; | |
halfword = '0; | |
cl_offset = '0; |
@@ -491,6 +495,8 @@ | |||
end | |||
end | |||
end | |||
|
|||
default:; |
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.
[verible-verilog-format] reported by reviewdog 🐶
default:; | |
default: ; |
// pragma translate_off | ||
`ifndef VERILATOR | ||
initial begin | ||
assert (DEPTH > 0) else $error("DEPTH must be greater than 0."); |
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.
[verible-verilog-format] reported by reviewdog 🐶
// pragma translate_off | |
`ifndef VERILATOR | |
initial begin | |
assert (DEPTH > 0) else $error("DEPTH must be greater than 0."); | |
// FIFO is in pass through mode -> do not change the pointers | |
if (FALL_THROUGH && (status_cnt_q == 0) && push_i) begin | |
data_o = data_i; | |
if (pop_i) begin | |
status_cnt_n = status_cnt_q; | |
read_pointer_n = read_pointer_q; | |
write_pointer_n = write_pointer_q; | |
end |
initial begin | ||
assert (DEPTH > 0) else $error("DEPTH must be greater than 0."); | ||
end | ||
|
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.
[verible-verilog-format] reported by reviewdog 🐶
end | |
// sequential process | |
always_ff @(posedge clk_i or negedge rst_ni) begin | |
if (~rst_ni) begin | |
read_pointer_q <= '0; | |
write_pointer_q <= '0; | |
status_cnt_q <= '0; | |
end else begin | |
if (flush_i) begin | |
read_pointer_q <= '0; | |
write_pointer_q <= '0; | |
status_cnt_q <= '0; | |
end else begin | |
read_pointer_q <= read_pointer_n; | |
write_pointer_q <= write_pointer_n; | |
status_cnt_q <= status_cnt_n; | |
end | |
end | |
end | |
if (FPGA_EN) begin : gen_fpga_queue | |
AsyncDpRam #( | |
.ADDR_WIDTH(ADDR_DEPTH), | |
.DATA_DEPTH(DEPTH), | |
.DATA_WIDTH($bits(dtype)) | |
) fifo_ram ( | |
.Clk_CI (clk_i), | |
.WrEn_SI (fifo_ram_we), | |
.RdAddr_DI(fifo_ram_read_address), | |
.WrAddr_DI(fifo_ram_write_address), | |
.WrData_DI(fifo_ram_wdata), | |
.RdData_DO(fifo_ram_rdata) | |
); | |
end else begin : gen_asic_queue | |
always_ff @(posedge clk_i or negedge rst_ni) begin | |
if (~rst_ni) begin | |
mem_q <= '0; | |
end else if (!gate_clock) begin | |
mem_q <= mem_n; | |
end | |
end | |
end | |
full_write : assert property( | ||
@(posedge clk_i) disable iff (~rst_ni) (full_o |-> ~push_i)) | ||
else $fatal (1, "Trying to push new data although the FIFO is full."); | ||
|
||
empty_read : assert property( | ||
@(posedge clk_i) disable iff (~rst_ni) (empty_o |-> ~pop_i)) | ||
else $fatal (1, "Trying to pop data although the FIFO is empty."); |
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.
[verible-verilog-format] reported by reviewdog 🐶
full_write : assert property( | |
@(posedge clk_i) disable iff (~rst_ni) (full_o |-> ~push_i)) | |
else $fatal (1, "Trying to push new data although the FIFO is full."); | |
empty_read : assert property( | |
@(posedge clk_i) disable iff (~rst_ni) (empty_o |-> ~pop_i)) | |
else $fatal (1, "Trying to pop data although the FIFO is empty."); | |
// pragma translate_off | |
`ifndef VERILATOR | |
initial begin | |
assert (DEPTH > 0) | |
else $error("DEPTH must be greater than 0."); | |
end | |
full_write : | |
assert property (@(posedge clk_i) disable iff (~rst_ni) (full_o |-> ~push_i)) | |
else $fatal(1, "Trying to push new data although the FIFO is full."); | |
empty_read : | |
assert property (@(posedge clk_i) disable iff (~rst_ni) (empty_o |-> ~pop_i)) | |
else $fatal(1, "Trying to pop data although the FIFO is empty."); |
@(posedge clk_i) disable iff (~rst_ni) (empty_o |-> ~pop_i)) | ||
else $fatal (1, "Trying to pop data although the FIFO is empty."); | ||
`endif | ||
// pragma translate_on |
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.
[verible-verilog-format] reported by reviewdog 🐶
// pragma translate_on | |
// pragma translate_on |
`endif | ||
// pragma translate_on | ||
|
||
endmodule // fifo_v3 |
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.
[verible-verilog-format] reported by reviewdog 🐶
endmodule // fifo_v3 | |
endmodule // fifo_v3 |
❌ failed run, report available here. |
✔️ successful run, report available here. |
1 similar comment
✔️ successful run, report available here. |
All files contained in cva6/core/ should be fixed by Verible |
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.
Review of parametrization-related things.
❌ failed run, report available here. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ba35588
to
1fab902
Compare
❌ failed run, report available here. |
The interface made a bunch of problems with the typedefs so I've removed it.
.pck (clk_i), | ||
.rstn (rst_ni), | ||
.flush_unissued (flush_unissued_instr_ctrl_id), | ||
.flush_all (flush_ctrl_ex), | ||
.instruction (id_stage_i.fetch_entry_i.instruction), | ||
.fetch_valid (id_stage_i.fetch_entry_valid_i), | ||
.fetch_ack (id_stage_i.fetch_entry_ready_o), | ||
.issue_ack (issue_stage_i.i_scoreboard.issue_ack_i), | ||
.issue_sbe (issue_stage_i.i_scoreboard.issue_instr_o), | ||
.waddr (waddr_commit_id), | ||
.wdata (wdata_commit_id), | ||
.we_gpr (we_gpr_commit_id), | ||
.we_fpr (we_fpr_commit_id), | ||
.commit_instr (commit_instr_id_commit), | ||
.commit_ack (commit_ack), | ||
.st_valid (ex_stage_i.lsu_i.i_store_unit.store_buffer_i.valid_i), | ||
.st_paddr (ex_stage_i.lsu_i.i_store_unit.store_buffer_i.paddr_i), | ||
.ld_valid (ex_stage_i.lsu_i.i_load_unit.req_port_o.tag_valid), | ||
.ld_kill (ex_stage_i.lsu_i.i_load_unit.req_port_o.kill_req), | ||
.ld_paddr (ex_stage_i.lsu_i.i_load_unit.paddr_i), | ||
.resolve_branch (resolved_branch), | ||
.commit_exception (commit_stage_i.exception_o), | ||
.priv_lvl (priv_lvl), | ||
.debug_mode (debug_mode), | ||
.hart_id_i (hart_id_i) |
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.
[verible-verilog-format] reported by reviewdog 🐶
.pck (clk_i), | |
.rstn (rst_ni), | |
.flush_unissued (flush_unissued_instr_ctrl_id), | |
.flush_all (flush_ctrl_ex), | |
.instruction (id_stage_i.fetch_entry_i.instruction), | |
.fetch_valid (id_stage_i.fetch_entry_valid_i), | |
.fetch_ack (id_stage_i.fetch_entry_ready_o), | |
.issue_ack (issue_stage_i.i_scoreboard.issue_ack_i), | |
.issue_sbe (issue_stage_i.i_scoreboard.issue_instr_o), | |
.waddr (waddr_commit_id), | |
.wdata (wdata_commit_id), | |
.we_gpr (we_gpr_commit_id), | |
.we_fpr (we_fpr_commit_id), | |
.commit_instr (commit_instr_id_commit), | |
.commit_ack (commit_ack), | |
.st_valid (ex_stage_i.lsu_i.i_store_unit.store_buffer_i.valid_i), | |
.st_paddr (ex_stage_i.lsu_i.i_store_unit.store_buffer_i.paddr_i), | |
.ld_valid (ex_stage_i.lsu_i.i_load_unit.req_port_o.tag_valid), | |
.ld_kill (ex_stage_i.lsu_i.i_load_unit.req_port_o.kill_req), | |
.ld_paddr (ex_stage_i.lsu_i.i_load_unit.paddr_i), | |
.resolve_branch (resolved_branch), | |
.commit_exception (commit_stage_i.exception_o), | |
.priv_lvl (priv_lvl), | |
.debug_mode (debug_mode), | |
.hart_id_i (hart_id_i) | |
.pck(clk_i), | |
.rstn(rst_ni), | |
.flush_unissued(flush_unissued_instr_ctrl_id), | |
.flush_all(flush_ctrl_ex), | |
.instruction(id_stage_i.fetch_entry_i.instruction), | |
.fetch_valid(id_stage_i.fetch_entry_valid_i), | |
.fetch_ack(id_stage_i.fetch_entry_ready_o), | |
.issue_ack(issue_stage_i.i_scoreboard.issue_ack_i), | |
.issue_sbe(issue_stage_i.i_scoreboard.issue_instr_o), | |
.waddr(waddr_commit_id), | |
.wdata(wdata_commit_id), | |
.we_gpr(we_gpr_commit_id), | |
.we_fpr(we_fpr_commit_id), | |
.commit_instr(commit_instr_id_commit), | |
.commit_ack(commit_ack), | |
.st_valid(ex_stage_i.lsu_i.i_store_unit.store_buffer_i.valid_i), | |
.st_paddr(ex_stage_i.lsu_i.i_store_unit.store_buffer_i.paddr_i), | |
.ld_valid(ex_stage_i.lsu_i.i_load_unit.req_port_o.tag_valid), | |
.ld_kill(ex_stage_i.lsu_i.i_load_unit.req_port_o.kill_req), | |
.ld_paddr(ex_stage_i.lsu_i.i_load_unit.paddr_i), | |
.resolve_branch(resolved_branch), | |
.commit_exception(commit_stage_i.exception_o), | |
.priv_lvl(priv_lvl), | |
.debug_mode(debug_mode), | |
.hart_id_i(hart_id_i) |
There are two other fixes that were needed for questa to understand the nested typedef structs. They are sometimes not that well supported. /cc @domenicw |
✔️ successful run, report available here. |
I've encountered some smaller problems when trying to update. Mostly Bender file lists, etc. that shouldn't affect the majority of users here.
Additionally I've fixed some verilator lint warnings as we run a stricter lint deck in-house.
And
fifo_v3
needs to be forked since it will clash with the originalfifo_v3
fromcommon_cells
.