Skip to content

Commit

Permalink
hw: Expose NumExtIntrSyncs as design parameter (#64)
Browse files Browse the repository at this point in the history
* hw: Expose `NumExtIntrSyncs` as design parameter

* target/xilinx: Update default number of sync stages for intrs
  • Loading branch information
alex96295 authored Aug 8, 2023
1 parent 44ad673 commit 97662be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion hw/cheshire_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ package cheshire_pkg;
byte_bt NumExtOutIntrTgts;
shrt_bt NumExtOutIntrs;
shrt_bt ClicIntCtlBits;
shrt_bt NumExtIntrSyncs;
// AXI parameters
aw_bt AddrWidth;
dw_bt AxiDataWidth;
Expand Down Expand Up @@ -217,7 +218,6 @@ package cheshire_pkg;
} cheshire_xeip_t;

// Interrupt parameters
localparam int unsigned NumExtIntrSyncs = 2;
localparam int unsigned NumIntIntrs = $bits(cheshire_int_intr_t);
localparam int unsigned NumIrqCtxts = $bits(cheshire_xeip_t);
localparam int unsigned NumCoreIrqs = $bits(cheshire_core_ip_t);
Expand Down Expand Up @@ -478,6 +478,7 @@ package cheshire_pkg;
NumExtOutIntrTgts : 0,
NumExtOutIntrs : 0,
ClicIntCtlBits : ariane_pkg::ArianeDefaultConfig.CLICIntCtlBits,
NumExtIntrSyncs : 2,
// Interconnect
AddrWidth : 48,
AxiDataWidth : 64,
Expand Down
2 changes: 1 addition & 1 deletion hw/cheshire_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ module cheshire_soc import cheshire_pkg::*; #(
// External interrupts must be synchronized to this domain
for (genvar i = 0; i <= iomsb(Cfg.NumExtInIntrs); i++) begin : gen_ext_in_intr_syncs
sync #(
.STAGES ( NumExtIntrSyncs ),
.STAGES ( Cfg.NumExtIntrSyncs ),
.ResetValue ( 1'b0 )
) i_ext_intr_sync (
.clk_i,
Expand Down
2 changes: 2 additions & 0 deletions target/xilinx/src/cheshire_top_xilinx.sv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ module cheshire_top_xilinx
NumCores : 1,
CoreMaxTxns : 8,
CoreMaxTxnsPerId : 4,
// Interrupts
NumExtIntrSyncs : 2,
// Interconnect
AddrWidth : 48,
AxiDataWidth : 64,
Expand Down

0 comments on commit 97662be

Please sign in to comment.