[54] | 1 | #ifndef morpheo_behavioural_core_multi_execute_loop_execute_loop_multi_read_unit_read_unit_read_queue_Read_queue_h |
---|
| 2 | #define morpheo_behavioural_core_multi_execute_loop_execute_loop_multi_read_unit_read_unit_read_queue_Read_queue_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id: Read_queue.h 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 6 | * |
---|
[76] | 7 | * [ Description ] |
---|
[54] | 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #ifdef SYSTEMC |
---|
| 12 | #include "systemc.h" |
---|
| 13 | #endif |
---|
| 14 | |
---|
| 15 | #include <iostream> |
---|
| 16 | #include <queue> |
---|
| 17 | #include "Common/include/ToString.h" |
---|
| 18 | #include "Common/include/Debug.h" |
---|
[66] | 19 | #include "Behavioural/include/Types.h" |
---|
[54] | 20 | |
---|
| 21 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h" |
---|
| 22 | #ifdef STATISTICS |
---|
[75] | 23 | #include "Behavioural/include/Stat.h" |
---|
[54] | 24 | #endif |
---|
| 25 | #include "Behavioural/include/Component.h" |
---|
| 26 | #ifdef VHDL |
---|
| 27 | #include "Behavioural/include/Vhdl.h" |
---|
| 28 | #endif |
---|
| 29 | |
---|
| 30 | namespace morpheo { |
---|
| 31 | namespace behavioural { |
---|
| 32 | namespace core { |
---|
| 33 | namespace multi_execute_loop { |
---|
| 34 | namespace execute_loop { |
---|
| 35 | namespace multi_read_unit { |
---|
| 36 | namespace read_unit { |
---|
| 37 | namespace read_queue { |
---|
| 38 | |
---|
| 39 | class Tread_queue_entry_t |
---|
| 40 | { |
---|
| 41 | public : Tcontext_t _context_id ; |
---|
[66] | 42 | public : Tcontext_t _front_end_id ; |
---|
| 43 | public : Tcontext_t _ooo_engine_id; |
---|
| 44 | public : Tpacket_t _rob_id ; |
---|
[54] | 45 | public : Toperation_t _operation ; |
---|
| 46 | public : Ttype_t _type ; |
---|
[76] | 47 | public : Tlsq_ptr_t _store_queue_ptr_write; |
---|
| 48 | public : Tlsq_ptr_t _load_queue_ptr_write; |
---|
[54] | 49 | public : Tcontrol_t _has_immediat ; |
---|
| 50 | public : Tgeneral_data_t _immediat ; |
---|
| 51 | public : Tcontrol_t _read_ra ; |
---|
| 52 | public : Tgeneral_address_t _num_reg_ra ; |
---|
| 53 | public : Tcontrol_t _read_rb ; |
---|
| 54 | public : Tgeneral_address_t _num_reg_rb ; |
---|
| 55 | public : Tcontrol_t _read_rc ; |
---|
| 56 | public : Tspecial_address_t _num_reg_rc ; |
---|
| 57 | public : Tcontrol_t _write_rd ; |
---|
| 58 | public : Tgeneral_address_t _num_reg_rd ; |
---|
| 59 | public : Tcontrol_t _write_re ; |
---|
| 60 | public : Tspecial_address_t _num_reg_re ; |
---|
| 61 | |
---|
[75] | 62 | friend std::ostream& operator<< (std::ostream& output_stream, |
---|
[54] | 63 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x) |
---|
| 64 | { |
---|
[76] | 65 | output_stream << " * _context_id : " << toString(x._context_id ) << std::endl |
---|
| 66 | << " * _front_end_id : " << toString(x._front_end_id ) << std::endl |
---|
| 67 | << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl |
---|
| 68 | << " * _rob_id : " << toString(x._rob_id ) << std::endl |
---|
| 69 | << " * _operation : " << toString(x._operation ) << std::endl |
---|
| 70 | << " * _type : " << toString(x._type ) << std::endl |
---|
| 71 | << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl |
---|
| 72 | << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl |
---|
| 73 | << " * _has_immediat : " << toString(x._has_immediat ) << std::endl |
---|
| 74 | << " * _immediat : " << toString(x._immediat ) << std::endl |
---|
| 75 | << " * _read_ra : " << toString(x._read_ra ) << std::endl |
---|
| 76 | << " * _num_reg_ra : " << toString(x._num_reg_ra ) << std::endl |
---|
| 77 | << " * _read_rb : " << toString(x._read_rb ) << std::endl |
---|
| 78 | << " * _num_reg_rb : " << toString(x._num_reg_rb ) << std::endl |
---|
| 79 | << " * _read_rc : " << toString(x._read_rc ) << std::endl |
---|
| 80 | << " * _num_reg_rc : " << toString(x._num_reg_rc ) << std::endl |
---|
| 81 | << " * _write_rd : " << toString(x._write_rd ) << std::endl |
---|
| 82 | << " * _num_reg_rd : " << toString(x._num_reg_rd ) << std::endl |
---|
| 83 | << " * _write_re : " << toString(x._write_re ) << std::endl |
---|
| 84 | << " * _num_reg_re : " << toString(x._num_reg_re ) << std::endl; |
---|
[54] | 85 | |
---|
| 86 | return output_stream; |
---|
| 87 | } |
---|
| 88 | |
---|
| 89 | }; |
---|
| 90 | |
---|
| 91 | class Tread_queue_head_entry_t |
---|
| 92 | { |
---|
| 93 | public : Tcontext_t _context_id ; |
---|
[66] | 94 | public : Tcontext_t _front_end_id ; |
---|
| 95 | public : Tcontext_t _ooo_engine_id; |
---|
| 96 | public : Tpacket_t _rob_id ; |
---|
[54] | 97 | public : Toperation_t _operation ; |
---|
| 98 | public : Ttype_t _type ; |
---|
[76] | 99 | public : Tlsq_ptr_t _store_queue_ptr_write; |
---|
| 100 | public : Tlsq_ptr_t _load_queue_ptr_write; |
---|
[54] | 101 | public : Tcontrol_t _has_immediat ; |
---|
| 102 | public : Tgeneral_data_t _immediat ; |
---|
| 103 | public : Tcontrol_t _read_ra ; |
---|
| 104 | public : Tcontrol_t _read_ra_val ; // 1 : must access at the registerFile (after access, is set at 0) |
---|
| 105 | public : Tgeneral_address_t _num_reg_ra ; |
---|
| 106 | public : Tcontrol_t _data_ra_val ; // 1 : the read of registerFile is valid |
---|
| 107 | public : Tgeneral_data_t _data_ra ; |
---|
| 108 | public : Tcontrol_t _read_rb ; |
---|
| 109 | public : Tcontrol_t _read_rb_val ; |
---|
| 110 | public : Tgeneral_address_t _num_reg_rb ; |
---|
| 111 | public : Tcontrol_t _data_rb_val ; |
---|
| 112 | public : Tgeneral_data_t _data_rb ; |
---|
| 113 | public : Tcontrol_t _read_rc ; |
---|
| 114 | public : Tcontrol_t _read_rc_val ; |
---|
| 115 | public : Tspecial_address_t _num_reg_rc ; |
---|
| 116 | public : Tcontrol_t _data_rc_val ; |
---|
| 117 | public : Tspecial_data_t _data_rc ; |
---|
| 118 | public : Tcontrol_t _write_rd ; |
---|
| 119 | public : Tgeneral_address_t _num_reg_rd ; |
---|
| 120 | public : Tcontrol_t _write_re ; |
---|
| 121 | public : Tspecial_address_t _num_reg_re ; |
---|
| 122 | |
---|
| 123 | #undef FUNCTION |
---|
| 124 | #define FUNCTION "Tread_queue_head_entry_t::operator=" |
---|
| 125 | public : Tread_queue_head_entry_t& operator=(Tread_queue_entry_t x) |
---|
| 126 | { |
---|
| 127 | log_printf(FUNC,Read_queue,FUNCTION,"Begin"); |
---|
| 128 | |
---|
| 129 | _context_id = x._context_id ; |
---|
[66] | 130 | _front_end_id = x._front_end_id ; |
---|
| 131 | _ooo_engine_id= x._ooo_engine_id; |
---|
| 132 | _rob_id = x._rob_id ; |
---|
[54] | 133 | _operation = x._operation ; |
---|
| 134 | _type = x._type ; |
---|
[76] | 135 | _store_queue_ptr_write = x._store_queue_ptr_write; |
---|
| 136 | _load_queue_ptr_write = x._load_queue_ptr_write ; |
---|
[54] | 137 | _has_immediat = x._has_immediat ; |
---|
| 138 | _immediat = x._immediat ; |
---|
| 139 | _read_ra = x._read_ra ; |
---|
| 140 | _read_ra_val = x._read_ra == 1 ; //if not must read, the registerFile is already access |
---|
| 141 | _num_reg_ra = x._num_reg_ra ; |
---|
| 142 | _data_ra_val = x._read_ra == 0 ; //if not must read, the data is already valid |
---|
| 143 | _data_ra = 0 ; |
---|
| 144 | _read_rb = x._read_rb ; |
---|
| 145 | _read_rb_val = x._read_rb == 1 ; |
---|
| 146 | _num_reg_rb = x._num_reg_rb ; |
---|
| 147 | _data_rb_val = x._read_rb == 0 ; |
---|
| 148 | _data_rb = 0 ; |
---|
| 149 | _read_rc = x._read_rc ; |
---|
| 150 | _read_rc_val = x._read_rc == 1 ; |
---|
| 151 | _num_reg_rc = x._num_reg_rc ; |
---|
| 152 | _data_rc_val = x._read_rc == 0 ; |
---|
| 153 | _data_rc = 0 ; |
---|
| 154 | _write_rd = x._write_rd ; |
---|
| 155 | _num_reg_rd = x._num_reg_rd ; |
---|
| 156 | _write_re = x._write_re ; |
---|
| 157 | _num_reg_re = x._num_reg_re ; |
---|
| 158 | |
---|
| 159 | log_printf(FUNC,Read_queue,FUNCTION,"End"); |
---|
| 160 | |
---|
| 161 | return *this; |
---|
| 162 | } |
---|
| 163 | |
---|
[75] | 164 | friend std::ostream& operator<< (std::ostream& output_stream, |
---|
[54] | 165 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x) |
---|
| 166 | { |
---|
[76] | 167 | output_stream << " * _context_id : " << x._context_id << std::endl |
---|
| 168 | << " * _front_end_id : " << x._front_end_id << std::endl |
---|
| 169 | << " * _ooo_engine_id : " << x._ooo_engine_id<< std::endl |
---|
| 170 | << " * _rob_id : " << x._rob_id << std::endl |
---|
| 171 | << " * _operation : " << x._operation << std::endl |
---|
| 172 | << " * _type : " << x._type << std::endl |
---|
| 173 | << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl |
---|
| 174 | << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl |
---|
| 175 | << " * _has_immediat : " << x._has_immediat << std::endl |
---|
| 176 | << " * _immediat : " << x._immediat << std::endl |
---|
| 177 | << " * _read_ra : " << x._read_ra << std::endl |
---|
| 178 | << " * _read_ra_val : " << x._read_ra_val << std::endl |
---|
| 179 | << " * _num_reg_ra : " << x._num_reg_ra << std::endl |
---|
| 180 | << " * _data_ra_val : " << x._data_ra_val << std::endl |
---|
| 181 | << " * _data_ra : " << x._data_ra << std::endl |
---|
| 182 | << " * _read_rb : " << x._read_rb << std::endl |
---|
| 183 | << " * _read_rb_val : " << x._read_rb_val << std::endl |
---|
| 184 | << " * _num_reg_rb : " << x._num_reg_rb << std::endl |
---|
| 185 | << " * _data_rb_val : " << x._data_rb_val << std::endl |
---|
| 186 | << " * _data_rb : " << x._data_rb << std::endl |
---|
| 187 | << " * _read_rc : " << x._read_rc << std::endl |
---|
| 188 | << " * _read_rc_val : " << x._read_rc_val << std::endl |
---|
| 189 | << " * _num_reg_rc : " << x._num_reg_rc << std::endl |
---|
| 190 | << " * _data_rc_val : " << x._data_rc_val << std::endl |
---|
| 191 | << " * _data_rc : " << x._data_rc << std::endl |
---|
| 192 | << " * _write_rd : " << x._write_rd << std::endl |
---|
| 193 | << " * _num_reg_rd : " << x._num_reg_rd << std::endl |
---|
| 194 | << " * _write_re : " << x._write_re << std::endl |
---|
| 195 | << " * _num_reg_re : " << x._num_reg_re << std::endl; |
---|
[54] | 196 | |
---|
| 197 | return output_stream; |
---|
| 198 | } |
---|
| 199 | }; |
---|
| 200 | |
---|
| 201 | class Read_queue |
---|
| 202 | #if SYSTEMC |
---|
| 203 | : public sc_module |
---|
| 204 | #endif |
---|
| 205 | { |
---|
[76] | 206 | // -----[ fields ]---------------------------------------------------- |
---|
[54] | 207 | // Parameters |
---|
[75] | 208 | protected : const std::string _name; |
---|
[54] | 209 | protected : const Parameters * _param; |
---|
| 210 | |
---|
| 211 | #ifdef STATISTICS |
---|
[75] | 212 | public : Stat * _stat; |
---|
[54] | 213 | #endif |
---|
| 214 | |
---|
| 215 | public : Component * _component; |
---|
| 216 | private : Interfaces * _interfaces; |
---|
| 217 | |
---|
| 218 | #ifdef SYSTEMC |
---|
[76] | 219 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 220 | // Interface |
---|
| 221 | public : SC_CLOCK * in_CLOCK ; |
---|
| 222 | public : SC_IN (Tcontrol_t ) * in_NRESET ; |
---|
| 223 | |
---|
[76] | 224 | // ~~~~~[ Interface "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 225 | |
---|
[76] | 226 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_VAL ; |
---|
| 227 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_IN_ACK ; |
---|
| 228 | public : SC_IN (Tcontext_t ) * in_READ_QUEUE_IN_CONTEXT_ID ; |
---|
| 229 | public : SC_IN (Tcontext_t ) * in_READ_QUEUE_IN_FRONT_END_ID ; |
---|
| 230 | public : SC_IN (Tcontext_t ) * in_READ_QUEUE_IN_OOO_ENGINE_ID ; |
---|
| 231 | public : SC_IN (Tpacket_t ) * in_READ_QUEUE_IN_ROB_ID ; |
---|
| 232 | public : SC_IN (Toperation_t ) * in_READ_QUEUE_IN_OPERATION ; |
---|
| 233 | public : SC_IN (Ttype_t ) * in_READ_QUEUE_IN_TYPE ; |
---|
| 234 | public : SC_IN (Tlsq_ptr_t ) * in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE; |
---|
| 235 | public : SC_IN (Tlsq_ptr_t ) * in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ; |
---|
| 236 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_HAS_IMMEDIAT ; |
---|
| 237 | public : SC_IN (Tgeneral_data_t ) * in_READ_QUEUE_IN_IMMEDIAT ; |
---|
| 238 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_READ_RA ; |
---|
| 239 | public : SC_IN (Tgeneral_address_t) * in_READ_QUEUE_IN_NUM_REG_RA ; |
---|
| 240 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_READ_RB ; |
---|
| 241 | public : SC_IN (Tgeneral_address_t) * in_READ_QUEUE_IN_NUM_REG_RB ; |
---|
| 242 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_READ_RC ; |
---|
| 243 | public : SC_IN (Tspecial_address_t) * in_READ_QUEUE_IN_NUM_REG_RC ; |
---|
| 244 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_WRITE_RD ; |
---|
| 245 | public : SC_IN (Tgeneral_address_t) * in_READ_QUEUE_IN_NUM_REG_RD ; |
---|
| 246 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_IN_WRITE_RE ; |
---|
| 247 | public : SC_IN (Tspecial_address_t) * in_READ_QUEUE_IN_NUM_REG_RE ; |
---|
[54] | 248 | |
---|
[76] | 249 | // ~~~~~[ Interface "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 250 | |
---|
[76] | 251 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_VAL ; |
---|
| 252 | public : SC_IN (Tcontrol_t ) * in_READ_QUEUE_OUT_ACK ; |
---|
| 253 | public : SC_OUT(Tcontext_t ) * out_READ_QUEUE_OUT_CONTEXT_ID ; |
---|
| 254 | public : SC_OUT(Tcontext_t ) * out_READ_QUEUE_OUT_FRONT_END_ID ; |
---|
| 255 | public : SC_OUT(Tcontext_t ) * out_READ_QUEUE_OUT_OOO_ENGINE_ID ; |
---|
| 256 | public : SC_OUT(Tpacket_t ) * out_READ_QUEUE_OUT_ROB_ID ; |
---|
| 257 | public : SC_OUT(Toperation_t ) * out_READ_QUEUE_OUT_OPERATION ; |
---|
| 258 | public : SC_OUT(Ttype_t ) * out_READ_QUEUE_OUT_TYPE ; |
---|
| 259 | public : SC_OUT(Tlsq_ptr_t ) * out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE; |
---|
| 260 | public : SC_OUT(Tlsq_ptr_t ) * out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE ; |
---|
| 261 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_HAS_IMMEDIAT ; |
---|
| 262 | public : SC_OUT(Tgeneral_data_t ) * out_READ_QUEUE_OUT_IMMEDIAT ; |
---|
| 263 | // public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_READ_RA ; |
---|
| 264 | public : SC_OUT(Tgeneral_address_t) * out_READ_QUEUE_OUT_NUM_REG_RA ; |
---|
| 265 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_DATA_RA_VAL ; |
---|
| 266 | public : SC_OUT(Tgeneral_data_t ) * out_READ_QUEUE_OUT_DATA_RA ; |
---|
| 267 | // public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_READ_RB ; |
---|
| 268 | public : SC_OUT(Tgeneral_address_t) * out_READ_QUEUE_OUT_NUM_REG_RB ; |
---|
| 269 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_DATA_RB_VAL ; |
---|
| 270 | public : SC_OUT(Tgeneral_data_t ) * out_READ_QUEUE_OUT_DATA_RB ; |
---|
| 271 | // public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_READ_RC ; |
---|
| 272 | public : SC_OUT(Tspecial_address_t) * out_READ_QUEUE_OUT_NUM_REG_RC ; |
---|
| 273 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_DATA_RC_VAL ; |
---|
| 274 | public : SC_OUT(Tspecial_data_t ) * out_READ_QUEUE_OUT_DATA_RC ; |
---|
| 275 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_WRITE_RD ; |
---|
| 276 | public : SC_OUT(Tgeneral_address_t) * out_READ_QUEUE_OUT_NUM_REG_RD ; |
---|
| 277 | public : SC_OUT(Tcontrol_t ) * out_READ_QUEUE_OUT_WRITE_RE ; |
---|
| 278 | public : SC_OUT(Tspecial_address_t) * out_READ_QUEUE_OUT_NUM_REG_RE ; |
---|
[54] | 279 | |
---|
[76] | 280 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 281 | |
---|
[66] | 282 | public : SC_OUT(Tcontrol_t ) ** out_GPR_READ_VAL ; |
---|
| 283 | public : SC_IN (Tcontrol_t ) ** in_GPR_READ_ACK ; |
---|
| 284 | public : SC_OUT(Tcontext_t ) ** out_GPR_READ_OOO_ENGINE_ID; |
---|
| 285 | public : SC_OUT(Tgeneral_address_t) ** out_GPR_READ_NUM_REG ; |
---|
| 286 | public : SC_IN (Tgeneral_data_t ) ** in_GPR_READ_DATA ; |
---|
| 287 | public : SC_IN (Tcontrol_t ) ** in_GPR_READ_DATA_VAL ; |
---|
[54] | 288 | |
---|
[76] | 289 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 290 | |
---|
[66] | 291 | public : SC_OUT(Tcontrol_t ) ** out_SPR_READ_VAL ; |
---|
| 292 | public : SC_IN (Tcontrol_t ) ** in_SPR_READ_ACK ; |
---|
| 293 | public : SC_OUT(Tcontext_t ) ** out_SPR_READ_OOO_ENGINE_ID; |
---|
| 294 | public : SC_OUT(Tspecial_address_t) ** out_SPR_READ_NUM_REG ; |
---|
| 295 | public : SC_IN (Tspecial_data_t ) ** in_SPR_READ_DATA ; |
---|
| 296 | public : SC_IN (Tcontrol_t ) ** in_SPR_READ_DATA_VAL ; |
---|
[54] | 297 | |
---|
[76] | 298 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 299 | |
---|
[66] | 300 | public : SC_IN (Tcontrol_t ) ** in_GPR_WRITE_VAL ; |
---|
| 301 | public : SC_IN (Tcontext_t ) ** in_GPR_WRITE_OOO_ENGINE_ID; |
---|
| 302 | public : SC_IN (Tgeneral_address_t) ** in_GPR_WRITE_NUM_REG ; |
---|
| 303 | public : SC_IN (Tgeneral_data_t ) ** in_GPR_WRITE_DATA ; |
---|
[54] | 304 | |
---|
[76] | 305 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 306 | |
---|
[66] | 307 | public : SC_IN (Tcontrol_t ) ** in_SPR_WRITE_VAL ; |
---|
| 308 | public : SC_IN (Tcontext_t ) ** in_SPR_WRITE_OOO_ENGINE_ID; |
---|
| 309 | public : SC_IN (Tspecial_address_t) ** in_SPR_WRITE_NUM_REG ; |
---|
| 310 | public : SC_IN (Tspecial_data_t ) ** in_SPR_WRITE_DATA ; |
---|
[54] | 311 | |
---|
[76] | 312 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 313 | |
---|
[76] | 314 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 315 | protected : Tread_queue_head_entry_t * _queue_head; |
---|
[75] | 316 | protected : std::queue<Tread_queue_entry_t *> * _queue; |
---|
[54] | 317 | |
---|
[76] | 318 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[54] | 319 | |
---|
| 320 | protected :Tcontrol_t internal_READ_QUEUE_OUT_VAL ; |
---|
| 321 | protected :Tcontrol_t internal_READ_QUEUE_OUT_READ_RA_VAL ; |
---|
| 322 | protected :Tcontrol_t internal_READ_QUEUE_OUT_READ_RB_VAL ; |
---|
| 323 | protected :Tcontrol_t internal_READ_QUEUE_OUT_READ_RC_VAL ; |
---|
| 324 | |
---|
| 325 | protected :Tcontrol_t internal_READ_QUEUE_OUT_DATA_RA_VAL ; |
---|
| 326 | protected :Tcontrol_t internal_READ_QUEUE_OUT_DATA_RB_VAL ; |
---|
| 327 | protected :Tgeneral_data_t internal_READ_QUEUE_OUT_DATA_RA ; |
---|
| 328 | protected :Tgeneral_data_t internal_READ_QUEUE_OUT_DATA_RB ; |
---|
| 329 | protected :Tcontrol_t internal_READ_QUEUE_OUT_DATA_RC_VAL ; |
---|
| 330 | protected :Tspecial_data_t internal_READ_QUEUE_OUT_DATA_RC ; |
---|
| 331 | #endif |
---|
| 332 | |
---|
[76] | 333 | // -----[ methods ]--------------------------------------------------- |
---|
[54] | 334 | |
---|
| 335 | #ifdef SYSTEMC |
---|
| 336 | SC_HAS_PROCESS (Read_queue); |
---|
| 337 | #endif |
---|
| 338 | public : Read_queue ( |
---|
| 339 | #ifdef SYSTEMC |
---|
| 340 | sc_module_name name, |
---|
| 341 | #else |
---|
[75] | 342 | std::string name, |
---|
[54] | 343 | #endif |
---|
| 344 | #ifdef STATISTICS |
---|
| 345 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
| 346 | #endif |
---|
| 347 | Parameters * param ); |
---|
| 348 | |
---|
| 349 | public : Read_queue (Parameters * param ); |
---|
| 350 | public : ~Read_queue (void); |
---|
| 351 | |
---|
| 352 | #ifdef SYSTEMC |
---|
| 353 | private : void allocation (void); |
---|
| 354 | private : void deallocation (void); |
---|
| 355 | |
---|
| 356 | public : void transition (void); |
---|
| 357 | public : void genMoore (void); |
---|
| 358 | public : void genMealy_read_queue_out_val (void); |
---|
| 359 | public : void genMealy_read_queue_out_gpr (void); |
---|
| 360 | public : void genMealy_read_queue_out_spr (void); |
---|
| 361 | #endif |
---|
| 362 | #ifdef STATISTICS |
---|
[75] | 363 | public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
[54] | 364 | #endif |
---|
| 365 | |
---|
| 366 | #if VHDL |
---|
| 367 | public : void vhdl (void); |
---|
| 368 | private : void vhdl_declaration (Vhdl * & vhdl); |
---|
| 369 | private : void vhdl_body (Vhdl * & vhdl); |
---|
| 370 | #endif |
---|
[75] | 371 | |
---|
| 372 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 373 | private : void end_cycle (void); |
---|
[54] | 374 | #endif |
---|
| 375 | }; |
---|
| 376 | |
---|
| 377 | }; // end namespace read_queue |
---|
| 378 | }; // end namespace read_unit |
---|
| 379 | }; // end namespace multi_read_unit |
---|
| 380 | }; // end namespace execute_loop |
---|
| 381 | }; // end namespace multi_execute_loop |
---|
| 382 | }; // end namespace core |
---|
| 383 | |
---|
| 384 | }; // end namespace behavioural |
---|
| 385 | }; // end namespace morpheo |
---|
| 386 | |
---|
| 387 | #endif |
---|