Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
scClusterBus.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  The origin of this development file is available as SystemC example
11  simple_bus.h : The bus.
12 
13  The bus is derived from the following interfaces, and
14  contains the implementation of these:
15  - blocking : burst_read/burst_write
16  - non-blocking : read/write/get_status
17  - direct : direct_read/direct_write
18 
19  Original Author: Ric Hilderink, Synopsys, Inc., 2001-10-11
20 
21  *****************************************************************************/
22 
23 #ifndef scClusterBus_h
24 #define scClusterBus_h
25 
26 //#include <systemc.h>
27 
28 #include "scGridPoint.h"
29 //#include "ClusterBusTypes.h"
30 //#include "ClusterBusRequest.h"
31 //#include "scClusterBusDirect_if.h"
32 //#include "scClusterBus_blocking_if.h"
33 #include "scClusterBus_non_blocking_if.h"
34 #include "scClusterBusArbiter_if.h"
35 #include "scClusterBusSlave_if.h"
36 //#include "scProcessor.h"
37 //#include "scIGPMessage.h"
38 
39 class scProcessor; class ClusterBusRequest;
40 class scClusterBus
41  :
42  public scClusterBusDirect_if
43  , public scClusterBus_non_blocking_if
44  , public scClusterBus_blocking_if
45  , public sc_module
46 {
47 public:
48  // ports
49 // sc_in_clk clock;
50  sc_port<scClusterBusArbiter_if> arbiter_port;
51  sc_port<scClusterBusSlave_if, 0> slave_port;
52 
53  SC_HAS_PROCESS(scClusterBus);
54 
55  // constructor
56  scClusterBus(sc_module_name name_, scProcessor* Proc
57  , bool verbose = false)
58  : sc_module(name_)
59  , m_verbose(verbose)
60  , m_current_request(0)
61  , mProcessor(Proc)
62  {
63  // process declaration
64 /* ??? SC_METHOD(main_action);
65  dont_initialize();
66  sensitive << clock.neg();
67 */
68  }
69  virtual ~scClusterBus(void){}
70  // process
71  void main_action();
72 
73  // direct BUS interface
74 /* bool direct_read(int *data, unsigned int address);
75  bool direct_write(int *data, unsigned int address);*/
76  bool direct_read(scIGPMessage* M);
77  bool direct_write(scIGPMessage* M);
78  // non-blocking BUS interface//#include "scGridPoint.h"
79  void read(unsigned int unique_priority
80 /* , int *data
81  , unsigned int address*/
82  , scIGPMessage* M
83  , bool lock = false);
84  void write(unsigned int unique_priority
85 /* , int *data
86  , unsigned int address*/
87  , scIGPMessage* M
88  , bool lock = false);
89  ClusterBusStatus
90  get_status(unsigned int unique_priority);
91 
92  // blocking BUS interface
93  ClusterBusStatus
94  burst_read(unsigned int unique_priority
95 /* , int *data
96  , unsigned int start_address
97  , unsigned int length = 1*/
98  , scIGPMessage* M
99  , bool lock = false);
100  ClusterBusStatus
101  burst_write(unsigned int unique_priority
102  /* , int *data
103  , unsigned int start_address
104  , unsigned int length = 1*/
105  , scIGPMessage* M
106  , bool lock = false);
107  scClusterBusSlave_if* get_slave(scIGPMessage*);
108  scGridPoint* get_slave_GP(scIGPMessage* M);
109 
110 private:
111  void handle_request();
112 // void end_of_elaboration();
113  //scClusterBusSlave_if * get_slave(unsigned int address);
114  ClusterBusRequest * get_request(unsigned int priority);
115  ClusterBusRequest * get_next_request();
116  void clear_locks();
117  scProcessor* Processor_Get(void){ return mProcessor;}
118  bool m_verbose;
119  ClusterBusRequest_vec m_requests;
120  ClusterBusRequest *m_current_request;
121  scProcessor *mProcessor;
122 
123 }; // end class scClusterBus
124 
125 #endif // scClusterBus_h
scGridPoint.h
Function prototypes for the scEMPA simulator, Core.
scIGPMessage
The scIGPMessage class.
Definition: scIGPMessage.h:97
scClusterBusArbiter_if.h
the interface of the
scProcessor
Implements a module-name alias facility (i.e., user-provided names. Given that the basic units is scH...
Definition: scProcessor.h:130
scGridPoint
This class implements the autonomous grid point functionality: it is a communicating GridPoint....
Definition: scGridPoint.h:127
scClusterBusSlave_if.h
The inter-cluster bus states.
ClusterBusRequest
A GridPoint can be addressed also by its cluster address of type ClusterAddress_t.
Definition: ClusterBusRequest.h:37