Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
r81 r88 22 22 void Rename_select::genMealy (void) 23 23 { 24 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); 24 log_begin(Rename_select,FUNCTION); 25 log_function(Rename_select,FUNCTION,_name.c_str()); 25 26 26 Tcontrol_t ack [_param->_nb_front_end][_param->_max_nb_inst_decod]; 27 Tcontrol_t val [_param->_nb_inst_rename]; 28 Tcontrol_t ack [_param->_nb_front_end][_param->_max_nb_inst_decod]; 29 Tcontrol_t previous_transaction [_param->_nb_front_end]; 30 31 for (uint32_t i=0; i<_param->_nb_inst_rename; ++i) 32 val [i] = false; 27 33 for (uint32_t i=0; i<_param->_nb_front_end; i++) 28 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 29 ack [i][j] = false; 30 31 std::list<select_t>::iterator it=select.begin(); 34 { 35 previous_transaction [i] = true; 36 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 37 ack [i][j] = false; 38 } 39 40 std::list<generic::priority::select_t> * select = _priority->select(); 41 std::list<generic::priority::select_t>::iterator it=select->begin(); 32 42 33 43 for (uint32_t i=0; i<_param->_nb_inst_rename; i++) 34 44 { 35 Tcontrol_t val = false;45 log_printf(TRACE,Rename_select,FUNCTION," * inst_rename [%d]",i); 36 46 37 while ((it != select.end()) and (val == false)) 47 // Scan all instruction until find 48 while ((it != select->end()) and (val [i] == false)) 38 49 { 39 Tcontext_t x = it-> _front_end;40 uint32_t y = it-> _inst_decod;50 Tcontext_t x = it->grp; 51 uint32_t y = it->elt; 41 52 42 // Test if this instruction is valid 43 if (PORT_READ(in_RENAME_IN_VAL[x][y]) == 1) 53 log_printf(TRACE,Rename_select,FUNCTION," * front_end[%d].inst_decod[%d]",x,y); 54 log_printf(TRACE,Rename_select,FUNCTION," * rename_in_val : %d",PORT_READ(in_RENAME_IN_VAL[x][y])); 55 log_printf(TRACE,Rename_select,FUNCTION," * previous_transaction : %d",previous_transaction[x]); 56 57 // Test if this instruction is valid and if all previous instruction of this front end is an valid transaction 58 if (previous_transaction [x] and 59 PORT_READ(in_RENAME_IN_VAL[x][y])) 44 60 { 45 61 // Find !!! 46 val 62 val [i] = true; 47 63 ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]); 64 65 log_printf(TRACE,Rename_select,FUNCTION," * rename_out_ack : %d",PORT_READ(in_RENAME_OUT_ACK[i])); 48 66 49 67 if (_param->_have_port_front_end_id) … … 55 73 PORT_WRITE(out_RENAME_OUT_TYPE [i],PORT_READ(in_RENAME_IN_TYPE [x][y])); 56 74 PORT_WRITE(out_RENAME_OUT_OPERATION [i],PORT_READ(in_RENAME_IN_OPERATION [x][y])); 75 PORT_WRITE(out_RENAME_OUT_NO_EXECUTE [i],PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y])); 76 PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y])); 57 77 PORT_WRITE(out_RENAME_OUT_ADDRESS [i],PORT_READ(in_RENAME_IN_ADDRESS [x][y])); 58 78 PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT [x][y])); … … 69 89 PORT_WRITE(out_RENAME_OUT_NUM_REG_RE [i],PORT_READ(in_RENAME_IN_NUM_REG_RE [x][y])); 70 90 PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y])); 91 PORT_WRITE(out_RENAME_OUT_EXCEPTION [i],PORT_READ(in_RENAME_IN_EXCEPTION [x][y])); 71 92 } 93 94 // ack = 1 if previous_transaction == true and rename_in_val == true and rename_out == true 95 previous_transaction [x] = ack [x][y]; 72 96 73 97 it ++; 74 98 } 75 99 76 PORT_WRITE(out_RENAME_OUT_VAL [i], val);77 100 } 101 102 for (uint32_t i=0; i<_param->_nb_inst_rename; ++i) 103 PORT_WRITE(out_RENAME_OUT_VAL [i], val [i]); 78 104 79 105 for (uint32_t i=0; i<_param->_nb_front_end; i++) … … 81 107 PORT_WRITE(out_RENAME_IN_ACK [i][j], ack [i][j]); 82 108 83 log_ printf(FUNC,Rename_select,FUNCTION,"End");109 log_end(Rename_select,FUNCTION); 84 110 }; 85 111
Note: See TracChangeset
for help on using the changeset viewer.