Otawa  0.10
StandardEventBuilder.h
Go to the documentation of this file.
1 /*
2  * StandardEventBuilder class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2014, IRIT UPS.
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 OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef OTAWA_ETIME_STANDARDEVENTBUILDER_CPP_
22 #define OTAWA_ETIME_STANDARDEVENTBUILDER_CPP_
23 
24 #include <otawa/proc/BBProcessor.h>
25 #include <otawa/branch/features.h>
26 #include "features.h"
27 
28 namespace otawa {
29 
30 // pre-declarations
31 namespace hard {
32  class Bank;
33  class BHT;
34  class CacheConfiguration;
35  class Memory;
36 }
37 
38 namespace etime {
39 
41 public:
42  static p::declare reg;
44 
45 protected:
46  virtual void configure(const PropList& props);
47  virtual void setup(WorkSpace *ws);
48  virtual void processBB(WorkSpace *ws, CFG *cfg, BasicBlock *bb);
49 
50 private:
52  ot::time costOf(Address addr, bool write = false);
53 
54  const hard::Memory *mem;
56  const hard::BHT *bht;
58  bool has_branch;
59  const hard::Bank *bank;
60  bool _explicit;
61 };
62 
63 } } // otawa::etime
64 
65 #endif /* OTAWA_ETIME_STANDARDEVENTBUILDER_CPP_ */
const hard::Memory * mem
Definition: StandardEventBuilder.h:54
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
bool has_branch
Definition: StandardEventBuilder.h:58
virtual void setup(WorkSpace *ws)
This method is called before an anlysis to let the processor do some initialization.
Definition: StandardEventBuilder.cpp:215
Class to declare simple a processor.
Definition: Registration.h:213
void handleVariableBranchPred(BasicBlock *bb, BasicBlock *wbb)
Definition: StandardEventBuilder.cpp:361
WorkSpace * ws
Definition: Processor.h:185
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Build standard events.
Definition: StandardEventBuilder.h:40
Control Flow Graph representation.
Definition: CFG.h:42
Class to represent the whole memory of the platform.
Definition: Memory.h:173
bool _explicit
Definition: StandardEventBuilder.h:60
static p::declare reg
Definition: StandardEventBuilder.h:42
bool has_dl1
Definition: StandardEventBuilder.h:57
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
bool has_il1
Definition: StandardEventBuilder.h:57
The representation of an address in OTAWA.
Definition: base.h:54
This class contains all information about the Branch History Predictor, that is,. ...
Definition: BHT.h:41
ot::time costOf(Address addr, bool write=false)
Compute cost of a memory access.
Definition: StandardEventBuilder.cpp:242
const hard::Bank * bank
Definition: StandardEventBuilder.h:59
virtual void processBB(WorkSpace *ws, CFG *cfg, BasicBlock *bb)
Perform the work of the given basic block.
Definition: StandardEventBuilder.cpp:255
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
StandardEventBuilder(p::declare &r=reg)
Definition: StandardEventBuilder.cpp:202
A bank in the memory.
Definition: Memory.h:86
virtual void configure(const PropList &props)
Configure the current processor.
Definition: StandardEventBuilder.cpp:207
This a list of properties.
Definition: PropList.h:63
t::int64 time
Definition: base.h:47
const hard::BHT * bht
Definition: StandardEventBuilder.h:56
const hard::CacheConfiguration * cconf
Definition: StandardEventBuilder.h:55
This class represents the full configuration of caches of a processor.
Definition: CacheConfiguration.h:37