1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Register_translation_unit_Glue_genMealy_retire.cpp 123 2009-06-08 20:43:30Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Register_translation_unit_Glue.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace rename_unit { |
---|
17 | namespace register_translation_unit { |
---|
18 | namespace register_translation_unit_glue { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Register_translation_unit_Glue::genMealy_retire" |
---|
23 | void Register_translation_unit_Glue::genMealy_retire (void) |
---|
24 | { |
---|
25 | log_begin(Register_translation_unit_Glue,FUNCTION); |
---|
26 | log_function(Register_translation_unit_Glue,FUNCTION,_name.c_str()); |
---|
27 | |
---|
28 | if (PORT_READ(in_NRESET)) |
---|
29 | { |
---|
30 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
31 | { |
---|
32 | Tcontrol_t val = PORT_READ(in_RETIRE_VAL [i]); |
---|
33 | Tcontrol_t rat_ack = PORT_READ(in_RETIRE_RAT_ACK [i]); |
---|
34 | Tcontrol_t stat_list_ack = PORT_READ(in_RETIRE_STAT_LIST_ACK [i]); |
---|
35 | |
---|
36 | Tcontrol_t ack = (true |
---|
37 | // and val |
---|
38 | and rat_ack |
---|
39 | and stat_list_ack |
---|
40 | ); |
---|
41 | Tcontrol_t rat_val = (true |
---|
42 | and val |
---|
43 | // and rat_ack |
---|
44 | and stat_list_ack |
---|
45 | ); |
---|
46 | Tcontrol_t stat_list_val = (true |
---|
47 | and val |
---|
48 | and rat_ack |
---|
49 | // and stat_list_ack |
---|
50 | ); |
---|
51 | |
---|
52 | PORT_WRITE(out_RETIRE_ACK [i], ack ); |
---|
53 | PORT_WRITE(out_RETIRE_RAT_VAL [i], rat_val ); |
---|
54 | PORT_WRITE(out_RETIRE_STAT_LIST_VAL [i], stat_list_val); |
---|
55 | |
---|
56 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * inst_insert [%d]",i); |
---|
57 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * val (r): %d",val ); |
---|
58 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * ack (w): %d",ack ); |
---|
59 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_val (w): %d",rat_val ); |
---|
60 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_ack (r): %d",rat_ack ); |
---|
61 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * stat_list_val (w): %d",stat_list_val ); |
---|
62 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * stat_list_ack (r): %d",stat_list_ack ); |
---|
63 | } |
---|
64 | } |
---|
65 | else |
---|
66 | { |
---|
67 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
68 | { |
---|
69 | PORT_WRITE(out_RETIRE_ACK [i], 0); |
---|
70 | PORT_WRITE(out_RETIRE_RAT_VAL [i], 0); |
---|
71 | PORT_WRITE(out_RETIRE_STAT_LIST_VAL [i], 0); |
---|
72 | } |
---|
73 | } |
---|
74 | |
---|
75 | log_end(Register_translation_unit_Glue,FUNCTION); |
---|
76 | }; |
---|
77 | |
---|
78 | }; // end namespace register_translation_unit_glue |
---|
79 | }; // end namespace register_translation_unit |
---|
80 | }; // end namespace rename_unit |
---|
81 | }; // end namespace ooo_engine |
---|
82 | }; // end namespace multi_ooo_engine |
---|
83 | }; // end namespace core |
---|
84 | |
---|
85 | }; // end namespace behavioural |
---|
86 | }; // end namespace morpheo |
---|
87 | #endif |
---|