Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
ProcessorSimulator.h
Go to the documentation of this file.
1 
4  /* @author János Végh (jvegh)
5  * @bug No known bugs.
6  */
7 
8 #ifndef ProcessorSimulator_h
9 #define ProcessorSimulator_h
10 //#include <systemc>
11 #include <map> // For the aliases
12 #include <QSettings>
13 #include <QDebug>
14 #include <QDir>
15 #include <QScopedPointer>
16 #include <QDate>
17 #include <QTime>
18 #include <QSettings>
19 #include <QCoreApplication>
20 //#include "scGridPoint.h"
21 #include "scSimulator.h"
22 class scClusterBus;
23 class scClusterBusArbiter;
24 class AbstractProcessor;
25 class AbstractCore;
26 class scqTreeModel;
27 using namespace sc_core; using namespace std;
28 
29 
30 //Submodule forward class declarations
31 class ProcessorSimulator : public scSimulator {
32  //Port declarations
33  // channels
34  protected:
35 // sc_clock C1 {"clk", 100, SC_PS};
36  //
37  //Channel/Submodule* definitions
38 /* simple_bus_master_blocking *master_b;
39  simple_bus_master_non_blocking *master_nb;
40  simple_bus_master_direct *master_d;
41  simple_bus_slow_mem *mem_slow;
42 */
43  scClusterBus *msClusterBus;
44 // simple_bus_fast_mem *mem_fast;
45  scClusterBusArbiter *msClusterBusArbiter;
46  public:
47  // Constructor declaration:
55  ProcessorSimulator(sc_core::sc_module_name nm, int argc, char* argv[], bool StandAlone=true);
56  SC_HAS_PROCESS(ProcessorSimulator); // Contructor implemented in .cpp
57  virtual
58  ~ProcessorSimulator();
59  string
60  PrologText_Get(void);
61 
62  void Setup(void); // Belongs to the constructor
63  void writeSettings(void); // Write settings to the project directory
64 /* void
65  SetupSystemDirectories(QWidget* parent);
66  void
67  SetupSettings(void);*/
68  void
69  SInitialize_method(void);
70  bool
71  StepwiseMode_Get(void){ return msStepwiseMode;}
72  void
73  StepwiseMode_Set(bool b){msStepwiseMode = b;}
74  void
75  SSUSPEND_thread(void);
76  void
77  SRESUME_thread(void);
78  void
79  SSTART_thread(void);
80  void
81  SSTOP_thread(void);
82  void
83  SHALT_thread(void);
84  struct{
85  sc_core::sc_event
86  START,
87  STOP,
88  HALT,
89  SUSPEND,
90  RESUME;
91  }EVENT_SIMULATOR;
92  //virtual
94  Processor_Get();
95  void ClockFlag_Set(bool B){m_clockFlag = B;}
96  bool ClockFlag_Get(void){return m_clockFlag;}
97 
98  scqTreeModel* mModuleTree;
99  scqTreeModel* mClusterTree;
100 // scqTreeItem *rootItem;
101 
102  protected:
103  void clock_method(void)
104  { ClockFlag_Set(true);}
105  void SetupHierarchies(void);
106  /*
107  void
108  PrintFinalReport(scProcessor *Proc);
109  */
110  void
111  HandleSpecials(void);
112  vector<scGridPoint*>
113  mSpecials;
114  std::map<string,int32_t>
115  mAliases;
116  bool
117  msStepwiseMode,
118  msSuspended;
119  bool
120  m_clockFlag;
121  string mSettingsFileName;
122  QScopedPointer<QFile> m_logFile;
123 }; // of ProcessorSimulator
124 
125 #endif // ProcessorSimulator_h
AbstractProcessor
The AbstractProcessor class.
Definition: AbstractProcessor.h:35
AbstractCore
The abstract base class (i.e. must not be instantiated) of concrete processors, implementing their ge...
Definition: AbstractCore.h:142
scSimulator
The anchestor of all ScQt-based simulators, using EMPA bus The simulator manipulates scGridPoints,...
Definition: scSimulator.h:29
scSimulator.h
Function prototypes for the scEMPA simulator, simulator main file.