-
Notifications
You must be signed in to change notification settings - Fork 685
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
[Scratchpads] Needed packages for scratchpads and ahb peripheral bus #2458
base: feature/scratchpads
Are you sure you want to change the base?
[Scratchpads] Needed packages for scratchpads and ahb peripheral bus #2458
Conversation
core/include/scratchpad_pkg.sv
Outdated
localparam DSCR_ARBIT_NUM_IN = 3; | ||
localparam ISCR_ARBIT_NUM_IN = 4; | ||
|
||
typedef enum logic [$clog2(ISCR_ARBIT_NUM_IN)-1: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 🐶
typedef enum logic [$clog2(ISCR_ARBIT_NUM_IN)-1:0] { | |
typedef enum logic [$clog2( | |
ISCR_ARBIT_NUM_IN | |
)-1:0] { |
core/include/scratchpad_pkg.sv
Outdated
ISCR_ARBIT_FRONTEND | ||
} iscr_arbit_e; | ||
|
||
typedef enum logic [$clog2(DSCR_ARBIT_NUM_IN)-1: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 🐶
typedef enum logic [$clog2(DSCR_ARBIT_NUM_IN)-1:0] { | |
typedef enum logic [$clog2( | |
DSCR_ARBIT_NUM_IN | |
)-1:0] { |
✔️ successful run, report available here. |
module address_decoder import address_decoder_pkg::*;#( | ||
parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, | ||
parameter type exception_t = logic, | ||
parameter ADDR_WIDTH = 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.
[verible-verilog-format] reported by reviewdog 🐶
module address_decoder import address_decoder_pkg::*;#( | |
parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, | |
parameter type exception_t = logic, | |
parameter ADDR_WIDTH = 32 | |
module address_decoder | |
import address_decoder_pkg::*; | |
#( | |
parameter config_pkg::cva6_cfg_t CVA6Cfg = config_pkg::cva6_cfg_empty, | |
parameter type exception_t = logic, | |
parameter ADDR_WIDTH = 32 |
input logic clk_i, | ||
input logic rst_ni, |
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 🐶
input logic clk_i, | |
input logic rst_ni, | |
input logic clk_i, | |
input logic rst_ni, |
input logic addr_valid_i, // Input address is valid | ||
input logic [ADDR_WIDTH-1:0] addr_i, // Address to be decoded |
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 🐶
input logic addr_valid_i, // Input address is valid | |
input logic [ADDR_WIDTH-1:0] addr_i, // Address to be decoded | |
input logic addr_valid_i, // Input address is valid | |
input logic [ADDR_WIDTH-1:0] addr_i, // Address to be decoded |
input logic dscr_en_i, // From CSR | ||
input logic iscr_en_i, // From CSR | ||
input logic ahb_periph_en_i, // From CSR | ||
|
||
input logic [CVA6Cfg.XLEN-1:0] exception_code_i, | ||
|
||
output exception_t ex_o, | ||
output addr_dec_mode_e select_mem_o |
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 🐶
input logic dscr_en_i, // From CSR | |
input logic iscr_en_i, // From CSR | |
input logic ahb_periph_en_i, // From CSR | |
input logic [CVA6Cfg.XLEN-1:0] exception_code_i, | |
output exception_t ex_o, | |
output addr_dec_mode_e select_mem_o | |
input logic dscr_en_i, // From CSR | |
input logic iscr_en_i, // From CSR | |
input logic ahb_periph_en_i, // From CSR | |
input logic [CVA6Cfg.XLEN-1:0] exception_code_i, | |
output exception_t ex_o, | |
output addr_dec_mode_e select_mem_o |
assign match_dscr_region = config_pkg::is_inside_data_scratchpad(CVA6Cfg, {{64-ADDR_WIDTH{1'b0}}, addr_i}); | ||
assign match_iscr_region = config_pkg::is_inside_instruction_scratchpad(CVA6Cfg, {{64-ADDR_WIDTH{1'b0}}, addr_i}); | ||
assign match_any_ahbperiph_region = config_pkg::is_inside_ahbperiph_regions(CVA6Cfg, {{64-ADDR_WIDTH{1'b0}}, addr_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 🐶
assign match_dscr_region = config_pkg::is_inside_data_scratchpad(CVA6Cfg, {{64-ADDR_WIDTH{1'b0}}, addr_i}); | |
assign match_iscr_region = config_pkg::is_inside_instruction_scratchpad(CVA6Cfg, {{64-ADDR_WIDTH{1'b0}}, addr_i}); | |
assign match_any_ahbperiph_region = config_pkg::is_inside_ahbperiph_regions(CVA6Cfg, {{64-ADDR_WIDTH{1'b0}}, addr_i}); | |
assign match_dscr_region = config_pkg::is_inside_data_scratchpad( | |
CVA6Cfg, {{64 - ADDR_WIDTH{1'b0}}, addr_i} | |
); | |
assign match_iscr_region = config_pkg::is_inside_instruction_scratchpad( | |
CVA6Cfg, {{64 - ADDR_WIDTH{1'b0}}, addr_i} | |
); | |
assign match_any_ahbperiph_region = config_pkg::is_inside_ahbperiph_regions( | |
CVA6Cfg, {{64 - ADDR_WIDTH{1'b0}}, addr_i} | |
); |
|
||
endmodule |
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 | |
endmodule |
❌ failed run, report available here. |
❌ failed run, report available here. |
❌ failed run, report available here. |
❌ failed run, report available here. |
input ahb_req_t ahb_s_req_i, | ||
|
||
// Request from AHB acknowledged | ||
input logic req_ack_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 🐶
input logic req_ack_i, | |
input logic req_ack_i, |
end | ||
// Go to SEQ if this becomes a BURST |
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 | |
// Go to SEQ if this becomes a BURST | |
end // Go to SEQ if this becomes a BURST |
end | ||
else if (ahb_s_req_i.htrans == AHB_TRANS_BUSY) state_d = S_BUSY; |
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 | |
else if (ahb_s_req_i.htrans == AHB_TRANS_BUSY) state_d = S_BUSY; | |
end else if (ahb_s_req_i.htrans == AHB_TRANS_BUSY) state_d = S_BUSY; |
end | ||
else if (ahb_s_req_i.hburst == AHB_BURST_INCR) begin |
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 | |
else if (ahb_s_req_i.hburst == AHB_BURST_INCR) begin | |
end else if (ahb_s_req_i.hburst == AHB_BURST_INCR) begin |
if (ahb_s_req_i.hwrite) state_d = S_NONSEQ_WRITE; | ||
else state_d = S_NONSEQ_READ; | ||
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 🐶
if (ahb_s_req_i.hwrite) state_d = S_NONSEQ_WRITE; | |
else state_d = S_NONSEQ_READ; | |
end | |
if (ahb_s_req_i.hwrite) state_d = S_NONSEQ_WRITE; | |
else state_d = S_NONSEQ_READ; | |
end |
|
||
always_comb begin : p_ahb_outputs | ||
hready_d = 1'b1; | ||
hresp_d = 1'b0; // Exception not yet supported, no errors are sent to AHB BUS |
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 🐶
hresp_d = 1'b0; // Exception not yet supported, no errors are sent to AHB BUS | |
hresp_d = 1'b0; // Exception not yet supported, no errors are sent to AHB BUS |
vaddr_d = vaddr_q; | ||
wdata_d = wdata_q; | ||
data_req_d = 1'b0; | ||
data_we_d = 1'b0; | ||
data_be_d = '0; // TODO: Determine if should be set depending of size or not? | ||
size_d = size_q; |
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 🐶
vaddr_d = vaddr_q; | |
wdata_d = wdata_q; | |
data_req_d = 1'b0; | |
data_we_d = 1'b0; | |
data_be_d = '0; // TODO: Determine if should be set depending of size or not? | |
size_d = size_q; | |
vaddr_d = vaddr_q; | |
wdata_d = wdata_q; | |
data_req_d = 1'b0; | |
data_we_d = 1'b0; | |
data_be_d = '0; // TODO: Determine if should be set depending of size or not? | |
size_d = size_q; |
assign req_port_o.data_id = '0; // Not supported: next req is sent when previous one is done | ||
assign req_port_o.kill_req = '0; // Not supported: AHB master cannot kill a req |
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 🐶
assign req_port_o.data_id = '0; // Not supported: next req is sent when previous one is done | |
assign req_port_o.kill_req = '0; // Not supported: AHB master cannot kill a req | |
assign req_port_o.data_id = '0; // Not supported: next req is sent when previous one is done | |
assign req_port_o.kill_req = '0; // Not supported: AHB master cannot kill a req |
…dedicated bus for eavery target (dcache, dscr, iscr, periphe bus)
end else if (st_select_mem == address_decoder_pkg::DECODER_MODE_AHB_PERIPH) begin | ||
commit_ready_o = ahbperiph_ready_i; | ||
rvfi_mem_paddr_o = speculative_queue_n[speculative_read_pointer_q].address; | ||
end else if (st_select_mem == address_decoder_pkg::DECODER_MODE_CACHE) begin // DCACHE |
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 else if (st_select_mem == address_decoder_pkg::DECODER_MODE_CACHE) begin // DCACHE | |
end else if (st_select_mem == address_decoder_pkg::DECODER_MODE_CACHE) begin // DCACHE |
❌ failed run, report available here. |
❌ failed run, report available here. |
@@ -133,7 +134,27 @@ module load_store_unit | |||
output logic itlb_miss_o, |
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 🐶
output logic itlb_miss_o, | |
output logic itlb_miss_o, |
@@ -133,7 +134,27 @@ | |||
output logic itlb_miss_o, | |||
// Data TLB miss - PERF_COUNTERS | |||
output logic dtlb_miss_o, |
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 🐶
output logic dtlb_miss_o, | |
output logic dtlb_miss_o, |
input logic ahbperiph_ld_ex_i, | ||
output scratchpad_req_i_t ahbperiph_st_req_port_o, | ||
input logic ahbperiph_st_ready_i, | ||
input logic ahbperiph_st_ex_i, | ||
// Data cache request output - CACHES | ||
input dcache_req_o_t [2:0] dcache_req_ports_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 🐶
input dcache_req_o_t [2:0] dcache_req_ports_i, | |
input dcache_req_o_t [ 2:0] dcache_req_ports_i, |
❌ failed run, report available here. |
1 similar comment
❌ failed run, report available here. |
…e ahb slave and ahb master at IOs
… periph bus controller
core/cva6.sv
Outdated
parameter type rvfi_probes_instr_t = | ||
`RVFI_PROBES_INSTR_T(CVA6Cfg), | ||
parameter type rvfi_probes_csr_t = | ||
`RVFI_PROBES_CSR_T(CVA6Cfg), |
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 🐶
parameter type rvfi_probes_instr_t = | |
`RVFI_PROBES_INSTR_T(CVA6Cfg), | |
parameter type rvfi_probes_csr_t = | |
`RVFI_PROBES_CSR_T(CVA6Cfg), | |
parameter type rvfi_probes_instr_t = `RVFI_PROBES_INSTR_T(CVA6Cfg), | |
parameter type rvfi_probes_csr_t = `RVFI_PROBES_CSR_T(CVA6Cfg), |
core/cva6.sv
Outdated
@@ -291,12 +321,18 @@ module cva6 | |||
input logic time_irq_i, | |||
// Debug (async) request - SUBSYSTEM | |||
input logic debug_req_i, | |||
// Probes to build RVFI, can be left open when not used - RVFI | |||
// Probes to build RVFI, can be left open when not used - RVFI |
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 🐶
// Probes to build RVFI, can be left open when not used - RVFI | |
// Probes to build RVFI, can be left open when not used - RVFI |
core/cva6.sv
Outdated
iscr_ahb_s_req_i = '0; | ||
dscr_ahb_s_req_i = '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 🐶
iscr_ahb_s_req_i = '0; | |
dscr_ahb_s_req_i = '0; | |
iscr_ahb_s_req_i = '0; | |
dscr_ahb_s_req_i = '0; |
core/cva6.sv
Outdated
.clk_i (clk_i), | ||
.rst_ni (rst_ni), | ||
.ahb_p_resp_i (ahb_p_resp_i), | ||
.ahb_p_req_o (ahb_p_req_o), | ||
.ld_req_port_i (ahbperiph_req_port_ld_periph), | ||
.ld_req_port_o (ahbperiph_req_port_periph_ld), | ||
.ld_ex_o (ahbperiph_ex_periph_ld), | ||
.st_req_port_i (ahbperiph_req_port_st_periph), | ||
.st_ready_o (ahbperiph_ready_periph_st), | ||
.st_ex_o (ahbperiph_ex_periph_st) |
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 🐶
.clk_i (clk_i), | |
.rst_ni (rst_ni), | |
.ahb_p_resp_i (ahb_p_resp_i), | |
.ahb_p_req_o (ahb_p_req_o), | |
.ld_req_port_i (ahbperiph_req_port_ld_periph), | |
.ld_req_port_o (ahbperiph_req_port_periph_ld), | |
.ld_ex_o (ahbperiph_ex_periph_ld), | |
.st_req_port_i (ahbperiph_req_port_st_periph), | |
.st_ready_o (ahbperiph_ready_periph_st), | |
.st_ex_o (ahbperiph_ex_periph_st) | |
.clk_i (clk_i), | |
.rst_ni (rst_ni), | |
.ahb_p_resp_i (ahb_p_resp_i), | |
.ahb_p_req_o (ahb_p_req_o), | |
.ld_req_port_i(ahbperiph_req_port_ld_periph), | |
.ld_req_port_o(ahbperiph_req_port_periph_ld), | |
.ld_ex_o (ahbperiph_ex_periph_ld), | |
.st_req_port_i(ahbperiph_req_port_st_periph), | |
.st_ready_o (ahbperiph_ready_periph_st), | |
.st_ex_o (ahbperiph_ex_periph_st) |
❌ failed run, report available here. |
This PR aims at integrate features developed by Bosch :