[54] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id: Read_queue_genMoore.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_execute_loop { |
---|
| 15 | namespace execute_loop { |
---|
| 16 | namespace multi_read_unit { |
---|
| 17 | namespace read_unit { |
---|
| 18 | namespace read_queue { |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Read_queue::genMoore" |
---|
| 22 | void Read_queue::genMoore (void) |
---|
| 23 | { |
---|
[88] | 24 | log_begin(Read_queue,FUNCTION); |
---|
| 25 | log_function(Read_queue,FUNCTION,_name.c_str()); |
---|
[54] | 26 | |
---|
[55] | 27 | bool not_full = not (_queue->size() == _param->_size_queue); |
---|
[54] | 28 | bool not_empty = not _queue->empty(); |
---|
| 29 | |
---|
| 30 | // ~~~~~[ Interface "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 31 | PORT_WRITE (out_READ_QUEUE_IN_ACK , not_full ); |
---|
| 32 | |
---|
| 33 | // ~~~~~[ Interface "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[68] | 34 | // PORT_WRITE (out_READ_QUEUE_OUT_VAL , not_empty ); // in genMealy_val |
---|
| 35 | |
---|
| 36 | if(_param->_have_port_context_id ) |
---|
| 37 | PORT_WRITE (out_READ_QUEUE_OUT_CONTEXT_ID , _queue_head->_context_id ); |
---|
| 38 | if(_param->_have_port_front_end_id ) |
---|
| 39 | PORT_WRITE (out_READ_QUEUE_OUT_FRONT_END_ID , _queue_head->_front_end_id); |
---|
| 40 | if(_param->_have_port_ooo_engine_id) |
---|
| 41 | PORT_WRITE (out_READ_QUEUE_OUT_OOO_ENGINE_ID, _queue_head->_ooo_engine_id); |
---|
[88] | 42 | if(_param->_have_port_rob_ptr ) |
---|
[68] | 43 | PORT_WRITE (out_READ_QUEUE_OUT_ROB_ID , _queue_head->_rob_id ); |
---|
[54] | 44 | PORT_WRITE (out_READ_QUEUE_OUT_OPERATION , _queue_head->_operation ); |
---|
| 45 | PORT_WRITE (out_READ_QUEUE_OUT_TYPE , _queue_head->_type ); |
---|
[76] | 46 | PORT_WRITE (out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE, _queue_head->_store_queue_ptr_write); |
---|
[78] | 47 | if (_param->_have_port_load_queue_ptr) |
---|
[76] | 48 | PORT_WRITE (out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE , _queue_head->_load_queue_ptr_write ); |
---|
[54] | 49 | PORT_WRITE (out_READ_QUEUE_OUT_HAS_IMMEDIAT, _queue_head->_has_immediat); |
---|
| 50 | PORT_WRITE (out_READ_QUEUE_OUT_IMMEDIAT , _queue_head->_immediat ); |
---|
[76] | 51 | // PORT_WRITE (out_READ_QUEUE_OUT_READ_RA , _queue_head->_read_ra ); |
---|
[54] | 52 | PORT_WRITE (out_READ_QUEUE_OUT_NUM_REG_RA , _queue_head->_num_reg_ra ); |
---|
| 53 | // PORT_WRITE (out_READ_QUEUE_OUT_DATA_RA_VAL , _queue_head->_data_ra_val ); // in genMealy_gpr |
---|
| 54 | // PORT_WRITE (out_READ_QUEUE_OUT_DATA_RA , _queue_head->_data_ra ); // in genMealy_gpr |
---|
[76] | 55 | // PORT_WRITE (out_READ_QUEUE_OUT_READ_RB , _queue_head->_read_rb ); |
---|
[54] | 56 | PORT_WRITE (out_READ_QUEUE_OUT_NUM_REG_RB , _queue_head->_num_reg_rb ); |
---|
| 57 | // PORT_WRITE (out_READ_QUEUE_OUT_DATA_RB_VAL , _queue_head->_data_rb_val ); // in genMealy_gpr |
---|
| 58 | // PORT_WRITE (out_READ_QUEUE_OUT_DATA_RB , _queue_head->_data_rb ); // in genMealy_gpr |
---|
[76] | 59 | // PORT_WRITE (out_READ_QUEUE_OUT_READ_RC , _queue_head->_read_rc ); |
---|
[54] | 60 | PORT_WRITE (out_READ_QUEUE_OUT_NUM_REG_RC , _queue_head->_num_reg_rc ); |
---|
| 61 | // PORT_WRITE (out_READ_QUEUE_OUT_DATA_RC_VAL , _queue_head->_data_rc_val ); // in genMealy_spr |
---|
| 62 | // PORT_WRITE (out_READ_QUEUE_OUT_DATA_RC , _queue_head->_data_rc ); // in genMealy_spr |
---|
| 63 | PORT_WRITE (out_READ_QUEUE_OUT_WRITE_RD , _queue_head->_write_rd ); |
---|
| 64 | PORT_WRITE (out_READ_QUEUE_OUT_NUM_REG_RD , _queue_head->_num_reg_rd ); |
---|
| 65 | PORT_WRITE (out_READ_QUEUE_OUT_WRITE_RE , _queue_head->_write_re ); |
---|
| 66 | PORT_WRITE (out_READ_QUEUE_OUT_NUM_REG_RE , _queue_head->_num_reg_re ); |
---|
| 67 | |
---|
| 68 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[66] | 69 | PORT_WRITE (out_GPR_READ_VAL [0], not_empty and _queue_head->_read_ra_val); |
---|
| 70 | PORT_WRITE (out_GPR_READ_VAL [1], not_empty and _queue_head->_read_rb_val); |
---|
[68] | 71 | if(_param->_have_port_ooo_engine_id) |
---|
| 72 | { |
---|
| 73 | PORT_WRITE (out_GPR_READ_OOO_ENGINE_ID [0], _queue_head->_ooo_engine_id); |
---|
| 74 | PORT_WRITE (out_GPR_READ_OOO_ENGINE_ID [1], _queue_head->_ooo_engine_id); |
---|
| 75 | } |
---|
[66] | 76 | PORT_WRITE (out_GPR_READ_NUM_REG [0], _queue_head->_num_reg_ra); |
---|
| 77 | PORT_WRITE (out_GPR_READ_NUM_REG [1], _queue_head->_num_reg_rb); |
---|
[54] | 78 | |
---|
| 79 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[66] | 80 | PORT_WRITE (out_SPR_READ_VAL [0], not_empty and _queue_head->_read_rc_val); |
---|
[68] | 81 | if(_param->_have_port_ooo_engine_id) |
---|
[88] | 82 | PORT_WRITE (out_SPR_READ_OOO_ENGINE_ID [0], _queue_head->_ooo_engine_id); |
---|
[66] | 83 | PORT_WRITE (out_SPR_READ_NUM_REG [0], _queue_head->_num_reg_rc); |
---|
[54] | 84 | |
---|
[88] | 85 | log_end(Read_queue,FUNCTION); |
---|
[54] | 86 | }; |
---|
| 87 | |
---|
| 88 | }; // end namespace read_queue |
---|
| 89 | }; // end namespace read_unit |
---|
| 90 | }; // end namespace multi_read_unit |
---|
| 91 | }; // end namespace execute_loop |
---|
| 92 | }; // end namespace multi_execute_loop |
---|
| 93 | }; // end namespace core |
---|
| 94 | |
---|
| 95 | }; // end namespace behavioural |
---|
| 96 | }; // end namespace morpheo |
---|
| 97 | #endif |
---|