1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Parameters.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_execute_loop { |
---|
14 | namespace execute_loop { |
---|
15 | namespace multi_write_unit { |
---|
16 | namespace write_unit { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Write_unit::Parameters" |
---|
21 | Parameters::Parameters (uint32_t size_write_queue , |
---|
22 | uint32_t size_execute_queue , |
---|
23 | uint32_t nb_context , |
---|
24 | uint32_t nb_front_end , |
---|
25 | uint32_t nb_ooo_engine , |
---|
26 | uint32_t nb_packet , |
---|
27 | uint32_t size_general_data , |
---|
28 | uint32_t nb_general_register, |
---|
29 | uint32_t size_special_data , |
---|
30 | uint32_t nb_special_register, |
---|
31 | uint32_t nb_operation , |
---|
32 | uint32_t nb_type , |
---|
33 | uint32_t nb_bypass_write ): |
---|
34 | _size_write_queue (size_write_queue ), |
---|
35 | _size_execute_queue (size_execute_queue ), |
---|
36 | _nb_context (nb_context ), |
---|
37 | _nb_front_end (nb_front_end ), |
---|
38 | _nb_ooo_engine (nb_ooo_engine ), |
---|
39 | _nb_packet (nb_packet ), |
---|
40 | _size_general_data (size_general_data ), |
---|
41 | _nb_general_register (nb_general_register), |
---|
42 | _size_special_data (size_special_data ), |
---|
43 | _nb_special_register (nb_special_register), |
---|
44 | _nb_operation (nb_operation ), |
---|
45 | _nb_type (nb_type ), |
---|
46 | _nb_bypass_write (nb_bypass_write ), |
---|
47 | |
---|
48 | _nb_gpr_write (1), |
---|
49 | _nb_spr_write (1), |
---|
50 | |
---|
51 | _size_context_id (log2(_nb_context )), |
---|
52 | _size_front_end_id (log2(_nb_front_end )), |
---|
53 | _size_ooo_engine_id (log2(_nb_ooo_engine )), |
---|
54 | _size_packet_id (log2(_nb_packet )), |
---|
55 | _size_general_register (log2(_nb_general_register)), |
---|
56 | _size_special_register (log2(_nb_special_register)), |
---|
57 | _size_operation (log2(_nb_operation )), |
---|
58 | _size_type (log2(_nb_type )), |
---|
59 | |
---|
60 | _have_component_execute_queue (_size_execute_queue > 0), |
---|
61 | _have_port_context_id (_size_context_id > 0), |
---|
62 | _have_port_front_end_id (_size_front_end_id > 0), |
---|
63 | _have_port_ooo_engine_id (_size_ooo_engine_id > 0), |
---|
64 | _have_port_packet_id (_size_packet_id > 0) |
---|
65 | { |
---|
66 | log_printf(FUNC,Write_unit,FUNCTION,"Begin"); |
---|
67 | |
---|
68 | _param_write_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue ::Parameters(size_write_queue , |
---|
69 | nb_context , |
---|
70 | nb_front_end , |
---|
71 | nb_ooo_engine , |
---|
72 | nb_packet , |
---|
73 | size_general_data , |
---|
74 | nb_general_register, |
---|
75 | size_special_data , |
---|
76 | nb_special_register, |
---|
77 | nb_operation , |
---|
78 | nb_type , |
---|
79 | nb_bypass_write ); |
---|
80 | |
---|
81 | if (_have_component_execute_queue) |
---|
82 | _param_execute_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters(size_execute_queue , |
---|
83 | nb_context , |
---|
84 | nb_front_end , |
---|
85 | nb_ooo_engine , |
---|
86 | nb_packet , |
---|
87 | size_general_data , |
---|
88 | size_special_data , |
---|
89 | nb_operation , |
---|
90 | nb_type ); |
---|
91 | |
---|
92 | test(); |
---|
93 | |
---|
94 | log_printf(FUNC,Write_unit,FUNCTION,"End"); |
---|
95 | }; |
---|
96 | |
---|
97 | #undef FUNCTION |
---|
98 | #define FUNCTION "Write_unit::Parameters (copy)" |
---|
99 | Parameters::Parameters (Parameters & param): |
---|
100 | _size_write_queue (param._size_write_queue ), |
---|
101 | _size_execute_queue (param._size_execute_queue ), |
---|
102 | _nb_context (param._nb_context ), |
---|
103 | _nb_front_end (param._nb_front_end ), |
---|
104 | _nb_ooo_engine (param._nb_ooo_engine ), |
---|
105 | _nb_packet (param._nb_packet ), |
---|
106 | _size_general_data (param._size_general_data ), |
---|
107 | _nb_general_register (param._nb_general_register ), |
---|
108 | _size_special_data (param._size_special_data ), |
---|
109 | _nb_special_register (param._nb_special_register ), |
---|
110 | _nb_operation (param._nb_operation ), |
---|
111 | _nb_type (param._nb_type ), |
---|
112 | _nb_bypass_write (param._nb_bypass_write ), |
---|
113 | |
---|
114 | _nb_gpr_write (param._nb_gpr_write ), |
---|
115 | _nb_spr_write (param._nb_spr_write ), |
---|
116 | |
---|
117 | _size_context_id (param._size_context_id ), |
---|
118 | _size_front_end_id (param._size_front_end_id ), |
---|
119 | _size_ooo_engine_id (param._size_ooo_engine_id ), |
---|
120 | _size_packet_id (param._size_packet_id ), |
---|
121 | _size_general_register (param._size_general_register ), |
---|
122 | _size_special_register (param._size_special_register ), |
---|
123 | _size_operation (param._size_operation ), |
---|
124 | _size_type (param._size_type ), |
---|
125 | |
---|
126 | _have_component_execute_queue (param._have_component_execute_queue), |
---|
127 | _have_port_context_id (param._have_port_context_id ), |
---|
128 | _have_port_front_end_id (param._have_port_front_end_id ), |
---|
129 | _have_port_ooo_engine_id (param._have_port_ooo_engine_id ), |
---|
130 | _have_port_packet_id (param._have_port_packet_id ) |
---|
131 | { |
---|
132 | log_printf(FUNC,Write_unit,FUNCTION,"Begin"); |
---|
133 | |
---|
134 | _param_write_queue = param._param_write_queue ; |
---|
135 | _param_execute_queue = param._param_execute_queue; |
---|
136 | |
---|
137 | test(); |
---|
138 | log_printf(FUNC,Write_unit,FUNCTION,"End"); |
---|
139 | }; |
---|
140 | |
---|
141 | #undef FUNCTION |
---|
142 | #define FUNCTION "Write_unit::~Parameters" |
---|
143 | Parameters::~Parameters () |
---|
144 | { |
---|
145 | log_printf(FUNC,Write_unit,FUNCTION,"Begin"); |
---|
146 | |
---|
147 | delete _param_write_queue; |
---|
148 | |
---|
149 | if (_have_component_execute_queue) |
---|
150 | delete _param_execute_queue; |
---|
151 | |
---|
152 | log_printf(FUNC,Write_unit,FUNCTION,"End"); |
---|
153 | }; |
---|
154 | |
---|
155 | }; // end namespace write_unit |
---|
156 | }; // end namespace multi_write_unit |
---|
157 | }; // end namespace execute_loop |
---|
158 | }; // end namespace multi_execute_loop |
---|
159 | }; // end namespace core |
---|
160 | |
---|
161 | }; // end namespace behavioural |
---|
162 | }; // end namespace morpheo |
---|