[88] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id: OOO_Engine_Glue_genMealy_insert_valack.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/OOO_Engine_Glue.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_ooo_engine { |
---|
| 15 | namespace ooo_engine { |
---|
| 16 | namespace ooo_engine_glue { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "OOO_Engine_Glue::genMealy_insert_valack" |
---|
| 21 | void OOO_Engine_Glue::genMealy_insert_valack (void) |
---|
| 22 | { |
---|
| 23 | log_begin(OOO_Engine_Glue,FUNCTION); |
---|
| 24 | log_function(OOO_Engine_Glue,FUNCTION,_name.c_str()); |
---|
| 25 | |
---|
| 26 | uint32_t x=0; |
---|
| 27 | for (uint32_t i=0; i<_param->_nb_rename_unit; ++i) |
---|
| 28 | { |
---|
| 29 | // Transaction must be in-order |
---|
| 30 | // Tcontrol_t previous_transaction = true; |
---|
| 31 | |
---|
| 32 | for (uint32_t j=0; j<_param->_nb_inst_insert[i]; ++j) |
---|
| 33 | { |
---|
| 34 | Tcontrol_t ack = PORT_READ(in_INSERT_ACK [x] ); |
---|
| 35 | Tcontrol_t rename_unit_val = PORT_READ(in_INSERT_RENAME_UNIT_VAL [i][j]); |
---|
| 36 | Tcontrol_t rename_unit_no_execute = PORT_READ(in_INSERT_RENAME_UNIT_NO_EXECUTE [i][j]); |
---|
| 37 | Tcontrol_t commit_unit_ack = PORT_READ(in_INSERT_COMMIT_UNIT_ACK [i][j]); |
---|
| 38 | Tcontrol_t issue_queue_ack = PORT_READ(in_INSERT_ISSUE_QUEUE_ACK [i][j]); |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | // if not execute -> don't route to issue_queue |
---|
| 43 | |
---|
| 44 | Tcontrol_t val = ( |
---|
| 45 | // previous_transaction and |
---|
| 46 | rename_unit_val and |
---|
| 47 | commit_unit_ack and |
---|
| 48 | (rename_unit_no_execute or |
---|
| 49 | issue_queue_ack)); |
---|
| 50 | Tcontrol_t rename_unit_ack = ( |
---|
| 51 | // previous_transaction and |
---|
| 52 | ack and |
---|
| 53 | commit_unit_ack and |
---|
| 54 | (rename_unit_no_execute or |
---|
| 55 | issue_queue_ack)); |
---|
| 56 | Tcontrol_t commit_unit_val = ( |
---|
| 57 | // previous_transaction and |
---|
| 58 | ack and |
---|
| 59 | rename_unit_val and |
---|
| 60 | (rename_unit_no_execute or |
---|
| 61 | issue_queue_ack)); |
---|
| 62 | Tcontrol_t issue_queue_val = ( |
---|
| 63 | // previous_transaction and |
---|
| 64 | ack and |
---|
| 65 | rename_unit_val and |
---|
| 66 | commit_unit_ack and |
---|
| 67 | not rename_unit_no_execute); |
---|
| 68 | |
---|
| 69 | PORT_WRITE(out_INSERT_VAL [x] ,val ); |
---|
| 70 | PORT_WRITE(out_INSERT_RENAME_UNIT_ACK [i][j],rename_unit_ack); |
---|
| 71 | PORT_WRITE(out_INSERT_COMMIT_UNIT_VAL [i][j],commit_unit_val); |
---|
| 72 | PORT_WRITE(out_INSERT_ISSUE_QUEUE_VAL [i][j],issue_queue_val); |
---|
| 73 | |
---|
| 74 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * rename_unit [%d].inst_insert[%d] -> %d",i,j,x); |
---|
| 75 | // log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * previous_transaction : %d",previous_transaction ); |
---|
| 76 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_val (w) : %d",val ); |
---|
| 77 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_ack (r) : %d",ack ); |
---|
| 78 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_rename_unit_val (r) : %d",rename_unit_val ); |
---|
| 79 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_rename_unit_ack (w) : %d",rename_unit_ack ); |
---|
| 80 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_rename_unit_no_execute (r) : %d",rename_unit_no_execute); |
---|
| 81 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_commit_unit_val (w) : %d",commit_unit_val ); |
---|
| 82 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_commit_unit_ack (r) : %d",commit_unit_ack ); |
---|
| 83 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_issue_queue_val (w) : %d",issue_queue_val ); |
---|
| 84 | log_printf(TRACE,OOO_Engine_Glue,FUNCTION," * insert_issue_queue_ack (r) : %d",issue_queue_ack ); |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | // previous_transaction = VAL and ACK; |
---|
| 88 | x ++; |
---|
| 89 | } |
---|
| 90 | } |
---|
| 91 | |
---|
| 92 | log_end(OOO_Engine_Glue,FUNCTION); |
---|
| 93 | }; |
---|
| 94 | |
---|
| 95 | }; // end namespace ooo_engine_glue |
---|
| 96 | }; // end namespace ooo_engine |
---|
| 97 | }; // end namespace multi_ooo_engine |
---|
| 98 | }; // end namespace core |
---|
| 99 | |
---|
| 100 | }; // end namespace behavioural |
---|
| 101 | }; // end namespace morpheo |
---|
| 102 | #endif |
---|