1 | #ifdef SYSTEMC |
---|
2 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
3 | /* |
---|
4 | * $Id: Load_store_unit_function_speculative_load_commit_genMealy_insert.cpp 101 2009-01-15 17:19:08Z rosiere $ |
---|
5 | * |
---|
6 | * [ Description ] |
---|
7 | * |
---|
8 | */ |
---|
9 | |
---|
10 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_execute_loop { |
---|
16 | namespace execute_loop { |
---|
17 | namespace multi_execute_unit { |
---|
18 | namespace execute_unit { |
---|
19 | namespace load_store_unit { |
---|
20 | |
---|
21 | |
---|
22 | #undef FUNCTION |
---|
23 | #define FUNCTION "Load_store_unit::function_speculative_load_commit_genMealy_insert" |
---|
24 | void Load_store_unit::function_speculative_load_commit_genMealy_insert (void) |
---|
25 | { |
---|
26 | log_begin(Load_store_unit,FUNCTION); |
---|
27 | log_function(Load_store_unit,FUNCTION,_name.c_str()); |
---|
28 | |
---|
29 | // ~~~~~[ Output "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
30 | |
---|
31 | // Initialisation |
---|
32 | internal_MEMORY_IN_PORT = 0; |
---|
33 | Tcontrol_t ack [_param->_nb_inst_memory]; |
---|
34 | for (uint32_t i=0; i<_param->_nb_inst_memory; i++) |
---|
35 | ack [i] = 0; |
---|
36 | |
---|
37 | // find first valid entry |
---|
38 | // store queue is never full (pointer is manage by rename stage) |
---|
39 | for (uint32_t i=0; i<_param->_nb_inst_memory; i++) |
---|
40 | if (PORT_READ(in_MEMORY_IN_VAL [i])) |
---|
41 | { |
---|
42 | internal_MEMORY_IN_ACK = is_operation_memory_store(PORT_READ(in_MEMORY_IN_OPERATION [i])) or not _speculative_access_queue_control->full(); |
---|
43 | |
---|
44 | if (internal_MEMORY_IN_ACK) |
---|
45 | { |
---|
46 | ack [i] = 1; |
---|
47 | internal_MEMORY_IN_PORT = i; |
---|
48 | break; // end |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | for (uint32_t i=0; i<_param->_nb_inst_memory; i++) |
---|
53 | PORT_WRITE(out_MEMORY_IN_ACK [i], ack [i]); |
---|
54 | |
---|
55 | log_end(Load_store_unit,FUNCTION); |
---|
56 | }; |
---|
57 | |
---|
58 | }; // end namespace load_store_unit |
---|
59 | }; // end namespace execute_unit |
---|
60 | }; // end namespace multi_execute_unit |
---|
61 | }; // end namespace execute_loop |
---|
62 | }; // end namespace multi_execute_loop |
---|
63 | }; // end namespace core |
---|
64 | |
---|
65 | }; // end namespace behavioural |
---|
66 | }; // end namespace morpheo |
---|
67 | #endif |
---|
68 | //#endif |
---|