tb_wb_dcache: Provide ArianeCfg as cache parameter

Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
This commit is contained in:
Nils Wistoff 2022-02-10 15:32:06 +01:00 committed by Florian Zaruba
parent 22b67049f7
commit c419da3457

View file

@ -30,6 +30,30 @@ module tb import ariane_pkg::*; import std_cache_pkg::*; import tb_pkg::*; #()()
parameter logic [63:0] CachedAddrBeg = MemBytes>>3;//1/8th of the memory is NC
parameter logic [63:0] CachedAddrEnd = 64'hFFFF_FFFF_FFFF_FFFF;
localparam ariane_cfg_t ArianeDefaultConfig = '{
RASDepth: 2,
BTBEntries: 32,
BHTEntries: 128,
// idempotent region
NrNonIdempotentRules: 0,
NonIdempotentAddrBase: {64'b0},
NonIdempotentLength: {64'b0},
// executable region
NrExecuteRegionRules: 0,
ExecuteRegionAddrBase: {64'h0},
ExecuteRegionLength: {64'h0},
// cached region
NrCachedRegionRules: 1,
CachedRegionAddrBase: {CachedAddrBeg},//1/8th of the memory is NC
CachedRegionLength: {CachedAddrEnd-CachedAddrBeg+64'b1},
// cache config
Axi64BitCompliant: 1'b1,
SwapEndianess: 1'b0,
// debug
DmBaseAddress: 64'h0,
NrPMPEntries: 0
};
// contention and invalidation rates (in %)
parameter MemRandHitRate = 75;
parameter MemRandInvRate = 10;
@ -359,7 +383,7 @@ module tb import ariane_pkg::*; import std_cache_pkg::*; import tb_pkg::*; #()()
///////////////////////////////////////////////////////////////////////////////
std_nbdcache #(
.CACHE_START_ADDR ( CachedAddrBeg )
.ArianeCfg ( ArianeDefaultConfig )
) i_dut (
.clk_i ( clk_i ),
.rst_ni ( rst_ni ),