[78] | 1 | #ifndef morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_queue_Types_h |
---|
| 2 | #define morpheo_behavioural_core_multi_front_end_front_end_ifetch_unit_ifetch_queue_Types_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id: Types.h 128 2009-06-26 08:43:23Z rosiere $ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #include "Behavioural/include/Types.h" |
---|
| 12 | |
---|
| 13 | namespace morpheo { |
---|
| 14 | namespace behavioural { |
---|
| 15 | namespace core { |
---|
| 16 | namespace multi_front_end { |
---|
| 17 | namespace front_end { |
---|
| 18 | namespace ifetch_unit { |
---|
| 19 | namespace ifetch_queue { |
---|
| 20 | |
---|
| 21 | typedef enum |
---|
| 22 | { |
---|
| 23 | IFETCH_QUEUE_STATE_EMPTY , // slot is empty |
---|
[101] | 24 | // IFETCH_QUEUE_STATE_WAIT_REQ , // slot is allocated - wait request to cache |
---|
[78] | 25 | IFETCH_QUEUE_STATE_WAIT_RSP , // slot have send a request - wait respons from cache |
---|
| 26 | IFETCH_QUEUE_STATE_HAVE_RSP , // slot have a bloc of instruction - wait accept by decod |
---|
| 27 | IFETCH_QUEUE_STATE_ERROR_WAIT_RSP // A event occure -> flush the queue but, ack rsp |
---|
| 28 | } ifetch_queue_state_t; |
---|
| 29 | |
---|
| 30 | class ifetch_queue_entry_t |
---|
| 31 | { |
---|
| 32 | public : ifetch_queue_state_t _state ; |
---|
| 33 | public : Tinstruction_t * _instruction ; |
---|
| 34 | public : Tcontrol_t * _instruction_enable ; |
---|
| 35 | public : Tgeneral_address_t _address ; |
---|
| 36 | public : Tinst_ifetch_ptr_t _inst_ifetch_ptr ; |
---|
| 37 | public : Tbranch_state_t _branch_state ; |
---|
| 38 | public : Tprediction_ptr_t _branch_update_prediction_id; |
---|
| 39 | public : Texception_t _exception ; |
---|
| 40 | |
---|
| 41 | public : ifetch_queue_entry_t (uint32_t nb_instruction) |
---|
| 42 | { |
---|
| 43 | _instruction = new Tinstruction_t [nb_instruction]; |
---|
| 44 | _instruction_enable = new Tcontrol_t [nb_instruction]; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | public : ~ifetch_queue_entry_t (void) |
---|
| 48 | { |
---|
[128] | 49 | delete [] _instruction ; |
---|
| 50 | delete [] _instruction_enable; |
---|
[78] | 51 | } |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | }; // end namespace ifetch_queue |
---|
| 55 | }; // end namespace ifetch_unit |
---|
| 56 | }; // end namespace front_end |
---|
| 57 | }; // end namespace multi_front_end |
---|
| 58 | }; // end namespace core |
---|
| 59 | }; // end namespace behavioural |
---|
[85] | 60 | |
---|
| 61 | template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::ifetch_queue_state_t>(const morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::ifetch_queue_state_t& x) |
---|
| 62 | { |
---|
| 63 | switch (x) |
---|
| 64 | { |
---|
| 65 | case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_EMPTY : return "empty" ; break; |
---|
| 66 | // case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_WAIT_REQ : return "wait_req" ; break; |
---|
| 67 | case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_WAIT_RSP : return "wait_rsp" ; break; |
---|
| 68 | case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_HAVE_RSP : return "have_rsp" ; break; |
---|
| 69 | case morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::IFETCH_QUEUE_STATE_ERROR_WAIT_RSP : return "error_wait_rsp"; break; |
---|
| 70 | default : return "" ; break; |
---|
| 71 | } |
---|
| 72 | }; |
---|
| 73 | |
---|
| 74 | |
---|
[78] | 75 | }; // end namespace morpheo |
---|
| 76 | #endif |
---|