Step-by-Step instructions to integrate our tool into GEMS' GARNET
Follow the instructions below to integrate our fault modeling tool into GARNET. Note that our tool also requires the temperature across the chip to provide the fault probabilities, thus
a thermal model is required in the infrastructure. We recommend HotSpot, which can be easily integrated with
ORION power model.
Step 1 :
Untar the fault model file (FaultModel.tar.gz) and move all files into directory $GEMS/ruby/network/garnet-fixed-pipeline
Step 2 :
In file: $GEMS/ruby/network/garnet-fixed-pipeline/Makefile.include
add FaultModel.C \ in GARNET_DETAIL_SRC_CPP list
Step 3 :
In file: $GEMS/ruby/network/garnet-fixed-pipeline/GarnetNetwork_d.C
add #include "FaultModel.h" at the beginning of the file
Step 4 :
In file: $GEMS/ruby/network/garnet-fixed-pipeline/GarnetNetwork_d.C
add FaultModel_initialize()
at the very beginning of constructor GarnetNetwork_d::GarnetNetwork_d(int nodes)
Step 5 :
In file: $GEMS/ruby/network/garnet-fixed-pipeline/GarnetNetwork_d.C
add the following code
for(int i = 0; i < m_router_ptr_vector.size(); i++){
int routerID = FaultModel_declare_router(
m_router_ptr_vector[i]->get_num_inports(),
m_router_ptr_vector[i]->get_num_outports(),
m_router_ptr_vector[i]->get_vc_per_vnet(),
g_BUFFER_SIZE);
assert(routerID == m_router_ptr_vector[i]->get_id());
}
at the very end of constructor GarnetNetwork_d::GarnetNetwork_d(int nodes)
Step 6 :
In file: $GEMS/ruby/network/garnet-fixed-pipeline/Router_d.C
add #include "FaultModel.h" at the beginning of the file
Step 7 :
In file: $GEMS/ruby/network/garnet-fixed-pipeline/Router_d.C
you can call the fault model at any time to provide the fault vector as follows (assuming that temperature is temperature):
float fault_vector[number_of_fault_types];
FaultModel_fault_vector(get_id(), temperature, fault_vector);
note that the name of the fault type corresponding to a record of the fault vector is available in the following function:
string fault_type_to_string(int record),
record is an integer ranging from
0 to
number_of_fault_types
Step 8 :
Some minor fixes to successfully compile with GEMS:
- replace exit(0) with assert(0) in FaultModel.c
- replace the DBCONF, DBTEMP defines with the full path of the corresponding files in FaultModel.h. For instance, replace the following line:
#define DBCONF "DB.conf.txt"
...with this:
#define DBCONF "/u/my_username/GEMS/ruby/network/garnet-fixed-pipeline/DB.conf.txt"