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

Declare variables before using them #93

Merged
merged 1 commit into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions design/dec/dec.sv
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,6 @@ module dec

assign dec_dbg_rddata[31:0] = dec_i0_wdata_wb[31:0];

dec_ib_ctl instbuff (.*
);

dec_decode_ctl decode (.*);

dec_tlu_ctl tlu (.*);

// Temp hookups
assign wen_bank_id = '0;
assign wr_bank_id = '0;
Expand Down Expand Up @@ -577,6 +570,12 @@ module dec
assign trace_rv_trace_pkt.trace_rv_i_interrupt_ip = {dec_tlu_int_valid_wb1,2'b0};
assign trace_rv_trace_pkt.trace_rv_i_tval_ip = dec_tlu_mtval_wb1[31:0]; // replicate across ports

dec_ib_ctl instbuff (.*
);

dec_decode_ctl decode (.*);

dec_tlu_ctl tlu (.*);


// end trace
Expand Down
7 changes: 4 additions & 3 deletions design/dec/dec_tlu_ctl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ module dec_tlu_ctl
logic csr_wr_clk;
rvoclkhdr csrwr_wb_cgc ( .en(dec_csr_wen_wb_mod | clk_override), .l1clk(csr_wr_clk), .* );
logic lsu_e3_e4_clk, lsu_e4_e5_clk;

// LSU exceptions (LSU responsible for prioritizing simultaneous cases)
lsu_error_pkt_t lsu_error_pkt_dc4;

rvoclkhdr lsu_e3_e4_cgc ( .en(lsu_error_pkt_dc3.exc_valid | lsu_error_pkt_dc4.exc_valid | lsu_error_pkt_dc3.single_ecc_error | lsu_error_pkt_dc4.single_ecc_error | clk_override), .l1clk(lsu_e3_e4_clk), .* );
rvoclkhdr lsu_e4_e5_cgc ( .en(lsu_error_pkt_dc4.exc_valid | lsu_exc_valid_wb | clk_override), .l1clk(lsu_e4_e5_clk), .* );

Expand Down Expand Up @@ -754,9 +758,6 @@ module dec_tlu_ctl
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

// LSU exceptions (LSU responsible for prioritizing simultaneous cases)
lsu_error_pkt_t lsu_error_pkt_dc4;

rvdff #( $bits(lsu_error_pkt_t)+1 ) lsu_error_dc4ff (.*, .clk(lsu_e3_e4_clk), .din({lsu_error_pkt_dc3, lsu_load_ecc_stbuf_full_dc3}), .dout({lsu_error_pkt_dc4, lsu_load_ecc_stbuf_full_dc4}));

logic lsu_single_ecc_error_wb_ns;
Expand Down
15 changes: 7 additions & 8 deletions design/ifu/ifu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@ module ifu

logic ic_hit_f2;

// fetch control
ifu_ifc_ctl ifc (.*
);


`ifdef RV_BTB_48
logic [7:0][1:0] ifu_bp_way_f2; // way indication; right justified
Expand All @@ -279,10 +275,6 @@ module ifu
logic [7:0] ifu_bp_valid_f2; // branch valid, right justified
logic [`RV_BHT_GHR_RANGE] ifu_bp_fghr_f2;

// branch predictor
ifu_bp_ctl bp (.*);


logic [7:0] ic_fetch_val_f2;
logic [127:0] ic_data_f2;
logic [127:0] ifu_fetch_data;
Expand All @@ -302,10 +294,17 @@ module ifu
assign ifu_fetch_val[7:0] = ic_fetch_val_f2[7:0];
assign ifu_fetch_pc[31:1] = ifc_fetch_addr_f2[31:1];

// fetch control
ifu_ifc_ctl ifc (.*
);

// aligner
ifu_aln_ctl aln (.*
);

// branch predictor
ifu_bp_ctl bp (.*);

// icache
ifu_mem_ctl mem_ctl
(.*,
Expand Down
14 changes: 6 additions & 8 deletions design/swerv.sv
Original file line number Diff line number Diff line change
Expand Up @@ -989,14 +989,6 @@ module swerv
.*
);



dec dec (
.dbg_cmd_wrdata(dbg_cmd_wrdata[1:0]),
.rst_l(core_rst_l),
.*
);

exu exu (
.clk_override(dec_tlu_exu_clk_override),
.rst_l(core_rst_l),
Expand All @@ -1017,6 +1009,12 @@ module swerv

logic dec_tlu_claim_ack_wb;

dec dec (
.dbg_cmd_wrdata(dbg_cmd_wrdata[1:0]),
.rst_l(core_rst_l),
.*
);

pic_ctrl pic_ctrl_inst (
.clk_override(dec_tlu_pic_clk_override),
.picm_mken (picm_mken),
Expand Down