1 | #ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_update_prediction_table_Types_h |
---|
2 | #define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_update_prediction_table_Types_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id: Types.h 82 2008-05-01 16:48:45Z 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 prediction_unit { |
---|
19 | namespace update_prediction_table { |
---|
20 | |
---|
21 | typedef enum |
---|
22 | { |
---|
23 | UPDATE_PREDICTION_STATE_EMPTY , // Slot is empty |
---|
24 | UPDATE_PREDICTION_STATE_WAIT_DECOD , // Fetch have access at the predictor |
---|
25 | UPDATE_PREDICTION_STATE_WAITEND , // Have make a prediction, wait branch_complete |
---|
26 | UPDATE_PREDICTION_STATE_EVENT , // have a event - must signal at the context_unit |
---|
27 | UPDATE_PREDICTION_STATE_OK , // branch is complete and can update predictor |
---|
28 | UPDATE_PREDICTION_STATE_KO , // have a event - must update predictor unit |
---|
29 | UPDATE_PREDICTION_STATE_END // branch is updated |
---|
30 | } state_t; |
---|
31 | |
---|
32 | class entry_t |
---|
33 | { |
---|
34 | public : state_t _state; |
---|
35 | public : Tcontrol_t _ifetch_prediction; |
---|
36 | public : Tbranch_condition_t _condition; |
---|
37 | public : Taddress_t _address_src; |
---|
38 | public : Taddress_t _address_dest; |
---|
39 | public : Tcontrol_t _last_take; |
---|
40 | public : Tcontrol_t _good_take; |
---|
41 | public : Thistory_t _history; |
---|
42 | public : Taddress_t _address_ras; |
---|
43 | public : Tptr_t _index_ras; |
---|
44 | }; |
---|
45 | |
---|
46 | }; // end namespace update_prediction_table |
---|
47 | }; // end namespace prediction_unit |
---|
48 | }; // end namespace front_end |
---|
49 | }; // end namespace multi_front_end |
---|
50 | }; // end namespace core |
---|
51 | }; // end namespace behavioural |
---|
52 | |
---|
53 | |
---|
54 | template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::state_t>(const morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::state_t& x) |
---|
55 | { |
---|
56 | switch (x) |
---|
57 | { |
---|
58 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EMPTY : return "empty" ; break; |
---|
59 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAIT_DECOD : return "wait_decod"; break; |
---|
60 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAITEND : return "waitend" ; break; |
---|
61 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT : return "event" ; break; |
---|
62 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_OK : return "ok" ; break; |
---|
63 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_KO : return "ko" ; break; |
---|
64 | case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END : return "end" ; break; |
---|
65 | default : return "" ; break; |
---|
66 | } |
---|
67 | }; |
---|
68 | |
---|
69 | |
---|
70 | }; // end namespace morpheo |
---|
71 | |
---|
72 | #endif |
---|