1 | #ifndef morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_unit_glue_Ifetch_unit_Glue_h |
---|
2 | #define morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_unit_glue_Ifetch_unit_Glue_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id: Ifetch_unit_Glue.h 131 2009-07-08 18:40:08Z rosiere $ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #ifdef SYSTEMC |
---|
12 | #include "systemc.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #include <iostream> |
---|
16 | #include "Common/include/ToString.h" |
---|
17 | #include "Common/include/Debug.h" |
---|
18 | #include "Behavioural/include/Types.h" |
---|
19 | |
---|
20 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Parameters.h" |
---|
21 | #ifdef STATISTICS |
---|
22 | #include "Behavioural/include/Stat.h" |
---|
23 | #endif |
---|
24 | #include "Behavioural/include/Component.h" |
---|
25 | #ifdef VHDL |
---|
26 | #include "Behavioural/include/Vhdl.h" |
---|
27 | #endif |
---|
28 | #include "Behavioural/include/Usage.h" |
---|
29 | |
---|
30 | namespace morpheo { |
---|
31 | namespace behavioural { |
---|
32 | |
---|
33 | namespace core { |
---|
34 | namespace multi_front_end { |
---|
35 | namespace front_end { |
---|
36 | namespace ifetch_unit { |
---|
37 | namespace ifetch_unit_glue { |
---|
38 | |
---|
39 | |
---|
40 | class Ifetch_unit_Glue |
---|
41 | #if SYSTEMC |
---|
42 | : public sc_module |
---|
43 | #endif |
---|
44 | { |
---|
45 | // -----[ fields ]---------------------------------------------------- |
---|
46 | // Parameters |
---|
47 | protected : const std::string _name; |
---|
48 | protected : const Parameters * _param; |
---|
49 | private : const Tusage_t _usage; |
---|
50 | |
---|
51 | #ifdef STATISTICS |
---|
52 | public : Stat * _stat; |
---|
53 | #endif |
---|
54 | |
---|
55 | public : Component * _component; |
---|
56 | private : Interfaces * _interfaces; |
---|
57 | |
---|
58 | #ifdef SYSTEMC |
---|
59 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
60 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
61 | public : SC_CLOCK * in_CLOCK ; |
---|
62 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
63 | |
---|
64 | // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
65 | public : SC_OUT(Tcontrol_t ) * out_ICACHE_REQ_VAL ; |
---|
66 | public : SC_IN (Tcontrol_t ) * in_ICACHE_REQ_ADDRESS_VAL ; |
---|
67 | public : SC_OUT(Tcontrol_t ) * out_ICACHE_REQ_QUEUE_VAL ; |
---|
68 | |
---|
69 | public : SC_IN (Tcontrol_t ) * in_ICACHE_REQ_ACK ; |
---|
70 | public : SC_OUT(Tcontrol_t ) * out_ICACHE_REQ_ADDRESS_ACK ; |
---|
71 | public : SC_IN (Tcontrol_t ) * in_ICACHE_REQ_QUEUE_ACK ; |
---|
72 | |
---|
73 | public : SC_OUT(Ticache_type_t ) * out_ICACHE_REQ_TYPE ; |
---|
74 | |
---|
75 | public : SC_OUT(Taddress_t ) * out_ICACHE_REQ_ADDRESS ; |
---|
76 | public : SC_IN (Taddress_t ) * in_ICACHE_REQ_ADDRESS_ADDRESS; |
---|
77 | public : SC_OUT(Taddress_t ) * out_ICACHE_REQ_QUEUE_ADDRESS ; |
---|
78 | |
---|
79 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
80 | public : SC_IN (Tcontrol_t ) * in_EVENT_VAL ; |
---|
81 | public : SC_OUT(Tcontrol_t ) * out_EVENT_ADDRESS_VAL ; |
---|
82 | public : SC_OUT(Tcontrol_t ) * out_EVENT_QUEUE_VAL ; |
---|
83 | |
---|
84 | public : SC_OUT(Tcontrol_t ) * out_EVENT_ACK ; |
---|
85 | public : SC_IN (Tcontrol_t ) * in_EVENT_ADDRESS_ACK ; |
---|
86 | public : SC_IN (Tcontrol_t ) * in_EVENT_QUEUE_ACK ; |
---|
87 | |
---|
88 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
89 | |
---|
90 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
91 | |
---|
92 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
93 | #endif |
---|
94 | |
---|
95 | // -----[ Methods ]--------------------------------------------------- |
---|
96 | |
---|
97 | #ifdef SYSTEMC |
---|
98 | SC_HAS_PROCESS (Ifetch_unit_Glue); |
---|
99 | #endif |
---|
100 | public : Ifetch_unit_Glue |
---|
101 | ( |
---|
102 | #ifdef SYSTEMC |
---|
103 | sc_module_name name, |
---|
104 | #else |
---|
105 | std::string name, |
---|
106 | #endif |
---|
107 | #ifdef STATISTICS |
---|
108 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
109 | #endif |
---|
110 | Parameters * param, |
---|
111 | morpheo::behavioural::Tusage_t usage |
---|
112 | ); |
---|
113 | public : ~Ifetch_unit_Glue (void); |
---|
114 | |
---|
115 | private : void allocation ( |
---|
116 | #ifdef STATISTICS |
---|
117 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
118 | #else |
---|
119 | void |
---|
120 | #endif |
---|
121 | ); |
---|
122 | private : void deallocation (void); |
---|
123 | |
---|
124 | #ifdef SYSTEMC |
---|
125 | public : void constant (void); |
---|
126 | # if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
127 | public : void transition (void); |
---|
128 | # endif |
---|
129 | public : void genMealy_icache_req (void); |
---|
130 | public : void genMealy_event (void); |
---|
131 | #endif |
---|
132 | |
---|
133 | #if VHDL |
---|
134 | public : void vhdl (void); |
---|
135 | private : void vhdl_declaration (Vhdl * & vhdl); |
---|
136 | private : void vhdl_body (Vhdl * & vhdl); |
---|
137 | #endif |
---|
138 | |
---|
139 | #ifdef STATISTICS |
---|
140 | public : void statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
141 | public : void statistics_deallocation (void); |
---|
142 | #endif |
---|
143 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
144 | private : void end_cycle (void); |
---|
145 | #endif |
---|
146 | }; |
---|
147 | |
---|
148 | }; // end namespace ifetch_unit_glue |
---|
149 | }; // end namespace ifetch_unit |
---|
150 | }; // end namespace front_end |
---|
151 | }; // end namespace multi_front_end |
---|
152 | }; // end namespace core |
---|
153 | |
---|
154 | }; // end namespace behavioural |
---|
155 | }; // end namespace morpheo |
---|
156 | |
---|
157 | #endif |
---|