1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Register_translation_unit_Glue_genMealy_insert_valack.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_insert_valack" |
---|
23 | void Register_translation_unit_Glue::genMealy_insert_valack (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_insert; i++) |
---|
31 | { |
---|
32 | Tcontrol_t rename_val = PORT_READ(in_INSERT_RENAME_VAL [i]); |
---|
33 | Tcontrol_t insert_ack = PORT_READ(in_INSERT_INSERT_ACK [i]); |
---|
34 | Tcontrol_t rat_rename_ack = PORT_READ(in_INSERT_RAT_RENAME_ACK [i]); |
---|
35 | Tcontrol_t rat_insert_ack = PORT_READ(in_INSERT_RAT_INSERT_ACK [i]); |
---|
36 | Tcontrol_t free_list_ack = PORT_READ(in_INSERT_FREE_LIST_ACK [i]); |
---|
37 | Tcontrol_t stat_list_ack = PORT_READ(in_INSERT_STAT_LIST_ACK [i]); |
---|
38 | |
---|
39 | Tcontrol_t rename_ack = (insert_ack and |
---|
40 | rat_rename_ack and |
---|
41 | rat_insert_ack and |
---|
42 | free_list_ack and |
---|
43 | stat_list_ack ); |
---|
44 | Tcontrol_t insert_val = (rename_val and |
---|
45 | rat_rename_ack and |
---|
46 | rat_insert_ack and |
---|
47 | free_list_ack and |
---|
48 | stat_list_ack ); |
---|
49 | Tcontrol_t rat_insert_val = (rename_val and |
---|
50 | insert_ack and |
---|
51 | rat_rename_ack and |
---|
52 | free_list_ack and |
---|
53 | stat_list_ack ); |
---|
54 | Tcontrol_t free_list_val = (rename_val and |
---|
55 | insert_ack and |
---|
56 | rat_rename_ack and |
---|
57 | rat_insert_ack and |
---|
58 | stat_list_ack ); |
---|
59 | Tcontrol_t stat_list_val = (rename_val and |
---|
60 | insert_ack and |
---|
61 | rat_rename_ack and |
---|
62 | rat_insert_ack and |
---|
63 | free_list_ack ); |
---|
64 | |
---|
65 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * inst_insert [%d]",i); |
---|
66 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rename_val (r): %d",rename_val ); |
---|
67 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rename_ack (w): %d",rename_ack ); |
---|
68 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * insert_val (w): %d",insert_val ); |
---|
69 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * insert_ack (r): %d",insert_ack ); |
---|
70 | // log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_rename_val (w): %d",rat_rename_val); |
---|
71 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_rename_val -> rename_val"); |
---|
72 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_rename_ack (r): %d",rat_rename_ack); |
---|
73 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_insert_val (w): %d",rat_insert_val); |
---|
74 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * rat_insert_ack (r): %d",rat_insert_ack); |
---|
75 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * free_list_val (w): %d",free_list_val ); |
---|
76 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * free_list_ack (r): %d",free_list_ack ); |
---|
77 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * stat_list_val (w): %d",stat_list_val ); |
---|
78 | log_printf(TRACE,Register_translation_unit_Glue,FUNCTION," * stat_list_ack (r): %d",stat_list_ack ); |
---|
79 | |
---|
80 | #ifdef STATISTICS |
---|
81 | internal_INSERT_RENAME_ACK [i] = rename_ack; |
---|
82 | #endif |
---|
83 | |
---|
84 | PORT_WRITE(out_INSERT_RENAME_ACK [i], rename_ack ); |
---|
85 | PORT_WRITE(out_INSERT_INSERT_VAL [i], insert_val ); |
---|
86 | PORT_WRITE(out_INSERT_RAT_INSERT_VAL [i], rat_insert_val); |
---|
87 | PORT_WRITE(out_INSERT_FREE_LIST_VAL [i], free_list_val ); |
---|
88 | PORT_WRITE(out_INSERT_STAT_LIST_VAL [i], stat_list_val ); |
---|
89 | |
---|
90 | } |
---|
91 | } |
---|
92 | else |
---|
93 | { |
---|
94 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
95 | { |
---|
96 | #ifdef STATISTICS |
---|
97 | internal_INSERT_RENAME_ACK [i] = 0; |
---|
98 | #endif |
---|
99 | |
---|
100 | PORT_WRITE(out_INSERT_RENAME_ACK [i], 0); |
---|
101 | PORT_WRITE(out_INSERT_INSERT_VAL [i], 0); |
---|
102 | PORT_WRITE(out_INSERT_RAT_INSERT_VAL [i], 0); |
---|
103 | PORT_WRITE(out_INSERT_FREE_LIST_VAL [i], 0); |
---|
104 | PORT_WRITE(out_INSERT_STAT_LIST_VAL [i], 0); |
---|
105 | } |
---|
106 | } |
---|
107 | |
---|
108 | log_end(Register_translation_unit_Glue,FUNCTION); |
---|
109 | }; |
---|
110 | |
---|
111 | }; // end namespace register_translation_unit_glue |
---|
112 | }; // end namespace register_translation_unit |
---|
113 | }; // end namespace rename_unit |
---|
114 | }; // end namespace ooo_engine |
---|
115 | }; // end namespace multi_ooo_engine |
---|
116 | }; // end namespace core |
---|
117 | |
---|
118 | }; // end namespace behavioural |
---|
119 | }; // end namespace morpheo |
---|
120 | #endif |
---|