Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
NeurerSimulator.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 NeurerSimulator_h
9 #define NeurerSimulator_h
10 #include <systemc>
11 #include <QSettings>
12 #include <QDebug>
13 #include <QDir>
14 #include <QScopedPointer>
15 #include <QDate>
16 #include <QTime>
17 #include <QSettings>
18 #include <QCoreApplication>
19 //#include "scGridPoint.h"
20 //#include "scBenchmarkingHead.h" // Contains conditional compiles
21 #include "scSimulator.h"
22 #include "NeurerProcessor.h"
23 class scClusterBus;
24 class scClusterBusArbiter;
25 class NeurerProcessor;
26 class scGridPoint;
27 class scqTreeModel;
28 using namespace sc_core; using namespace std;
29 
30 
31 //Submodule forward class declarations
32 //SC_MODULE(scSimulator) {
33 class NeurerSimulator : public scSimulator {
34  //Port declarations
35  // channels
36  protected:
37  // sc_clock C1 {"clk", 100, SC_PS};
38  //
39  //Channel/Submodule* definitions
40 /* simple_bus_master_blocking *master_b;
41  simple_bus_master_non_blocking *master_nb;
42  simple_bus_master_direct *master_d;
43  simple_bus_slow_mem *mem_slow;
44 */
45  scClusterBus *msClusterBus;
46 // simple_bus_fast_mem *mem_fast;
47  scClusterBusArbiter *msClusterBusArbiter;
48  public:
49  // Constructor declaration:
50  NeurerSimulator(sc_core::sc_module_name nm, int argc, char* argv[], bool StandAlone=true);
51  SC_HAS_PROCESS(NeurerSimulator); // Contructor implemented in .cpp
52  virtual
53  ~NeurerSimulator();
54 
55  void
56  readSettings();
57  virtual void
58  writeSettings(void);
59  /* void
60  ReadNeuronSettings(QSettings *settings, string Group);
61 */
62  void Setup(void); // Belongs to the constructor
63  void
64  SInitialize_method(void);
65  /* string
66  PrologText_Get(void);
67  void writeSettings(void); // Write settings to the project directory
68  bool
69  StepwiseMode_Get(void){ return msStepwiseMode;}
70  void
71  StepwiseMode_Set(bool b){msStepwiseMode = b;}
72  void
73  SSUSPEND_thread(void);
74  void
75  SRESUME_thread(void);
76  void
77  SSTART_thread(void);
78  void
79  SSTOP_thread(void);
80  void
81  SHALT_thread(void);
82  struct{
83  sc_core::sc_event
84  START,
85  STOP,
86  HALT,
87  SUSPEND,
88  RESUME;
89  }EVENT_SIMULATOR;
90  //virtual
91  void ClockFlag_Set(bool B){m_clockFlag = B;}
92  bool ClockFlag_Get(void){return m_clockFlag;}
93 
94  scqTreeModel* mModuleTree;
95  scqTreeModel* mClusterTree;
96 // scqTreeItem *rootItem;
97  */
99  Processor_Get();
100 // { return dynamic_cast<NeurerProcessor*>(scSimulator::Processor_Get());}
101  protected:
110  void
111  readSettings(QSettings *settings, string Level, string Group);
112  void
113  ReadTheThreeLevels(QString MyGroup);
114  #if 0
115  void clock_method(void)
116  { ClockFlag_Set(true);}
117  void SetupHierarchies(void);
118  /*
119  void
120  PrintFinalReport(scProcessor *Proc);
121  */
122 #endif //0
123  void
124  HandleSpecials(void);
125  vector<scGridPoint*>
126  mSpecials;
127 #if 0
128  bool
129  msStepwiseMode,
130  msSuspended;
131  bool
132  m_clockFlag;
133 // static SystemDirectories Directories;
134  string mSettingsFileName;
135  QScopedPointer<QFile> m_logFile;
136 #endif //0
137 
138 }; // of scSimulator
139 
140 #endif // NeurerSimulator_h
scGridPoint
This class implements the autonomous grid point functionality: it is a communicating GridPoint....
Definition: scGridPoint.h:127
NeurerProcessor.h
Function prototypes for the topology of electronic modules, placed on a die. It assumes 'Nerver' obje...
scSimulator
The anchestor of all ScQt-based simulators, using EMPA bus The simulator manipulates scGridPoints,...
Definition: scSimulator.h:29
NeurerProcessor
The NeurerProcessor class.
Definition: NeurerProcessor.h:33
scSimulator.h
Function prototypes for the scEMPA simulator, simulator main file.