Skip to content

Commit

Permalink
Rework and polish the fault injection flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ricted98 committed Feb 28, 2024
1 parent ebb8476 commit 1ebbfa3
Show file tree
Hide file tree
Showing 8 changed files with 2,380 additions and 56 deletions.
2 changes: 2 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
[submodule "fault_injection_sim"]
path = fault_injection_sim
url = git@iis-git.ee.ethz.ch:michaero/fault_injection_sim.git
[submodule "fault_injection_sim/"]
url = https://github.com/pulp-platform/InjectaFault.git
2 changes: 1 addition & 1 deletion fault_injection_sim
Submodule fault_injection_sim updated from 84ddcf to ecc354
2,339 changes: 2,339 additions & 0 deletions scripts/compile.tcl

Large diffs are not rendered by default.

51 changes: 0 additions & 51 deletions scripts/fault_injection_config/pulp_inject_fault.tcl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,32 @@ proc get_all_core_nets {core} {
# }
# }
return $all_signals
}
}

##################
# Memory signals #
##################

# <------ banks ------>
# b1 b2 b3 b4
# +----+----+----+----+ ^
# | | | | | 3 |
# +----+----+----+----+ |
# | | | | | 2 |
# +----+----+----+----+ | words
# | | | | | 1 |
# +----+----+----+----+ |
# | | | | | 0 |
# +----+----+----+----+ v

# == Path to a word in sram signal in tc_sram ==
proc get_memory_word {bank word} {return "/pulp_cluster_tb/cluster_i/tcdm_banks_i/banks_gen\[$bank\]/gen_ecc_banks/gen_ecc_banks_only/i_ecc_bank/i_bank/sram($word)"}

proc get_memory_slice {bank_range word_range} {
set mem_slice [list]
for {set i [lindex $bank_range 0]} {$i < [lindex $bank_range end]} {incr i} {
for {set j [lindex $word_range 0]} {$j < [lindex $word_range end]} {incr j} {
lappend mem_slice [get_memory_word $i $j]}
}
return $mem_slice
}
5 changes: 4 additions & 1 deletion scripts/run_and_exit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ proc run_and_exit {} {
}

if {[info exists ::env(FAULT_INJECTION)]} {
source [file join $::env(VSIM_PATH) scripts fault_injection_config pulp_inject_fault.tcl]
if {![info exists ::env(FAULT_INJECTION_SCRIPT)]} {
error "Error: Missing FAULT_INJECTION_SCRIPT to source!"
}
source $::env(FAULT_INJECTION_SCRIPT)
}

run_and_exit
5 changes: 4 additions & 1 deletion scripts/start.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ if {![info exists VSIM]} {
$VSIM +permissive -suppress 3053 -suppress 8885 -suppress 12130 -lib $VSIM_PATH/work +APP=./build/test/test +notimingchecks +nospecify -t 1ps pulp_cluster_tb_optimized +permissive-off ++./build/test/test

if {[info exists ::env(FAULT_INJECTION)]} {
source [file join $::env(VSIM_PATH) scripts fault_injection_config pulp_inject_fault.tcl]
if {![info exists ::env(FAULT_INJECTION_SCRIPT)]} {
error "Error: Missing FAULT_INJECTION_SCRIPT to source!"
}
source $::env(FAULT_INJECTION_SCRIPT)
}

add log -r /*
Expand Down

0 comments on commit 1ebbfa3

Please sign in to comment.