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

Parameterized clic irq id #441

Merged
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
20 changes: 12 additions & 8 deletions bhv/cv32e40x_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module cv32e40x_wrapper
parameter bit ZC_EXT = 0,
parameter int NUM_MHPMCOUNTERS = 1,
parameter bit SMCLIC = 0,
parameter int SMCLIC_ID_WIDTH = 6,
parameter int DBG_NUM_TRIGGERS = 1,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_region_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT}
Expand Down Expand Up @@ -122,14 +123,16 @@ module cv32e40x_wrapper
// Interrupt inputs
input logic [31:0] irq_i, // CLINT interrupts + CLINT extension interrupts

input logic clic_irq_i,
input logic [ 9:0] clic_irq_id_i,
input logic [ 7:0] clic_irq_il_i,
input logic [ 1:0] clic_irq_priv_i,
input logic clic_irq_hv_i,
output logic [ 9:0] clic_irq_id_o,
output logic clic_irq_mode_o,
output logic clic_irq_exit_o,
// CLIC Interface
input logic clic_irq_i,
input logic [SMCLIC_ID_WIDTH-1:0] clic_irq_id_i,
input logic [ 7:0] clic_irq_il_i,
input logic [ 1:0] clic_irq_priv_i,
input logic clic_irq_hv_i,
output logic [SMCLIC_ID_WIDTH-1:0] clic_irq_id_o,
output logic clic_irq_mode_o,
output logic clic_irq_exit_o,


// Fencei flush handshake
output logic fencei_flush_req_o,
Expand Down Expand Up @@ -547,6 +550,7 @@ module cv32e40x_wrapper
.ZC_EXT ( ZC_EXT ),
.NUM_MHPMCOUNTERS ( NUM_MHPMCOUNTERS ),
.SMCLIC ( SMCLIC ),
.SMCLIC_ID_WIDTH ( SMCLIC_ID_WIDTH ),
.DBG_NUM_TRIGGERS ( DBG_NUM_TRIGGERS ),
.PMA_NUM_REGIONS ( PMA_NUM_REGIONS ),
.PMA_CFG ( PMA_CFG ))
Expand Down
18 changes: 10 additions & 8 deletions rtl/cv32e40x_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module cv32e40x_core import cv32e40x_pkg::*;
parameter bit ZC_EXT = 0, // todo: remove once fully implemented
parameter int NUM_MHPMCOUNTERS = 1,
parameter bit SMCLIC = 0,
parameter int SMCLIC_ID_WIDTH = 6,
parameter int DBG_NUM_TRIGGERS = 1,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_region_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT}
Expand Down Expand Up @@ -108,14 +109,15 @@ module cv32e40x_core import cv32e40x_pkg::*;
// Interrupt inputs
input logic [31:0] irq_i, // CLINT interrupts + CLINT extension interrupts

input logic clic_irq_i,
input logic [ 9:0] clic_irq_id_i,
input logic [ 7:0] clic_irq_il_i,
input logic [ 1:0] clic_irq_priv_i,
input logic clic_irq_hv_i,
output logic [ 9:0] clic_irq_id_o,
output logic clic_irq_mode_o,
output logic clic_irq_exit_o,
// CLIC Interface
input logic clic_irq_i,
input logic [SMCLIC_ID_WIDTH-1:0] clic_irq_id_i,
input logic [ 7:0] clic_irq_il_i,
input logic [ 1:0] clic_irq_priv_i,
input logic clic_irq_hv_i,
output logic [SMCLIC_ID_WIDTH-1:0] clic_irq_id_o,
output logic clic_irq_mode_o,
output logic clic_irq_exit_o,

// Fencei flush handshake
output logic fencei_flush_req_o,
Expand Down