1 | /* |
---|
2 | * $Id: Parameters.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_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_execute_unit { |
---|
16 | namespace execute_unit { |
---|
17 | namespace load_store_unit { |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Load_store_unit::Parameters" |
---|
22 | Parameters::Parameters (uint32_t size_store_queue , |
---|
23 | uint32_t size_load_queue , |
---|
24 | uint32_t size_speculative_access_queue, |
---|
25 | uint32_t nb_port_check , |
---|
26 | Tspeculative_load_t speculative_load , |
---|
27 | uint32_t nb_bypass_memory , |
---|
28 | uint32_t nb_context , |
---|
29 | uint32_t nb_front_end , |
---|
30 | uint32_t nb_ooo_engine , |
---|
31 | uint32_t nb_packet , |
---|
32 | uint32_t size_general_data , |
---|
33 | uint32_t size_special_data , |
---|
34 | uint32_t nb_general_register , |
---|
35 | uint32_t nb_special_register ): |
---|
36 | _size_store_queue (size_store_queue ), |
---|
37 | _size_load_queue (size_load_queue ), |
---|
38 | _size_speculative_access_queue (size_speculative_access_queue), |
---|
39 | _nb_port_check (nb_port_check ), |
---|
40 | _speculative_load (speculative_load ), |
---|
41 | _nb_bypass_memory (nb_bypass_memory ), |
---|
42 | _nb_context (nb_context ), |
---|
43 | _nb_front_end (nb_front_end ), |
---|
44 | _nb_ooo_engine (nb_ooo_engine ), |
---|
45 | _nb_packet (nb_packet ), |
---|
46 | _size_general_data (size_general_data ), |
---|
47 | _size_special_data (size_special_data ), |
---|
48 | _nb_general_register (nb_general_register ), |
---|
49 | _nb_special_register (nb_special_register ), |
---|
50 | |
---|
51 | _size_address_store_queue (log2(size_store_queue )), |
---|
52 | _size_address_load_queue (log2(size_load_queue )), |
---|
53 | _size_address_speculative_access_queue (log2(size_speculative_access_queue)), |
---|
54 | |
---|
55 | _size_context_id (log2(nb_context )), |
---|
56 | _size_front_end_id (log2(nb_front_end )), |
---|
57 | _size_ooo_engine_id (log2(nb_ooo_engine )), |
---|
58 | _size_packet_id (log2(nb_packet )), |
---|
59 | _size_general_register (log2(nb_general_register)), |
---|
60 | _size_special_register (log2(nb_special_register)), |
---|
61 | _size_dcache_context_id (_size_context_id + _size_front_end_id + _size_ooo_engine_id), |
---|
62 | _size_dcache_packet_id ((log2((size_store_queue>size_load_queue)?size_store_queue:size_load_queue))+1), |
---|
63 | |
---|
64 | _have_port_context_id (_size_context_id >0), |
---|
65 | _have_port_front_end_id (_size_front_end_id >0), |
---|
66 | _have_port_ooo_engine_id (_size_ooo_engine_id>0), |
---|
67 | _have_port_packet_id (_size_packet_id >0), |
---|
68 | _have_port_dcache_context_id (_size_dcache_context_id>0), |
---|
69 | _have_port_load_queue_ptr (_size_load_queue>1), |
---|
70 | |
---|
71 | _mask_address_lsb (gen_mask<Tdcache_address_t>(log2(size_general_data/8))), |
---|
72 | _mask_address_msb (gen_mask<Tdcache_address_t>(size_general_data) << log2(size_general_data/8)) |
---|
73 | { |
---|
74 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
75 | test(); |
---|
76 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
77 | }; |
---|
78 | |
---|
79 | #undef FUNCTION |
---|
80 | #define FUNCTION "Load_store_unit::Parameters (copy)" |
---|
81 | Parameters::Parameters (Parameters & param): |
---|
82 | _size_store_queue (param._size_store_queue ), |
---|
83 | _size_load_queue (param._size_load_queue ), |
---|
84 | _size_speculative_access_queue (param._size_speculative_access_queue), |
---|
85 | _nb_port_check (param._nb_port_check ), |
---|
86 | _speculative_load (param._speculative_load ), |
---|
87 | _nb_bypass_memory (param._nb_bypass_memory ), |
---|
88 | _nb_context (param._nb_context ), |
---|
89 | _nb_front_end (param._nb_front_end ), |
---|
90 | _nb_ooo_engine (param._nb_ooo_engine ), |
---|
91 | _nb_packet (param._nb_packet ), |
---|
92 | _size_general_data (param._size_general_data ), |
---|
93 | _size_special_data (param._size_special_data ), |
---|
94 | _nb_general_register (param._nb_general_register ), |
---|
95 | _nb_special_register (param._nb_special_register ), |
---|
96 | |
---|
97 | _size_address_store_queue (param._size_address_store_queue ), |
---|
98 | _size_address_load_queue (param._size_address_load_queue ), |
---|
99 | _size_address_speculative_access_queue (param._size_address_speculative_access_queue), |
---|
100 | |
---|
101 | _size_context_id (param._size_context_id ), |
---|
102 | _size_front_end_id (param._size_front_end_id ), |
---|
103 | _size_ooo_engine_id (param._size_ooo_engine_id ), |
---|
104 | _size_packet_id (param._size_packet_id ), |
---|
105 | _size_general_register (param._size_general_register ), |
---|
106 | _size_special_register (param._size_special_register ), |
---|
107 | _size_dcache_context_id (param._size_dcache_context_id ), |
---|
108 | _size_dcache_packet_id (param._size_dcache_packet_id ), |
---|
109 | |
---|
110 | _have_port_context_id (param._have_port_context_id ), |
---|
111 | _have_port_front_end_id (param._have_port_front_end_id ), |
---|
112 | _have_port_ooo_engine_id (param._have_port_ooo_engine_id), |
---|
113 | _have_port_packet_id (param._have_port_packet_id ), |
---|
114 | _have_port_dcache_context_id(param._have_port_dcache_context_id), |
---|
115 | _have_port_load_queue_ptr(param._have_port_load_queue_ptr), |
---|
116 | |
---|
117 | _mask_address_lsb (param._mask_address_lsb), |
---|
118 | _mask_address_msb (param._mask_address_msb) |
---|
119 | { |
---|
120 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
121 | test(); |
---|
122 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
123 | }; |
---|
124 | |
---|
125 | #undef FUNCTION |
---|
126 | #define FUNCTION "Load_store_unit::~Parameters" |
---|
127 | Parameters::~Parameters () |
---|
128 | { |
---|
129 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
130 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
131 | }; |
---|
132 | |
---|
133 | }; // end namespace load_store_unit |
---|
134 | }; // end namespace execute_unit |
---|
135 | }; // end namespace multi_execute_unit |
---|
136 | }; // end namespace execute_loop |
---|
137 | }; // end namespace multi_execute_loop |
---|
138 | }; // end namespace core |
---|
139 | |
---|
140 | }; // end namespace behavioural |
---|
141 | }; // end namespace morpheo |
---|