Otawa  0.10
Microprocessor.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * exegraph module interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2007, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 #ifndef OTAWA_MICROPROCESSOR_H
23 #define OTAWA_MICROPROCESSOR_H
24 
25 #include <elm/io.h>
26 #include <elm/genstruct/Vector.h>
27 #include <elm/string/String.h>
28 #include <elm/genstruct/DLList.h>
29 #include <stdio.h>
30 #include <otawa/otawa.h>
31 #include <otawa/hard/Processor.h>
32 
33 namespace otawa {
34 
35 using namespace elm;
36 using namespace elm::genstruct;
37 
38 template <class N> class PipelineStage;
39 class FunctionalUnit;
40 template <class N> class Microprocessor;
41 
42 namespace hard {
43  class Microprocessor;
44 } // hard
45 
46 typedef enum instruction_category_t {
47  IALU = 0,
48  FALU = 1,
49  MEMORY = 2,
50  CONTROL = 3,
51  MUL = 4,
52  DIV = 5,
53  INST_CATEGORY_NUMBER // must be the last value
55 
57 
58 
59 
60 // ----------------------------------------------------------------------
61 // Processor queue class
62 // ----------------------------------------------------------------------
63 
64 template <class N>
65 class Queue {
66  private:
68  int _size;
71  public:
72  inline Queue(elm::String name, int size)
73  : _name(name), _size(size) {}
74  inline elm::String name(void)
75  {return _name;}
76  inline int size(void)
77  {return _size;}
79  {return _filling_stage;}
81  {return _emptying_stage;}
82  inline void setFillingStage(PipelineStage<N> * stage)
83  {_filling_stage = stage;}
84  inline void setEmptyingStage(PipelineStage<N> * stage)
85  {_emptying_stage = stage;}
86 };
87 
88 
89 // ----------------------------------------------------------------------
90 // Pipeline stage class
91 // ----------------------------------------------------------------------
92 
93 
94 // Pipeline stage class
95 
96 template <class N>
97 class PipelineStage {
98  public:
99  typedef enum order_policy_t {
100  NO_POLICY = 0,
101  IN_ORDER = 1,
102  OUT_OF_ORDER = 2,
103  NUMBER_OF_POLICIES=3
104  } order_policy_t;
106  NO_CATEGORY = 0,
107  FETCH = 1,
108  DECODE = 2,
109  EXECUTE = 3,
110  WRITE = 4,
111  COMMIT=5,
112  DELAY=6,
113  NUMBER_OF_CATEGORIES=7 // must be the last value
114  } pipeline_stage_category_t;
115 
117  public :
118  typedef struct fu_info_t {
122  int min_latency; // overrides pipeline stage latency
124  int width;
126  } fu_info_t;
127  private:
131  public:
132  inline FunctionalUnit(fu_info_t& info, PipelineStage<N> *user_stage, Microprocessor<N> *proc);
133  inline elm::String name(void)
134  {return _info.name;}
135  inline elm::String shortName(void)
136  {return _info.short_name;}
137  inline bool isPipelined(void)
138  {return _info.is_pipelined;}
140  {return _info.ordder_policy;}
141  inline int minLatency(void)
142  {return _info.min_latency;}
143  inline int maxLatency(void)
144  {return _info.max_latency;}
145  inline int width(void)
146  {return _info.width;}
148  {return _pipeline.get(0);}
149  class PipelineIterator: public elm::genstruct::Vector<PipelineStage<N> *>::Iterator {
150  public:
152  : elm::genstruct::Vector<PipelineStage<N> *>::Iterator(fu->_pipeline) {}
153  };
154  };
155 
156  typedef struct pipeline_info_t {
166  } pipeline_info_t;
167 
168  private:
170  bool _uses_fus;
173  int _index;
176  StringBuffer _category_name[NUMBER_OF_CATEGORIES];
177  StringBuffer _order_name[NUMBER_OF_POLICIES];
178  public:
181  {return _info.order_policy;}
182  inline int width(void) const
183  {return _info.stage_width;}
184  inline elm::String name(void)
185  {return _info.stage_name;}
186  inline elm::String shortName(void)
187  {return _info.stage_short_name;}
189  {return _info.stage_category;}
191  {return _category_name[_info.stage_category].toString();}
193  {return _order_name[_info.order_policy].toString();}
194  inline Queue<N> * sourceQueue(void)
195  {return _info.source_queue;}
196  inline Queue<N> * destinationQueue(void)
197  {return _info.destination_queue;}
198  inline int index(void)
199  {return _index;}
200  inline int minLatency(void)
201  {return _info.min_latency;}
202  inline int maxLatency(void)
203  {return _info.max_latency;}
204  FunctionalUnit * addFunctionalUnit(typename PipelineStage<N>::FunctionalUnit::fu_info_t& fu_info);
205  inline bool usesFunctionalUnits(void)
206  {return _uses_fus;}
207  inline void addNode(N * node)
208  {_nodes.add(node);}
209  inline void deleteNodes()
210  {_nodes.clear();}
211  inline int numberOfNodes()
212  {return _nodes.length();}
213  inline N * node(int index) {
214  if (index >= _nodes.length())
215  return NULL;
216  return _nodes[index];
217  }
219  {return fus;}
220  inline void addBinding(Inst::kind_t kind, FunctionalUnit *fu)
221  {bindings.add(pair(kind, fu));}
222  inline FunctionalUnit *findFU(Inst::kind_t kind) {
223  for(int i = 0; i < bindings.length(); i++) {
224  Inst::kind_t mask = bindings[i].fst;
225  if((kind & mask) == mask) {
226  return bindings[i].snd;
227  }
228  }
229  cerr << "Unsupported instruction kind : " << io::hex(kind) << io::endl;
230  ASSERT(0);
231  return 0;
232  }
233  class ExeNodeIterator: public elm::genstruct::Vector<N *>::Iterator {
234  public:
235  inline ExeNodeIterator(const PipelineStage<N> *stage)
236  : elm::genstruct::Vector<N *>::Iterator(stage->_nodes) {}
237  };
238 };
239 
240 template <class N>
242  : _info(fu_info), _processor(proc) {
243  typename PipelineStage<N>::pipeline_info_t pipeline_info;
244  PipelineStage<N> *stage;
245  elm::StringBuffer *number;
246  elm::String number_string;
247 
248  user_stage->fus.add(this);
249  //pipeline_info.order_policy = user_stage->orderPolicy();
250  pipeline_info.order_policy = fu_info.order_policy;
251  pipeline_info.stage_width = fu_info.width;
252  pipeline_info.stage_name = fu_info.name;
253  pipeline_info.stage_short_name = fu_info.short_name;
254  if ( ! fu_info.is_pipelined) {
255  pipeline_info.source_queue = user_stage->_info.source_queue;
256  pipeline_info.destination_queue = user_stage->_info.destination_queue;
257  pipeline_info.min_latency = fu_info.min_latency;
258  pipeline_info.max_latency = fu_info.max_latency;
259  stage = new PipelineStage(pipeline_info,_processor);
260  this->_pipeline.add(stage);
261  }
262  else {
263  for (int i=1 ; i<=fu_info.min_latency ; i++) {
264  number = new elm::StringBuffer;
265  *number << i;
266  number_string = number->toString();
267  pipeline_info.stage_name = fu_info.name.concat(number_string);
268  pipeline_info.stage_short_name = fu_info.short_name.concat(number_string);
269  delete number;
270  pipeline_info.min_latency = 1;
271  pipeline_info.max_latency = 1;
272  pipeline_info.order_policy = PipelineStage::IN_ORDER;
273 
274  if (i==1) {
275  pipeline_info.source_queue = user_stage->_info.source_queue;
276  pipeline_info.order_policy = fu_info.order_policy;
277  }
278  if (i==fu_info.min_latency) {
279  pipeline_info.destination_queue = user_stage->_info.destination_queue;
280  pipeline_info.max_latency = fu_info.max_latency - fu_info.min_latency + 1;
281  }
282  stage = new PipelineStage(pipeline_info, _processor);
283  this->_pipeline.add(stage);
284  }
285  }
286  }
287 
288 
289 
290 // Microprocessor class
291 template <class N>
292 class Microprocessor {
293  private:
299 
300  public:
301  Microprocessor(void);
303  inline PipelineStage<N> * addPipelineStage(typename PipelineStage<N>::pipeline_info_t& info) ;
304  inline Queue<N> * addQueue(elm::String name, int size);
305  void dump(elm::io::Output& out_stream) ;
307  {return _pipeline_stage_index++;}
309  {_operand_reading_stage = stage;}
311  {_operand_producing_stage = stage;}
313  {return _operand_reading_stage;}
315  {return _operand_producing_stage;}
316  inline bool isLastStage(PipelineStage<N> *stage)
317  {return (_pipeline.get(_pipeline.length()-1) == stage);}
318 
319  class PipelineIterator: public elm::genstruct::Vector<PipelineStage<N> *>::Iterator {
320  public:
321  inline PipelineIterator(const Microprocessor<N> *processor)
322  : elm::genstruct::Vector<PipelineStage<N> *>::Iterator(processor->_pipeline) {}
323  };
324 
325  class QueueIterator: public elm::genstruct::Vector<Queue<N> *>::Iterator {
326  public:
327  inline QueueIterator(const Microprocessor<N> *processor)
328  : elm::genstruct::Vector<Queue<N> *>::Iterator(processor->_queues) {}
329  };
330 
331 };
332 
333 template <class N>
335  PipelineStage<N> *stage = new PipelineStage<N>(info, this);
336  _pipeline.add(stage);
337  if ( stage->sourceQueue() != NULL)
338  stage->sourceQueue()->setEmptyingStage(stage);
339  if ( stage->destinationQueue() != NULL)
340  stage->destinationQueue()->setFillingStage(stage);
341  return stage;
342 }
343 
344 template <class N>
346  Queue<N> *queue = new Queue<N>(name, size);
347  _queues.add(queue);
348  return queue;
349 }
350 
351 template <class N>
353  : _info(info), _uses_fus(false), _processor(proc) {
354  _index = proc->getPipelineStageIndex();
355  _category_name[NO_CATEGORY] << "NONE";
356  _category_name[FETCH] << "FETCH";
357  _category_name[DECODE] << "DECODE";
358  _category_name[EXECUTE] << "EXECUTE";
359  _category_name[WRITE] << "WRITE";
360  _category_name[COMMIT] << "COMMIT";
361  _category_name[DELAY] << "DELAY";
362  _order_name[NO_POLICY] << "NONE";
363  _order_name[IN_ORDER] << "IN_ORDER";
364  _order_name[OUT_OF_ORDER] << "OUT_OF_ORDER";
365  }
366 
367 template <class N>
369  FunctionalUnit *fu = new FunctionalUnit(fu_info, this, _processor);
370  _uses_fus = true;
371  return fu;
372 }
373 
374 
378 template <class N>
380 : _pipeline_stage_index(0),
381  _operand_reading_stage(0),
382  _operand_producing_stage(0)
383 {
384 }
385 
386 
393 template <class N>
395 : _pipeline_stage_index(0),
396  _operand_reading_stage(0),
397  _operand_producing_stage(0)
398 {
399  ASSERT(proc);
400 
401  // Create queues
402  Vector<Queue<N> *> queues;
403  const Table<hard::Queue *>& oqueues = proc->getQueues();
404  for(int i = 0; i < oqueues.count(); i++)
405  queues.add(addQueue(
406  oqueues[i]->getName(),
407  1 << oqueues[i]->getSize()));
408 
409  // Create stages
410  const Table<hard::Stage *>& ostages = proc->getStages();
411  for(int i = 0; i < ostages.count(); i++) {
412  typename PipelineStage<N>::pipeline_info_t info;
413 
414  // Common initialization
415  info.stage_name = ostages[i]->getName();
416  info.stage_short_name = ostages[i]->getName();
417  info.stage_width = ostages[i]->getWidth();
418  info.min_latency = info.max_latency = ostages[i]->getLatency();
419 
420  // Initialization according type of the stage
421  bool is_exec = false;
422  int exec_stage_index = 0;
423  switch(ostages[i]->getType()) {
424  case hard::Stage::FETCH:
427  break;
428  case hard::Stage::LAZY:
431  break;
432  case hard::Stage::EXEC:
433  is_exec = true;
434  exec_stage_index = i;
435  info.order_policy = ostages[i]->isOrdered()
438  break;
439  case hard::Stage::COMMIT:
442  break;
443  default:
444  ASSERT(0);
445  }
446 
447  // Link the stages
448  info.source_queue = 0;
449  info.destination_queue = 0;
450  for(int j = 0; j < oqueues.count(); j++) {
451  if(oqueues[j]->getInput() == ostages[i])
452  info.destination_queue = queues[j];
453  if(oqueues[j]->getOutput() == ostages[i])
454  info.source_queue = queues[j];
455  }
456 
457  // Create the stage
458  PipelineStage<N> *stage = addPipelineStage(info);
459 
460  // Add functional units if required
461  if(is_exec) {
462  setOperandReadingStage(stage);
464  // Build the FU
465  const Table<hard::FunctionalUnit *>& fus = ostages[i]->getFUs();
466  for(int j = 0; j < fus.count(); j++) {
468  info.name = fus[j]->getName();
469  info.short_name = fus[j]->getName();
470  info.is_pipelined = fus[j]->isPipelined();
471  info.max_latency = fus[j]->getLatency();
472  info.min_latency = fus[j]->getLatency();
473  info.order_policy = ostages[exec_stage_index]->isOrdered()
475  info.width = fus[j]->getWidth();
476  stage->addFunctionalUnit(info);
477  }
478 
479  // Build the bindings
480  const Table<hard::Dispatch *>& dispatch = ostages[i]->getDispatch();
481  for(int j = 0; j < dispatch.count(); j++) {
482  bool found = false;
483  for(int k = 0; k < fus.count(); k++)
484  if(fus[k] == dispatch[j]->getFU()) {
485  stage->addBinding(dispatch[j]->getType(), stage->getFUs()[k]);
486  found = true;
487  }
488  ASSERT(found);
489  }
490  }
491  }
492 
493 }
494 
495 
500 template <class N>
502  out_stream << "---------------------------------------------\n";
503  out_stream << "Microprocessor configuration: \n";
504  out_stream << "---------------------------------------------\n";
505  out_stream << "\tpipeline stages:\n";
506  for(PipelineIterator stage(this); stage; stage++)
507  {
508  out_stream << "\t\t" << stage->name() << " (" ;
509  out_stream << stage->shortName() << "): category=" << stage->categoryString();
510  out_stream << " - policy=" << stage->orderPolicyString();
511  out_stream << " - width=" << stage->width();
512  if (stage->sourceQueue() != NULL)
513  out_stream << " - source_queue=" << stage->sourceQueue()->name();
514  if (stage->destinationQueue() != NULL)
515  out_stream << " - destination_queue=" << stage->destinationQueue()->name();
516  out_stream << "\n";
517  if (stage->usesFunctionalUnits()) {
518  out_stream << "\t\t\tuses functional units:\n";
519  //for (int i=0 ; i<PipelineStage::INST_CATEGORY_NUMBER ; i++)
520  for (int i=0 ; i<INST_CATEGORY_NUMBER ; i++) {
521  out_stream << "\t\t\t\tinstruction category " << i << " processed by unit ";
522  /*if (stage->functionalUnit(i) != NULL)
523  {
524  out_stream << stage->functionalUnit(i)->name();
525  out_stream << " (latency=" << stage->functionalUnit(i)->minLatency();
526  out_stream << " to " << stage->functionalUnit(i)->maxLatency();
527  if (stage->functionalUnit(i)->isPipelined())
528  out_stream << " /pipelined/ ";
529  out_stream << " - width=" << stage->functionalUnit(i)->width() << ")";
530  out_stream << "\n\t\t\t\t\tstages: ";
531  for(PipelineStage::FunctionalUnit::PipelineIterator fu_stage(stage->functionalUnit(i)); fu_stage; fu_stage++) {
532  out_stream << fu_stage->shortName() << "(" << fu_stage->minLatency();
533  out_stream << "/" << fu_stage->maxLatency() << ") - ";
534  }
535  }*/
536  out_stream << "\n";
537  }
538 
539  }
540  }
541  out_stream << "\n";
542  out_stream << "\tqueues:\n";
543  for(QueueIterator queue(this); queue; queue++)
544  {
545  out_stream << "\t\t" << queue->name() << ": size=" << queue->size();
546  out_stream << " - filling_stage=" << queue->fillingStage()->name();
547  out_stream << " - emptying_stage=" << queue->emptyingStage()->name() << "\n";
548  }
549  out_stream << "\n";
550 }
551 
552 } // otawa
553 
554 #endif // OTAWA_MICROPROCESSOR_H
int numberOfNodes()
Definition: Microprocessor.h:211
struct otawa::sem::inst inst
PipelineStage< N > * fillingStage(void)
Definition: Microprocessor.h:78
void setEmptyingStage(PipelineStage< N > *stage)
Definition: Microprocessor.h:84
ExeNodeIterator(const PipelineStage< N > *stage)
Definition: Microprocessor.h:235
pipeline_info_t _info
Definition: Microprocessor.h:169
bool is_pipelined
Definition: Microprocessor.h:121
instruction_category_t
Definition: Microprocessor.h:46
elm::genstruct::Vector< PipelineStage< N > * > _pipeline
Definition: Microprocessor.h:295
PipelineStage< N > * addPipelineStage(typename PipelineStage< N >::pipeline_info_t &info)
Definition: Microprocessor.h:334
bool _uses_fus
Definition: Microprocessor.h:170
Queue(elm::String name, int size)
Definition: Microprocessor.h:72
PipelineStage< N > * _emptying_stage
Definition: Microprocessor.h:70
Definition: Microprocessor.h:118
Queue< N > * destination_queue
Definition: Microprocessor.h:163
elm::genstruct::Vector< PipelineStage< N > * > _pipeline
Definition: Microprocessor.h:129
t::uint32 mask
Definition: base.h:45
PipelineStage< N > * firstStage()
Definition: Microprocessor.h:147
elm::String stage_short_name
Definition: Microprocessor.h:160
PipelineIterator(const FunctionalUnit *fu)
Definition: Microprocessor.h:151
Definition: Microprocessor.h:233
int minLatency(void)
Definition: Microprocessor.h:200
Definition: Processor.h:96
Queue< N > * source_queue
Definition: Microprocessor.h:162
PipelineStage< N > * operandReadingStage(void)
Definition: Microprocessor.h:312
Definition: Microprocessor.h:110
elm::String categoryString(void)
Definition: Microprocessor.h:190
void addNode(N *node)
Definition: Microprocessor.h:207
Pair< T1, T2 > pair(const T1 &v1, const T2 &v2)
Definition: Processor.h:93
IntFormat hex(IntFormat fmt)
StringBuffer _order_name[NUMBER_OF_POLICIES]
Definition: Microprocessor.h:177
Queue< N > * addQueue(elm::String name, int size)
Definition: Microprocessor.h:345
int max_latency
Definition: Microprocessor.h:123
int maxLatency(void)
Definition: Microprocessor.h:202
elm::String orderPolicyString(void)
Definition: Microprocessor.h:192
elm::String name(void)
Definition: Microprocessor.h:133
Definition: Microprocessor.h:156
int index(void)
Definition: Microprocessor.h:198
bool isPipelined(void)
Definition: Microprocessor.h:137
Definition: Microprocessor.h:48
Description of a processor pipeline.
Definition: Processor.h:136
elm::String _name
Definition: Microprocessor.h:67
Definition: Processor.h:94
Definition: Microprocessor.h:102
int max_latency
Definition: Microprocessor.h:165
void deleteNodes()
Definition: Microprocessor.h:209
elm::genstruct::Vector< FunctionalUnit * > & getFUs(void)
Definition: Microprocessor.h:218
pipeline_stage_category_t category(void)
Definition: Microprocessor.h:188
io::Output cerr
fu_info_t _info
Definition: Microprocessor.h:128
Microprocessor< N > * _processor
Definition: Microprocessor.h:130
StringOption proc(command, 'p',"processor","used processor","path","")
FunctionalUnit * findFU(Inst::kind_t kind)
Definition: Microprocessor.h:222
Definition: Microprocessor.h:40
uint32 size
order_policy_t orderPolicy()
Definition: Microprocessor.h:139
Definition: features.h:44
void addBinding(Inst::kind_t kind, FunctionalUnit *fu)
Definition: Microprocessor.h:220
Inst::kind_t kind
Definition: odisasm.cpp:106
Definition: Microprocessor.h:325
Vector< Pair< Inst::kind_t, FunctionalUnit * > > bindings
Definition: Microprocessor.h:171
String concat(const CString str) const
order_policy_t orderPolicy(void)
Definition: Microprocessor.h:180
Definition: Microprocessor.h:50
order_policy_t order_policy
Definition: Microprocessor.h:125
elm::String name
Definition: Microprocessor.h:119
QueueIterator(const Microprocessor< N > *processor)
Definition: Microprocessor.h:327
Queue< N > * sourceQueue(void)
Definition: Microprocessor.h:194
int _pipeline_stage_index
Definition: Microprocessor.h:296
Definition: Microprocessor.h:319
PipelineIterator(const Microprocessor< N > *processor)
Definition: Microprocessor.h:321
Definition: Microprocessor.h:49
int min_latency
Definition: Microprocessor.h:122
int maxLatency(void)
Definition: Microprocessor.h:143
Definition: Microprocessor.h:38
Definition: Processor.h:95
Definition: Microprocessor.h:47
N * node(int index)
Definition: Microprocessor.h:213
int minLatency(void)
Definition: Microprocessor.h:141
PipelineStage< N > * operandProducingStage(void)
Definition: Microprocessor.h:314
elm::genstruct::Vector< FunctionalUnit * > fus
Definition: Microprocessor.h:172
FunctionalUnit(fu_info_t &info, PipelineStage< N > *user_stage, Microprocessor< N > *proc)
Definition: Microprocessor.h:241
elm::String name(void)
Definition: Microprocessor.h:74
elm::genstruct::Vector< Queue< N > * > _queues
Definition: Microprocessor.h:294
instruction_category_t instCategory(Inst *inst)
Definition: exegraph_Microprocessor.cpp:34
int _index
Definition: Microprocessor.h:173
elm::t::uint32 kind_t
Definition: Inst.h:67
PipelineStage< N > * _operand_reading_stage
Definition: Microprocessor.h:297
StringBuffer _category_name[NUMBER_OF_CATEGORIES]
Definition: Microprocessor.h:176
PipelineStage< N > * _operand_producing_stage
Definition: Microprocessor.h:298
Definition: Microprocessor.h:112
Definition: Microprocessor.h:101
const Table< Queue * > & getQueues(void) const
Definition: Processor.h:148
Definition: Microprocessor.h:116
pipeline_stage_category_t
Definition: Microprocessor.h:105
elm::genstruct::Vector< N * > _nodes
Definition: Microprocessor.h:175
void dump(elm::io::Output &out_stream)
Dump the description of the microprocessor.
Definition: Microprocessor.h:501
void setFillingStage(PipelineStage< N > *stage)
Definition: Microprocessor.h:82
Definition: Microprocessor.h:65
Definition: Microprocessor.h:111
Definition: Microprocessor.h:109
Microprocessor< N > * _processor
Definition: Microprocessor.h:174
FunctionalUnit * addFunctionalUnit(typename PipelineStage< N >::FunctionalUnit::fu_info_t &fu_info)
Definition: Microprocessor.h:368
cstring name
Definition: odisasm.cpp:107
elm::String shortName(void)
Definition: Microprocessor.h:186
Definition: Microprocessor.h:100
Definition: Microprocessor.h:106
PipelineStage< N > * _filling_stage
Definition: Microprocessor.h:69
const Table< Stage * > & getStages(void) const
Definition: Processor.h:147
elm::String shortName(void)
Definition: Microprocessor.h:135
Definition: Microprocessor.h:107
void setOperandReadingStage(PipelineStage< N > *stage)
Definition: Microprocessor.h:308
int size(void)
Definition: Microprocessor.h:76
int getPipelineStageIndex()
Definition: Microprocessor.h:306
Definition: Microprocessor.h:53
int stage_width
Definition: Microprocessor.h:158
Definition: Microprocessor.h:108
int width(void)
Definition: Microprocessor.h:145
int _size
Definition: Microprocessor.h:68
Definition: Microprocessor.h:52
elm::String short_name
Definition: Microprocessor.h:120
PipelineStage(pipeline_info_t &info, Microprocessor< N > *proc)
Definition: Microprocessor.h:352
void setOperandProducingStage(PipelineStage< N > *stage)
Definition: Microprocessor.h:310
Queue< N > * destinationQueue(void)
Definition: Microprocessor.h:196
bool isLastStage(PipelineStage< N > *stage)
Definition: Microprocessor.h:316
bool usesFunctionalUnits(void)
Definition: Microprocessor.h:205
Definition: Microprocessor.h:51
order_policy_t order_policy
Definition: Microprocessor.h:157
elm::String stage_name
Definition: Microprocessor.h:159
order_policy_t
Definition: Microprocessor.h:99
int min_latency
Definition: Microprocessor.h:164
int width
Definition: Microprocessor.h:124
PipelineStage< N > * emptyingStage(void)
Definition: Microprocessor.h:80
Microprocessor(void)
Build an empty microprocessor.
Definition: Microprocessor.h:379
elm::String name(void)
Definition: Microprocessor.h:184
pipeline_stage_category_t stage_category
Definition: Microprocessor.h:161
String toString(void)
int width(void) const
Definition: Microprocessor.h:182