Skip to content

Commit

Permalink
hw: Update clic and cva6 interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alex96295 committed Sep 28, 2023
1 parent 3b7609a commit 1b1b0be
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions hw/cheshire_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ package cheshire_pkg;
byte_bt NumExtOutIntrTgts;
shrt_bt NumExtOutIntrs;
shrt_bt ClicIntCtlBits;
bit ClicUseSMode;
bit ClicUseUMode;
bit ClicUseVsMode;
bit ClicUseVsModePrio;
byte_bt ClicNumVsCtxts;
shrt_bt NumExtIntrSyncs;
// AXI parameters
aw_bt AddrWidth;
Expand Down Expand Up @@ -517,6 +522,11 @@ package cheshire_pkg;
NumExtOutIntrTgts : 0,
NumExtOutIntrs : 0,
ClicIntCtlBits : ariane_pkg::ArianeDefaultConfig.CLICIntCtlBits,
ClicUseSMode : 0,
ClicUseUMode : 0,
ClicUseVsMode : 0,
ClicUseVsModePrio : 0,
ClicNumVsCtxts : 0,
NumExtIntrSyncs : 2,
// Interconnect
AddrWidth : 48,
Expand Down
13 changes: 11 additions & 2 deletions hw/cheshire_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,10 @@ module cheshire_soc import cheshire_pkg::*; #(
logic clic_irq_valid, clic_irq_ready;
logic clic_irq_kill_req, clic_irq_kill_ack;
logic clic_irq_shv;
logic clic_irq_v_i;
logic [$clog2(NumClicIntrs)-1:0] clic_irq_id;
logic [7:0] clic_irq_level;
logic [5:0] clic_irq_vsid;
riscv::priv_lvl_t clic_irq_priv;

// Currently, we support only one core
Expand Down Expand Up @@ -618,6 +620,8 @@ module cheshire_soc import cheshire_pkg::*; #(
.clic_irq_level_i ( clic_irq_level ),
.clic_irq_priv_i ( clic_irq_priv ),
.clic_irq_shv_i ( clic_irq_shv ),
.clic_irq_v_i ( clic_irq_v ),
.clic_irq_vsid_i ( clic_irq_vsid ),
.clic_irq_ready_o ( clic_irq_ready ),
.clic_kill_req_i ( clic_irq_kill_req ),
.clic_kill_ack_o ( clic_irq_kill_ack ),
Expand Down Expand Up @@ -677,8 +681,11 @@ module cheshire_soc import cheshire_pkg::*; #(
.INTCTLBITS ( Cfg.ClicIntCtlBits ),
.reg_req_t ( reg_req_t ),
.reg_rsp_t ( reg_rsp_t ),
.SSCLIC ( 1 ),
.USCLIC ( 0 )
.SSCLIC ( Cfg.ClicUseSMode ),
.USCLIC ( Cfg.ClicUseUMode ),
.VSCLIC ( Cfg.ClicUseVsMode ),
.VSPRIO ( Cfg.ClicUseVsModePrio ),
.N_VSCTXTS ( Cfg.ClicNumVsCtxts )
) i_clic (
.clk_i,
.rst_ni,
Expand All @@ -691,6 +698,8 @@ module cheshire_soc import cheshire_pkg::*; #(
.irq_level_o ( clic_irq_level ),
.irq_shv_o ( clic_irq_shv ),
.irq_priv_o ( clic_irq_priv ),
.irq_v_o ( clic_irq_v ),
.irq_vsid_o ( clic_irq_vsid ),
.irq_kill_req_o ( clic_irq_kill_req ),
.irq_kill_ack_i ( clic_irq_kill_ack )
);
Expand Down

0 comments on commit 1b1b0be

Please sign in to comment.