Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
scIGPCB.h
Go to the documentation of this file.
1 
5  /* @author János Végh (jvegh)
6  * @bug No known bugs.
7  */
8 
9 
10 #ifndef scIGPCB_h
11 #define scIGPCB_h
12 //#include "scTypes.h"
13 //#include "tlm.h"
14 //#include "tlm_utils/simple_target_socket.h"
15 //#include "Config.h"
16 #include "scIGPfifo.h"
17 
18 using namespace sc_core;
19 //Submodule forward class declarations
20 
21 class scGridPoint; class scProcessor;
22 class scIGPCB : public sc_core::sc_module
23 //SC_MODULE(scIGPCB)
24 {
25  friend class scProcessor;
26  public:
27  //Port declarations
28 // sc_in_clk clock;
29  // sc_in<bool> Clock; ///< The clock signal, received from scCore
30  //Channel/Submodule* definitions
31 //** BL_FromSV_fifo* msFromSV_FIFO;
32  // TLM-2 socket, defaults to 32-bits wide, base protocol
33 // InterCoreBusCtrl* mIntercoreBus;
34 /* tlm_utils::simple_target_socket<scIGPCB>* receive_socket;
35  tlm_utils::simple_initiator_socket<scIGPCB>* send_socket;
36  // TLM-2 blocking transport method
37  virtual void b_transport( tlm::tlm_generic_payload& trans, sc_time& delay );
38 */ SC_HAS_PROCESS(scIGPCB);
39  // This is a more direct way to communicate: the messages is written to a BL_FromSV_fifo
40  // that ends in another scIGPCB. Only one of the two mechanisms is needed
41  sc_port<scIGPwrite_if> scIGPout;
42  sc_port<scIGPread_if> scIGPin;
43  scIGPfifo *IGPFIFOin,*IGPFIFOout; // The IGPCB has and input and an output FIFO
44 
45  scIGPCB(sc_core::sc_module_name nm, scGridPoint* GP, scIGPCB* IGPCB); // This is for testing only
46  virtual
47  ~scIGPCB();
48  void Reset(void);
49  scIGPCB*
50  OtherIGPCB_Get(void){ return msOtherIGPCB;}
51  scGridPoint*
52  GridPoint_Get(void){return msGridPoint;}
53 /* void
54  ConnectSocketsTo(scIGPCB* OtherIGPCB);*/
55  void
56  ConnectFIFOsTo(scIGPCB* const OtherIGPCB);
57  struct
58  {
59  sc_core::sc_event
60  MessageReceived;
61  }EVENT_IGPCB;
62  bool
63  Sending_Get(void) {return msIsSending;}
64  void
65  Sending_Set(bool B){msIsSending = B;}
66  protected:
67  // SystemC-related member variables
68  // Operation-related member objects
70  msGridPoint;
71  scIGPCB*
72  msOtherIGPCB;
73  void
74  OtherIGPCB_SetLate(scIGPCB* OtherIGPCB){msOtherIGPCB = OtherIGPCB; }
75  private:
76  bool
77  msIsSending;
78 
79  void
80  MessageReceived_thread(void);
81 #ifdef other
82  void ReceivedClock(void);
83  int
84  msClocks;
85  #endif
86 };
87 #endif //scICGPB_h
scProcessor
Implements a module-name alias facility (i.e., user-provided names. Given that the basic units is scH...
Definition: scProcessor.h:130
scIGPfifo.h
Function prototypes for the scEMPA simulator, inter-gridpoint FIFO.
scGridPoint
This class implements the autonomous grid point functionality: it is a communicating GridPoint....
Definition: scGridPoint.h:127
scIGPfifo
Definition: scIGPfifo.h:40