Skip to content
Snippets Groups Projects
Commit a6c4c553 authored by Bouquillon Fabien's avatar Bouquillon Fabien
Browse files

update

parent 3e3dacf2
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -40,6 +40,17 @@ bool selected_in_config(std::vector<struct LBlock_vulnerability*> configuration,
return false;
}
double compute_base_vulnerability(double max_vulnerability, double fix_vulnerability, std::vector<struct LBlock_vulnerability*> configuration) {
double v =fix_vulnerability;
for(int i = 0; i < configuration.size(); i++) {
v += configuration[i]->vulnerable_data * configuration[i]->vulnerability_max;
}
std::cout << "fix:" << fix_vulnerability << std::endl;
std::cout << "vulnerability:" << v << std::endl;
std::cout << "max:" << max_vulnerability << std::endl;
return v / double(max_vulnerability);
}
/********************************
* FUNCTION compute_config
*
......@@ -71,6 +82,7 @@ void compute_config(WorkSpace *ws,
}
}
}
wcet = wcet_tmp;
vulnerability = vulnerability_tmp;
}
......@@ -218,5 +230,6 @@ int main(int argc, char **argv) {
file << ")";
file << std::endl;
}
std::cout << "size task:" << PRG_SIZE(ws) << std::endl;
std::cout << "vul factor:" << compute_base_vulnerability(task_size, VUL(ws), configuration_vulnerability) << std::endl;
}
No preview for this file type
......@@ -121,7 +121,7 @@ extern p::feature VULNERABILITY_FEATURE;
cache::LBlock* lb;
long reload_cost;
long vulnerability_max;
long vulnerable_data; // vulnerable data * iteration max
long vulnerable_data;
std::vector<Address> list_lb_path;
std::vector<struct LBlock_vulnerability*> list_lv_path;
LBlock_vulnerability() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment