[88] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id: Reexecute_unit_genMoore.cpp 98 2008-12-31 10:18:08Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/include/Reexecute_unit.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_ooo_engine { |
---|
| 15 | namespace ooo_engine { |
---|
| 16 | namespace reexecute_unit { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Reexecute_unit::genMoore" |
---|
| 21 | void Reexecute_unit::genMoore (void) |
---|
| 22 | { |
---|
| 23 | log_begin(Reexecute_unit,FUNCTION); |
---|
[98] | 24 | log_function(Reexecute_unit,FUNCTION,_name.c_str()); |
---|
[88] | 25 | |
---|
| 26 | // =================================================================== |
---|
| 27 | // =====[ SPR ]======================================================= |
---|
| 28 | // =================================================================== |
---|
| 29 | for (uint32_t i=0; i<_param->_nb_inst_reexecute; i++) |
---|
| 30 | { |
---|
| 31 | Tcontrol_t val = (not _reexecute_queue [i].empty() and |
---|
| 32 | (_reexecute_queue [i].front()->state == STATE_SPR_ACCESS)); |
---|
| 33 | |
---|
| 34 | if (val) |
---|
| 35 | { |
---|
| 36 | entry_t * entry = _reexecute_queue [i].front(); |
---|
| 37 | |
---|
| 38 | PORT_WRITE(out_SPR_WEN [i],entry->spr_wen); |
---|
| 39 | if (_param->_have_port_context_id) |
---|
| 40 | PORT_WRITE(out_SPR_CONTEXT_ID [i],entry->context_id); |
---|
| 41 | if (_param->_have_port_front_end_id) |
---|
| 42 | PORT_WRITE(out_SPR_FRONT_END_ID [i],entry->front_end_id); |
---|
| 43 | PORT_WRITE(out_SPR_NUM_GROUP [i],(entry->address >> _param->_shift_spr_num_group) & _param->_mask_spr_num_group); |
---|
| 44 | PORT_WRITE(out_SPR_NUM_REG [i],(entry->address ) & _param->_mask_spr_num_reg ); |
---|
| 45 | PORT_WRITE(out_SPR_WDATA [i],entry->data); |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | internal_SPR_VAL [i] = val; |
---|
| 49 | PORT_WRITE(out_SPR_VAL [i], internal_SPR_VAL [i]); |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | log_end(Reexecute_unit,FUNCTION); |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | }; // end namespace reexecute_unit |
---|
| 56 | }; // end namespace ooo_engine |
---|
| 57 | }; // end namespace multi_ooo_engine |
---|
| 58 | }; // end namespace core |
---|
| 59 | |
---|
| 60 | }; // end namespace behavioural |
---|
| 61 | }; // end namespace morpheo |
---|
| 62 | #endif |
---|