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

modification of application/application, the tools to collect WCET, TUCBs and ECBs of a task

parent ced24800
Branches
No related tags found
No related merge requests found
......@@ -9,7 +9,6 @@
//includes pour l'affichage du CFG
#include <otawa/display/CFGOutput.h>
#include <elm/io/OutFileStream.h>
#include "include/UCB_local.h"
using namespace otawa; //comme import
......
LDLIBS2=`otawa-config otawa/display otawa/classic_ucb otawa/classic_ecb otawa/ucb_cond --libs`
LDLIBS2=`otawa-config otawa/display otawa/classic_ecb otawa/UCB_local --libs`
CXXFLAGS += -std=c++11 -O0 -g -I /home/fabien/cristal/otawa/include/ -I ../otawa-core2-build/otawa/include/elm/
ARMCC=arm-none-eabi-gcc
......
No preview for this file type
......@@ -15,16 +15,14 @@
#include <elm/io/OutFileStream.h>
#include <otawa/flowfact/features.h>
#include <multiset.hpp>
#include "../ucb_cond/include/ucb_cond.h"
#include <multiset.h>
#include "../classic_ecb/include/classic_ecb.h"
#include "../classic_ucb/include/classic_ucb.h"
#include "../UCB_local/include/UCB_local.h"
#include "application.h"
using namespace otawa; //comme import
using namespace otawa::classic_ecb;
using namespace otawa::classic_ucb;
using namespace otawa::ucb_cond;
using namespace otawa::UCB_local;
using namespace Mathset;
......@@ -38,8 +36,8 @@ int main(int argc, char **argv) {
TASK_ENTRY(conf) = "main";
VERBOSE(conf) = true;
if (argc < 4) {
fprintf(stderr, "usage: %s <binary> <flow fact file> <sortie>\n", argv[0]);
if (argc < 5) {
fprintf(stderr, "usage: %s <binary> <flow fact> <cache> <sortie>\n", argv[0]);
StringBuffer buf;
buf << argv[1] << "-decomp.c";
elm::io::OutFileStream s(buf.toString());
......@@ -51,11 +49,11 @@ int main(int argc, char **argv) {
exit(1);
}
std::cout << "#### chargement cache ####" << std::endl;
CACHE_CONFIG_PATH(conf) = "./cache.xml";
CACHE_CONFIG_PATH(conf) = argv[3];
std::cout << "#### chargement flow fact ####" << std::endl;
if(argc == 4 || argc == 3) {
FLOW_FACTS_PATH(conf) = argv[2];
}
StringBuffer buf;
buf << argv[1] << "-decomp.c";
elm::io::OutFileStream s(buf.toString());
......@@ -64,27 +62,21 @@ int main(int argc, char **argv) {
std::cout << "#### chargement tache ####" << std::endl;
ws = manager.load(argv[1], conf);
std::cout << "#### execution plugin ####" << std::endl;
ws->require(DynFeature("otawa::ucb_cond::UCB_COND_FEATURE"), conf);
ws->require(DynFeature("otawa::classic_ucb::CLASSIC_UCB_PROCESSOR"), conf);
ws->require(otawa::ipet::FLOW_FACTS_FEATURE,conf);
ws->require(DynFeature("otawa::UCB_local::UCB_LOCAL_FEATURE"), conf);
ws->require(DynFeature("otawa::classic_ecb::CLASSIC_ECB_PROCESSOR"), conf);
ws->require(otawa::ipet::ILP_SYSTEM_FEATURE, conf);
ws->require(otawa::ipet::WCET_FEATURE, conf);
long wcet = ipet::WCET(ws);
std::cout << "#### result ####" << std::endl;
std::vector<Multiset<int>*> *ucbs = UCBS_MP(ws);
std::vector<Multiset<int>*> ucbs_compr = compr_multiset(*ucbs);
Multiset<int> ucbs = TOTAL_UCB(ws);
// for(auto iter = (*ucbs).begin(); iter != (*ucbs).end(); iter++) {
// (*iter)->print_vector();
// }
Multiset<int> *ucbs_c = otawa::classic_ucb::UCBS(ws);
Multiset<int> *ecbs = ECBS(ws);
......@@ -92,21 +84,11 @@ int main(int argc, char **argv) {
std::cout << "---------WCET: " << wcet << "--------------" << std::endl;
std::ofstream f(argv[3]);
std::ofstream f(argv[4]);
f << "Task t(" << wcet << ", 10, 10 ,{";
for(int i = 0; i < ucbs_compr.size(); i++) {
f << "{";
(ucbs_compr)[i]->to_string(f);
f << "}";
if(i != ucbs_compr.size() - 1) {
f << ",";
}
}
f << "},{";
ecbs->to_string(f);
f << "},{";
ucbs_c->to_string(f);
ucbs.to_string(f);
f << "})" << endl;
f.close();
......
#include <multiset.hpp>
#include <multiset.h>
template <typename T>
std::vector<Mathset::Multiset<T>*> compr_multiset(std::vector<Mathset::Multiset<T>*> v) {
......
{ ID(otawa::FLOW_FACTS_PATH) = flow_fact_simple_code.ff, ID(otawa::CACHE_CONFIG_PATH) = ./cache.xml, ID(otawa::VERBOSE) = true, ID(otawa::TASK_ENTRY) = main, ID(otawa::NO_SYSTEM) = true }
\ No newline at end of file
{ ID(otawa::FLOW_FACTS_PATH) = flow_fact_simple_code.ff, ID(otawa::CACHE_CONFIG_PATH) = cache.xml, ID(otawa::VERBOSE) = true, ID(otawa::TASK_ENTRY) = main, ID(otawa::NO_SYSTEM) = true }
\ No newline at end of file
No preview for this file type
#include "include/classic_ecb.h"
#include <multiset.hpp>
#include <multiset.h>
#include <otawa/hard/CacheConfiguration.h>
#include <otawa/cache/features.h>
......
......@@ -18,7 +18,7 @@
#include <otawa/cache/LBlock.h>
#include <otawa/cache/features.h>
#include "multiset.hpp"
#include "multiset.h"
namespace otawa { namespace classic_ecb {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment