Otawa  0.10
BBTimeSimulator.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006-07, IRIT UPS.
3  *
4  * BBTimeSimulator class interface
5  * This file is part of OTAWA
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Foobar; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef OTAWA_TSIM_BBTIMESIMULATOR_H
22 #define OTAWA_TSIM_BBTIMESIMULATOR_H
23 
24 #include <otawa/cfg.h>
25 #include <otawa/proc/BBProcessor.h>
26 
27 namespace otawa {
28 
29 // Predeclaration
30 namespace sim {
31  class State;
32 }
33 
34 namespace tsim {
35 
36 // BBTimeSimulator class
37 class BBTimeSimulator : public BBProcessor {
38 public:
39  BBTimeSimulator(void);
41 
42 protected:
43  virtual void setup(WorkSpace *ws);
44  virtual void cleanup(WorkSpace *ws);
45  virtual void processBB(WorkSpace *ws, CFG *cfg, BasicBlock *bb);
46 private:
48 };
49 
50 } } // otawa::tsim
51 
52 #endif /* OTAWA_TSIM_BBTIMESIMULATOR_H */
This processor is dedicated to the basic block process thru proccessBB() method.
Definition: BBProcessor.h:72
CFG * cfg(void) const
Get the current CFG.
Definition: CFGProcessor.h:56
Definition: BBTimeSimulator.h:37
Definition: Registration.h:138
WorkSpace * ws
Definition: Processor.h:185
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
static Registration< BBTimeSimulator > reg
Definition: BBTimeSimulator.h:40
virtual void cleanup(WorkSpace *ws)
This method is called after the end of the processor analysis to let it do some clean up...
Definition: BBTimeSimulator.cpp:81
virtual void setup(WorkSpace *ws)
This method is called before an anlysis to let the processor do some initialization.
Definition: BBTimeSimulator.cpp:69
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
BBTimeSimulator(void)
This processor compute the execution time of each basic block using the provided simulator.
Definition: BBTimeSimulator.cpp:53
sim::State * state
Definition: BBTimeSimulator.h:47
This class represents a running simulator.
Definition: State.h:38
virtual void processBB(WorkSpace *ws, CFG *cfg, BasicBlock *bb)
Perform the work of the given basic block.
Definition: BBTimeSimulator.cpp:58