1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h" |
---|
9 | #include "Common/include/Max.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 prediction_unit_glue { |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Prediction_unit_Glue::Parameters" |
---|
22 | Parameters::Parameters (uint32_t nb_context , |
---|
23 | uint32_t nb_decod_unit , |
---|
24 | // uint32_t nb_ooo_engine , |
---|
25 | uint32_t size_address , |
---|
26 | uint32_t * nb_instruction , |
---|
27 | uint32_t * size_depth , |
---|
28 | uint32_t * nb_inst_decod , |
---|
29 | // uint32_t * nb_inst_update , |
---|
30 | uint32_t nb_inst_branch_predict, |
---|
31 | uint32_t nb_inst_branch_decod , |
---|
32 | uint32_t nb_inst_branch_update , |
---|
33 | bool is_toplevel |
---|
34 | ) |
---|
35 | { |
---|
36 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
37 | |
---|
38 | _nb_context = nb_context ; |
---|
39 | _nb_instruction = nb_instruction ; |
---|
40 | // _size_depth = size_depth ; |
---|
41 | _array_size_depth = size_depth ; |
---|
42 | _nb_decod_unit = nb_decod_unit ; |
---|
43 | _nb_inst_decod = nb_inst_decod ; |
---|
44 | // _nb_ooo_engine = nb_ooo_engine ; |
---|
45 | // _nb_inst_update = nb_inst_update ; |
---|
46 | _nb_inst_branch_predict = nb_inst_branch_predict; |
---|
47 | _nb_inst_branch_decod = nb_inst_branch_decod ; |
---|
48 | _nb_inst_branch_update = nb_inst_branch_update ; |
---|
49 | |
---|
50 | test(); |
---|
51 | |
---|
52 | if (is_toplevel) |
---|
53 | { |
---|
54 | _size_instruction_address = size_address; |
---|
55 | _size_context_id = log2(_nb_context); |
---|
56 | _size_depth = max<uint32_t>(size_depth,_nb_context); |
---|
57 | _size_inst_ifetch_ptr = log2(max<uint32_t>(_nb_instruction,_nb_context)); |
---|
58 | |
---|
59 | _have_port_context_id = (_size_context_id > 0); |
---|
60 | _have_port_depth = (_size_depth > 0); |
---|
61 | _have_port_inst_ifetch_ptr = (_size_inst_ifetch_ptr > 0); |
---|
62 | |
---|
63 | copy (); |
---|
64 | } |
---|
65 | |
---|
66 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
67 | }; |
---|
68 | |
---|
69 | // #undef FUNCTION |
---|
70 | // #define FUNCTION "Prediction_unit_Glue::Parameters (copy)" |
---|
71 | // Parameters::Parameters (Parameters & param) |
---|
72 | // { |
---|
73 | // log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
74 | // test(); |
---|
75 | // log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
76 | // }; |
---|
77 | |
---|
78 | #undef FUNCTION |
---|
79 | #define FUNCTION "Prediction_unit_Glue::~Parameters" |
---|
80 | Parameters::~Parameters () |
---|
81 | { |
---|
82 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
83 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
84 | }; |
---|
85 | |
---|
86 | #undef FUNCTION |
---|
87 | #define FUNCTION "Prediction_unit_Glue::copy" |
---|
88 | void Parameters::copy (void) |
---|
89 | { |
---|
90 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
91 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
92 | }; |
---|
93 | |
---|
94 | }; // end namespace prediction_unit_glue |
---|
95 | }; // end namespace prediction_unit |
---|
96 | }; // end namespace front_end |
---|
97 | }; // end namespace multi_front_end |
---|
98 | }; // end namespace core |
---|
99 | |
---|
100 | }; // end namespace behavioural |
---|
101 | }; // end namespace morpheo |
---|