1 | #ifndef morpheo_behavioural_core_multi_execute_loop_execute_loop_multi_read_unit_read_unit_read_queue_Types_h |
---|
2 | #define morpheo_behavioural_core_multi_execute_loop_execute_loop_multi_read_unit_read_unit_read_queue_Types_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id: Types.h 136 2009-10-20 18:52:15Z 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_execute_loop { |
---|
17 | namespace execute_loop { |
---|
18 | namespace multi_read_unit { |
---|
19 | namespace read_unit { |
---|
20 | namespace read_queue { |
---|
21 | |
---|
22 | class Tread_queue_entry_t |
---|
23 | { |
---|
24 | public : Tcontext_t _context_id ; |
---|
25 | public : Tcontext_t _front_end_id ; |
---|
26 | public : Tcontext_t _ooo_engine_id; |
---|
27 | public : Tpacket_t _rob_id ; |
---|
28 | public : Toperation_t _operation ; |
---|
29 | public : Ttype_t _type ; |
---|
30 | public : Tcontrol_t _cancel ; |
---|
31 | public : Tlsq_ptr_t _store_queue_ptr_write; |
---|
32 | public : Tlsq_ptr_t _store_queue_ptr_read ; |
---|
33 | public : Tcontrol_t _store_queue_empty ; |
---|
34 | public : Tlsq_ptr_t _load_queue_ptr_write; |
---|
35 | public : Tcontrol_t _has_immediat ; |
---|
36 | public : Tgeneral_data_t _immediat ; |
---|
37 | public : Tcontrol_t _read_ra ; |
---|
38 | public : Tgeneral_address_t _num_reg_ra ; |
---|
39 | public : Tcontrol_t _read_rb ; |
---|
40 | public : Tgeneral_address_t _num_reg_rb ; |
---|
41 | public : Tcontrol_t _read_rc ; |
---|
42 | public : Tspecial_address_t _num_reg_rc ; |
---|
43 | public : Tcontrol_t _write_rd ; |
---|
44 | public : Tgeneral_address_t _num_reg_rd ; |
---|
45 | public : Tcontrol_t _write_re ; |
---|
46 | public : Tspecial_address_t _num_reg_re ; |
---|
47 | |
---|
48 | friend std::ostream& operator<< (std::ostream& output_stream, |
---|
49 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x) |
---|
50 | { |
---|
51 | output_stream << " * _context_id : " << toString(x._context_id ) << std::endl |
---|
52 | << " * _front_end_id : " << toString(x._front_end_id ) << std::endl |
---|
53 | << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl |
---|
54 | << " * _rob_id : " << toString(x._rob_id ) << std::endl |
---|
55 | << " * _operation : " << toString(x._operation ) << std::endl |
---|
56 | << " * _type : " << toString(x._type ) << std::endl |
---|
57 | << " * _cancel : " << toString(x._cancel ) << std::endl |
---|
58 | << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl |
---|
59 | << " * _store_queue_ptr_read : " << toString(x._store_queue_ptr_read ) << std::endl |
---|
60 | << " * _store_queue_empty : " << toString(x._store_queue_empty ) << std::endl |
---|
61 | << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl |
---|
62 | << " * _has_immediat : " << toString(x._has_immediat ) << std::endl |
---|
63 | << " * _immediat : " << toString(x._immediat ) << std::endl |
---|
64 | << " * _read_ra : " << toString(x._read_ra ) << std::endl |
---|
65 | << " * _num_reg_ra : " << toString(x._num_reg_ra ) << std::endl |
---|
66 | << " * _read_rb : " << toString(x._read_rb ) << std::endl |
---|
67 | << " * _num_reg_rb : " << toString(x._num_reg_rb ) << std::endl |
---|
68 | << " * _read_rc : " << toString(x._read_rc ) << std::endl |
---|
69 | << " * _num_reg_rc : " << toString(x._num_reg_rc ) << std::endl |
---|
70 | << " * _write_rd : " << toString(x._write_rd ) << std::endl |
---|
71 | << " * _num_reg_rd : " << toString(x._num_reg_rd ) << std::endl |
---|
72 | << " * _write_re : " << toString(x._write_re ) << std::endl |
---|
73 | << " * _num_reg_re : " << toString(x._num_reg_re ) << std::endl; |
---|
74 | |
---|
75 | return output_stream; |
---|
76 | } |
---|
77 | |
---|
78 | }; |
---|
79 | |
---|
80 | class Tread_queue_head_entry_t |
---|
81 | { |
---|
82 | public : Tcontext_t _context_id ; |
---|
83 | public : Tcontext_t _front_end_id ; |
---|
84 | public : Tcontext_t _ooo_engine_id; |
---|
85 | public : Tpacket_t _rob_id ; |
---|
86 | public : Toperation_t _operation ; |
---|
87 | public : Ttype_t _type ; |
---|
88 | public : Tcontrol_t _cancel ; |
---|
89 | public : Tlsq_ptr_t _store_queue_ptr_write; |
---|
90 | public : Tlsq_ptr_t _store_queue_ptr_read ; |
---|
91 | public : Tcontrol_t _store_queue_empty ; |
---|
92 | public : Tlsq_ptr_t _load_queue_ptr_write; |
---|
93 | public : Tcontrol_t _has_immediat ; |
---|
94 | public : Tgeneral_data_t _immediat ; |
---|
95 | public : Tcontrol_t _read_ra ; |
---|
96 | public : Tcontrol_t _read_ra_val ; // 1 : must access at the registerFile (after access, is set at 0) |
---|
97 | public : Tgeneral_address_t _num_reg_ra ; |
---|
98 | public : Tcontrol_t _data_ra_val ; // 1 : the read of registerFile is valid |
---|
99 | public : Tgeneral_data_t _data_ra ; |
---|
100 | public : Tcontrol_t _read_rb ; |
---|
101 | public : Tcontrol_t _read_rb_val ; |
---|
102 | public : Tgeneral_address_t _num_reg_rb ; |
---|
103 | public : Tcontrol_t _data_rb_val ; |
---|
104 | public : Tgeneral_data_t _data_rb ; |
---|
105 | public : Tcontrol_t _read_rc ; |
---|
106 | public : Tcontrol_t _read_rc_val ; |
---|
107 | public : Tspecial_address_t _num_reg_rc ; |
---|
108 | public : Tcontrol_t _data_rc_val ; |
---|
109 | public : Tspecial_data_t _data_rc ; |
---|
110 | public : Tcontrol_t _write_rd ; |
---|
111 | public : Tgeneral_address_t _num_reg_rd ; |
---|
112 | public : Tcontrol_t _write_re ; |
---|
113 | public : Tspecial_address_t _num_reg_re ; |
---|
114 | |
---|
115 | #undef FUNCTION |
---|
116 | #define FUNCTION "Tread_queue_head_entry_t::operator=" |
---|
117 | public : Tread_queue_head_entry_t& operator=(Tread_queue_entry_t x) |
---|
118 | { |
---|
119 | log_printf(FUNC,Read_queue,FUNCTION,"Begin"); |
---|
120 | |
---|
121 | _context_id = x._context_id ; |
---|
122 | _front_end_id = x._front_end_id ; |
---|
123 | _ooo_engine_id = x._ooo_engine_id; |
---|
124 | _rob_id = x._rob_id ; |
---|
125 | _operation = x._operation ; |
---|
126 | _type = x._type ; |
---|
127 | _cancel = x._cancel ; |
---|
128 | _store_queue_ptr_write = x._store_queue_ptr_write; |
---|
129 | _store_queue_ptr_read = x._store_queue_ptr_read ; |
---|
130 | _store_queue_empty = x._store_queue_empty ; |
---|
131 | _load_queue_ptr_write = x._load_queue_ptr_write ; |
---|
132 | _has_immediat = x._has_immediat ; |
---|
133 | _immediat = x._immediat ; |
---|
134 | _read_ra = x._read_ra ; |
---|
135 | _read_ra_val = ((x._read_ra == 1) and (x._num_reg_ra != 0)); //if not must read, the registerFile is already access |
---|
136 | _num_reg_ra = x._num_reg_ra ; |
---|
137 | // _data_ra_val = ((x._read_ra == 0) or (x._num_reg_ra == 0)); //if not must read, the data is already valid |
---|
138 | _data_ra_val = not _read_ra_val; |
---|
139 | _data_ra = 0 ; |
---|
140 | _read_rb = x._read_rb ; |
---|
141 | _read_rb_val = ((x._read_rb == 1) and (x._num_reg_rb != 0)); |
---|
142 | _num_reg_rb = x._num_reg_rb ; |
---|
143 | // _data_rb_val = ((x._read_rb == 0) or (x._num_reg_rb == 0)); |
---|
144 | _data_rb_val = not _read_rb_val; |
---|
145 | _data_rb = 0 ; |
---|
146 | _read_rc = x._read_rc ; |
---|
147 | _read_rc_val = x._read_rc == 1 ; |
---|
148 | _num_reg_rc = x._num_reg_rc ; |
---|
149 | _data_rc_val = x._read_rc == 0 ; |
---|
150 | _data_rc = 0 ; |
---|
151 | _write_rd = x._write_rd ; |
---|
152 | _num_reg_rd = x._num_reg_rd ; |
---|
153 | _write_re = x._write_re ; |
---|
154 | _num_reg_re = x._num_reg_re ; |
---|
155 | |
---|
156 | log_printf(FUNC,Read_queue,FUNCTION,"End"); |
---|
157 | |
---|
158 | return *this; |
---|
159 | } |
---|
160 | |
---|
161 | friend std::ostream& operator<< (std::ostream& output_stream, |
---|
162 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x) |
---|
163 | { |
---|
164 | output_stream << " * _context_id : " << x._context_id << std::endl |
---|
165 | << " * _front_end_id : " << x._front_end_id << std::endl |
---|
166 | << " * _ooo_engine_id : " << x._ooo_engine_id<< std::endl |
---|
167 | << " * _rob_id : " << x._rob_id << std::endl |
---|
168 | << " * _operation : " << x._operation << std::endl |
---|
169 | << " * _type : " << x._type << std::endl |
---|
170 | << " * _cancel : " << x._cancel << std::endl |
---|
171 | << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl |
---|
172 | << " * _store_queue_ptr_read : " << toString(x._store_queue_ptr_read ) << std::endl |
---|
173 | << " * _store_queue_empty : " << toString(x._store_queue_empty ) << std::endl |
---|
174 | << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl |
---|
175 | << " * _has_immediat : " << x._has_immediat << std::endl |
---|
176 | << " * _immediat : " << x._immediat << std::endl |
---|
177 | << " * _read_ra : " << x._read_ra << std::endl |
---|
178 | << " * _read_ra_val : " << x._read_ra_val << std::endl |
---|
179 | << " * _num_reg_ra : " << x._num_reg_ra << std::endl |
---|
180 | << " * _data_ra_val : " << x._data_ra_val << std::endl |
---|
181 | << " * _data_ra : " << x._data_ra << std::endl |
---|
182 | << " * _read_rb : " << x._read_rb << std::endl |
---|
183 | << " * _read_rb_val : " << x._read_rb_val << std::endl |
---|
184 | << " * _num_reg_rb : " << x._num_reg_rb << std::endl |
---|
185 | << " * _data_rb_val : " << x._data_rb_val << std::endl |
---|
186 | << " * _data_rb : " << x._data_rb << std::endl |
---|
187 | << " * _read_rc : " << x._read_rc << std::endl |
---|
188 | << " * _read_rc_val : " << x._read_rc_val << std::endl |
---|
189 | << " * _num_reg_rc : " << x._num_reg_rc << std::endl |
---|
190 | << " * _data_rc_val : " << x._data_rc_val << std::endl |
---|
191 | << " * _data_rc : " << x._data_rc << std::endl |
---|
192 | << " * _write_rd : " << x._write_rd << std::endl |
---|
193 | << " * _num_reg_rd : " << x._num_reg_rd << std::endl |
---|
194 | << " * _write_re : " << x._write_re << std::endl |
---|
195 | << " * _num_reg_re : " << x._num_reg_re << std::endl; |
---|
196 | |
---|
197 | return output_stream; |
---|
198 | } |
---|
199 | }; |
---|
200 | |
---|
201 | }; // end namespace read_queue |
---|
202 | }; // end namespace read_unit |
---|
203 | }; // end namespace multi_read_unit |
---|
204 | }; // end namespace execute_loop |
---|
205 | }; // end namespace multi_execute_loop |
---|
206 | }; // end namespace core |
---|
207 | |
---|
208 | }; // end namespace behavioural |
---|
209 | }; // end namespace morpheo |
---|
210 | |
---|
211 | #endif |
---|