1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Direction_Glue_constant.cpp 131 2009-07-08 18:40:08Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_front_end { |
---|
15 | namespace front_end { |
---|
16 | namespace prediction_unit { |
---|
17 | namespace direction { |
---|
18 | namespace direction_glue { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Direction_Glue::constant" |
---|
23 | void Direction_Glue::constant (void) |
---|
24 | { |
---|
25 | log_printf(FUNC,Direction_Glue,FUNCTION,"Begin"); |
---|
26 | |
---|
27 | if (not _param->_have_component_meta_predictor) |
---|
28 | { |
---|
29 | // no need update |
---|
30 | for (uint32_t i=0; i<_param->_nb_inst_update; i++) |
---|
31 | PORT_WRITE(out_UPDATE_ACK [i], 1); |
---|
32 | |
---|
33 | // always ack |
---|
34 | for (uint32_t i=0; i<_param->_nb_inst_predict; i++) |
---|
35 | { |
---|
36 | PORT_WRITE(out_PREDICT_ACK [i], 1); |
---|
37 | |
---|
38 | // constant direction : never / always |
---|
39 | switch (_param->_predictor_scheme) |
---|
40 | { |
---|
41 | case PREDICTOR_NEVER_TAKE : |
---|
42 | { |
---|
43 | PORT_WRITE(out_PREDICT_DIRECTION [i], 0); |
---|
44 | break; |
---|
45 | } |
---|
46 | case PREDICTOR_ALWAYS_TAKE : |
---|
47 | { |
---|
48 | PORT_WRITE(out_PREDICT_DIRECTION [i], 1); |
---|
49 | break; |
---|
50 | } |
---|
51 | default : break; |
---|
52 | } |
---|
53 | } |
---|
54 | } |
---|
55 | |
---|
56 | log_printf(FUNC,Direction_Glue,FUNCTION,"End"); |
---|
57 | }; |
---|
58 | |
---|
59 | }; // end namespace direction_glue |
---|
60 | }; // end namespace direction |
---|
61 | }; // end namespace prediction_unit |
---|
62 | }; // end namespace front_end |
---|
63 | }; // end namespace multi_front_end |
---|
64 | }; // end namespace core |
---|
65 | }; // end namespace behavioural |
---|
66 | }; // end namespace morpheo |
---|
67 | #endif |
---|