1 | #ifdef SYSTEMC |
---|
2 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
3 | /* |
---|
4 | * $Id$ |
---|
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_genMoore" |
---|
24 | void Load_store_unit::function_speculative_load_commit_genMoore (void) |
---|
25 | { |
---|
26 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
27 | |
---|
28 | // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
29 | |
---|
30 | // Test store and load queue |
---|
31 | Tcontext_t memory_out_context_id = 0; |
---|
32 | Tpacket_t memory_out_packet_id = 0; |
---|
33 | #ifdef HAVE_MEMORY_OUT_OPERATION |
---|
34 | Toperation_t memory_out_operation = 0; |
---|
35 | #endif |
---|
36 | #ifdef HAVE_MEMORY_OUT_TYPE |
---|
37 | Ttype_t memory_out_type = 0; |
---|
38 | #endif |
---|
39 | Tcontrol_t memory_out_write_rd = 0; |
---|
40 | Tgeneral_address_t memory_out_num_reg_rd = 0; |
---|
41 | Tgeneral_data_t memory_out_data_rd = 0; |
---|
42 | // Tcontrol_t memory_out_write_re = 0; |
---|
43 | // Tspecial_address_t memory_out_num_reg_re = 0; |
---|
44 | // Tspecial_data_t memory_out_data_re = 0; |
---|
45 | Texception_t memory_out_exception = 0; |
---|
46 | |
---|
47 | internal_MEMORY_OUT_VAL = 0; |
---|
48 | |
---|
49 | // TODO : now only store queue |
---|
50 | |
---|
51 | // Test an store must be commited. |
---|
52 | |
---|
53 | |
---|
54 | if (_store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state == STORE_QUEUE_COMMIT) |
---|
55 | { |
---|
56 | internal_MEMORY_OUT_VAL = 1; |
---|
57 | internal_MEMORY_OUT_SELECT_QUEUE = SELECT_STORE_QUEUE; |
---|
58 | |
---|
59 | memory_out_context_id= _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._context_id; |
---|
60 | memory_out_packet_id = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._packet_id ; |
---|
61 | #ifdef HAVE_MEMORY_OUT_OPERATION |
---|
62 | memory_out_operation = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._operation; |
---|
63 | #endif |
---|
64 | #ifdef HAVE_MEMORY_OUT_TYPE |
---|
65 | memory_out_type = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._type; |
---|
66 | #endif |
---|
67 | // memory_out_write_rd |
---|
68 | // memory_out_num_reg_rd |
---|
69 | // memory_out_data_rd |
---|
70 | memory_out_exception = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._exception; |
---|
71 | } |
---|
72 | |
---|
73 | PORT_WRITE(out_MEMORY_OUT_VAL , internal_MEMORY_OUT_VAL); |
---|
74 | |
---|
75 | PORT_WRITE(out_MEMORY_OUT_CONTEXT_ID, memory_out_context_id); |
---|
76 | PORT_WRITE(out_MEMORY_OUT_PACKET_ID , memory_out_packet_id ); |
---|
77 | #ifdef HAVE_MEMORY_OUT_OPERATION |
---|
78 | PORT_WRITE(out_MEMORY_OUT_OPERATION , memory_out_operation ); |
---|
79 | #endif |
---|
80 | #ifdef HAVE_MEMORY_OUT_TYPE |
---|
81 | PORT_WRITE(out_MEMORY_OUT_TYPE , memory_out_type ); |
---|
82 | #endif |
---|
83 | PORT_WRITE(out_MEMORY_OUT_WRITE_RD , memory_out_write_rd ); |
---|
84 | PORT_WRITE(out_MEMORY_OUT_NUM_REG_RD, memory_out_num_reg_rd); |
---|
85 | PORT_WRITE(out_MEMORY_OUT_DATA_RD , memory_out_data_rd ); |
---|
86 | // PORT_WRITE(out_MEMORY_OUT_WRITE_RE , memory_out_write_re ); |
---|
87 | // PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE, memory_out_num_reg_re); |
---|
88 | // PORT_WRITE(out_MEMORY_OUT_DATA_RE , memory_out_data_re ); |
---|
89 | PORT_WRITE(out_MEMORY_OUT_EXCEPTION , memory_out_exception ); |
---|
90 | |
---|
91 | |
---|
92 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
93 | }; |
---|
94 | |
---|
95 | }; // end namespace load_store_unit |
---|
96 | }; // end namespace execute_unit |
---|
97 | }; // end namespace multi_execute_unit |
---|
98 | }; // end namespace execute_loop |
---|
99 | }; // end namespace multi_execute_loop |
---|
100 | }; // end namespace core |
---|
101 | |
---|
102 | }; // end namespace behavioural |
---|
103 | }; // end namespace morpheo |
---|
104 | #endif |
---|
105 | //#endif |
---|