Commit 4f46e8be authored by GuillemCabo's avatar GuillemCabo Committed by Guillem
Browse files

add FT and NFT cases

parent c00c858e
......@@ -14,7 +14,6 @@ rm -rf ./AXI_PMU
############
## TOP pmu_ahb.sv
############
# Run Verilator
printf "Please wait, running Verilator\n"
verilator --lint-only ../hdl/pmu_ahb.sv \
......@@ -24,7 +23,13 @@ verilator --lint-only ../hdl/pmu_ahb.sv \
../submodules/RDC/hdl/RDC.sv \
../submodules/quota/PMU_quota.sv \
../submodules/counters/PMU_counters.sv \
../submodules/overflow/PMU_overflow.sv 2> $VERILATOR_LOG0
../submodules/overflow/PMU_overflow.sv \
../submodules/seu_ip/hamming32t26d_enc.sv \
../submodules/seu_ip/hamming32t26d_dec.sv \
../submodules/seu_ip/triple_reg.sv \
../submodules/seu_ip/way3_voter.sv \
../submodules/seu_ip/way3u2a_voter.sv \
../submodules/seu_ip/way3ua_voter.sv 2> $VERILATOR_LOG0
# Run Questa
printf "Please wait, running Spyglass\n"
......
......@@ -801,6 +801,8 @@
.WEIGHTS_WIDTH (MCCU_WEIGHTS_WIDTH),
//Cores. Change this may break Verilator TB
.N_CORES (MCCU_N_CORES),
//Fault Tolerance
.FT(0),
//Signals per core. Change this may break Verilator TB
.CORE_EVENTS (MCCU_CORE_EVENTS)
)
......@@ -812,6 +814,8 @@
.quota_i (MCCU_quota_int),//One register per core
.update_quota_i (MCCU_update_quota_int),//Software map
.quota_o (MCCU_quota_o),//write back to a read register
.intr_FT1_o(),
.intr_FT2_o(),
.events_weights_i (MCCU_events_weights_int),//core_events times WEIGHTS_WIDTH registers
.interruption_quota_o (MCCU_int_o)//N_CORES output signals Add this to top or single toplevel interrupt and an interrupt vector that identifies the source?
// Individual interrupts allow each core to
......@@ -837,6 +841,7 @@
.events_i (events_int),//how to parametrize this? new parameter on top or up to the programer that does the integration?
.events_weights_i (MCCU_events_weights_int),//core_events times WEIGHTS_WIDTH registers
.interruption_rdc_o(intr_rdc_o),// interruption signaling a signal has exceed the expected maximum request time
.watermark_o(),
.interruption_vector_rdc_o(intrv_rdc_int) // vector with offending
//signals. One hot encoding.
//Cleared when MCCU is disabled.
......
......@@ -27,7 +27,7 @@
//Cores. Change this may break Verilator TB
parameter integer N_CORES =2,
// Fault tolerance mechanisms (FT==0 -> FT disabled)
parameter integer FT = 1,
parameter integer FT = 0,
//Signals per core. Change this may break Verilator TB
parameter integer CORE_EVENTS =4
)
......
CYCLES=-all
TOP=../../..
RED='\033[7;31m'
NC='\033[0m' # No Color
mv /AXI_PMU /tmp 2>/dev/null
vlib AXI_PMU
vmap work $PWD/AXI_PMU
......
#$1
TOP=../../..
RED='\033[7;31m'
NC='\033[0m' # No Color
vlib pmu_ahb
vmap work $PWD/pmu_ahb
......@@ -8,7 +10,12 @@ vmake pmu_ahb/ > Makefile
if [ -z "$1" ]
then
printf "${RED}WARNING: Check if you want Fault Tolerance active or not${RED}${NC}\n"
printf "${RED}To enable FT add -gFT=1 after vsim${RED}${NC}\n"
vsim work.tb_pmu_ahb -do "view wave -new" -do "do wave.do" -do "run -all"
else
vsim work.tb_pmu_ahb $1 -do "do save_wave.do"
echo "#INFO# Test Default IP "
vsim -gFT=0 work.tb_pmu_ahb $1 -do "do save_wave.do"
echo "#INFO# Test FT IP"
vsim -gFT=1 work.tb_pmu_ahb $1 -do "do save_wave.do"
fi
......@@ -33,7 +33,7 @@ module tb_pmu_ahb();
parameter TB_N_CORES= 4;
//WARNIGN: if N_counters or cores change this value needs to change
parameter TB_TOTAL_NREGS= 47;
parameter FT = 0;
//***Signals***
reg clk_i ;
reg rstn_i ;
......@@ -60,7 +60,7 @@ reg tb_fail = 0;
.N_REGS(TB_TOTAL_NREGS),
.MCCU_N_CORES(4),
.N_SOC_EV (TB_N_SOC_EV)
.FT(1),
.FT(FT),
.N_REGS(47)
)
dut_pmu_ahb
......@@ -198,6 +198,7 @@ task automatic rand_run(input longint a);
init_dump();
reset_dut();
test_sim();
$display("FT = %d",FT);
$finish;
end
......
#$1
TOP=../../..
RED='\033[7;31m'
NC='\033[0m' # No Color
vlib PMU_raw
vmap work $PWD/PMU_raw
......@@ -8,7 +10,12 @@ vmake PMU_raw/ > Makefile
if [ -z "$1" ]
then
printf "${RED}WARNING: Check if you want Fault Tolerance active or not${RED}${NC}\n"
printf "${RED}To enable FT add -gFT=1 after vsim${RED}${NC}\n"
vsim work.tb_PMU_raw -do "view wave -new" -do "do wave.do" -do "run -all"
else
vsim work.tb_PMU_raw $1 -do "do save_wave.do"
echo "#INFO# Test Default IP "
vsim -gFT=0 work.tb_PMU_raw $1 -do "do save_wave.do"
echo "#INFO# Test FT IP"
vsim -gFT=1 work.tb_PMU_raw $1 -do "do save_wave.do"
fi
......@@ -33,6 +33,7 @@ module tb_PMU_raw();
parameter TB_N_CORES= 4;
//WARNIGN: if N_counters or cores change this value needs to change
parameter TB_TOTAL_NREGS= 47;
parameter FT= 0;
//***Signals***
reg tb_clk_i ;
......@@ -54,7 +55,7 @@ reg tb_fail = 0;
.REG_WIDTH(TB_DATA_WIDTH),
.N_COUNTERS(TB_N_COUNTERS),
.N_SOC_EV(32),
.FT(1),
.FT(FT),
.N_CONF_REGS(TB_N_CFG)
)dut_PMU_raw (
.clk_i(tb_clk_i),
......@@ -66,6 +67,8 @@ reg tb_fail = 0;
.intr_overflow_o(tb_intr_overflow_o),
.intr_quota_o(tb_intr_quota_o),
.intr_MCCU_o(tb_intr_MCCU_o),
.intr_FT1_o(),
.intr_FT2_o(),
.intr_RDC_o(tb_intr_RDC_o)
);
......@@ -251,6 +254,7 @@ end
//Disable PMU and selftest modes
write_reg(0,32'h00000000);
test_crossbar;
$display("FT = %d",FT);
$finish;
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment