Enable ECC in ICache tests

Eventually we probably want to make this configurable but, for now,
enable it unconditionally.
This commit is contained in:
Rupert Swarbrick 2020-06-05 11:57:44 +01:00 committed by Rupert Swarbrick
parent 2569a63eb7
commit 8a145a9330
4 changed files with 32 additions and 5 deletions

View file

@ -18,8 +18,17 @@ filesets:
targets:
sim:
parameters:
- ICacheECC
filesets:
- files_rtl
- files_dv
toplevel: tb
default_tool: vcs
parameters:
ICacheECC:
datatype: int
default: 0
paramtype: vlogparam
description: "Enable ECC protection in instruction cache"

View file

@ -20,10 +20,15 @@
// Testplan hjson file.
testplan: "{proj_root}/dv/uvm/icache/data/ibex_icache_testplan.hjson"
// Import additional common sim cfg files.
import_cfgs: [// Project wide common sim cfg file
"{proj_root}/dv/uvm/data/common_sim_cfg.hjson"]
import_cfgs: [
// Project wide common sim cfg file
"{proj_root}/dv/uvm/data/common_sim_cfg.hjson",
// Configuration options that should apply after the settings in
// common_sim_cfg.
"{proj_root}/dv/uvm/icache/dv/late_cfg.hjson"
]
// Default iterations for all tests - each test entry can override this.
reseed: 50

View file

@ -0,0 +1,9 @@
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
// Set any fusesoc parameters by appending to sv_flist_gen_opts
//
// We want to enable ICache ECC (needed for the ECC test below)
sv_flist_gen_opts: ["--ICacheECC=1"]
}

View file

@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
module tb;
module tb #(
parameter bit ICacheECC = 1'b0
);
// dep packages
import uvm_pkg::*;
import dv_utils_pkg::*;
@ -22,7 +24,9 @@ module tb;
ibex_icache_mem_if mem_if (.clk(clk), .rst_n(rst_n));
// dut
ibex_icache dut (
ibex_icache #(
.ICacheECC (ICacheECC)
) dut (
.clk_i (clk),
.rst_ni (rst_n),