[78] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id: Address_management_vhdl_declaration.cpp 135 2009-07-17 08:59:05Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace ifetch_unit { |
---|
| 17 | namespace address_management { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Address_management::vhdl_declaration" |
---|
| 22 | void Address_management::vhdl_declaration (Vhdl * & vhdl) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Address_management,FUNCTION,"Begin"); |
---|
[135] | 25 | |
---|
| 26 | vhdl->set_type ("Tinstruction_enable ","array "+_std_logic_range(_param->_nb_instruction)+" of std_logic"); |
---|
| 27 | |
---|
| 28 | vhdl->set_signal ("reg_PC_ACCESS_VAL ", 1); |
---|
| 29 | vhdl->set_signal ("reg_PC_ACCESS ", _param->_size_instruction_address); |
---|
| 30 | vhdl->set_signal ("reg_PC_ACCESS_IS_DS_TAKE ", 1); |
---|
| 31 | vhdl->set_signal ("reg_PC_ACCESS_INSTRUCTION_ENABLE ", "Tinstruction_enable"); |
---|
| 32 | if (_param->_have_port_inst_ifetch_ptr) |
---|
| 33 | vhdl->set_signal ("reg_PC_ACCESS_INST_IFETCH_PTR ", _param->_size_inst_ifetch_ptr); |
---|
| 34 | vhdl->set_signal ("reg_PC_ACCESS_BRANCH_STATE ", _param->_size_branch_state); |
---|
| 35 | if (_param->_have_port_depth) |
---|
| 36 | vhdl->set_signal ("reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID ", _param->_size_depth); |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | vhdl->set_signal ("reg_PC_CURRENT_VAL ", 1); |
---|
| 40 | vhdl->set_signal ("reg_PC_CURRENT ", _param->_size_instruction_address); |
---|
| 41 | vhdl->set_signal ("reg_PC_CURRENT_IS_DS_TAKE ", 1); |
---|
| 42 | vhdl->set_signal ("reg_PC_CURRENT_INSTRUCTION_ENABLE ", "Tinstruction_enable"); |
---|
| 43 | if (_param->_have_port_inst_ifetch_ptr) |
---|
| 44 | vhdl->set_signal ("reg_PC_CURRENT_INST_IFETCH_PTR ",_param->_size_inst_ifetch_ptr); |
---|
| 45 | vhdl->set_signal ("reg_PC_CURRENT_BRANCH_STATE ", _param->_size_branch_state); |
---|
| 46 | if (_param->_have_port_depth) |
---|
| 47 | vhdl->set_signal ("reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID ", _param->_size_depth); |
---|
| 48 | |
---|
| 49 | vhdl->set_signal ("reg_PC_NEXT_VAL ", 1); |
---|
| 50 | vhdl->set_signal ("reg_PC_NEXT ", _param->_size_instruction_address); |
---|
| 51 | vhdl->set_signal ("reg_PC_NEXT_IS_DS_TAKE ", 1); |
---|
| 52 | vhdl->set_signal ("reg_PC_NEXT_INSTRUCTION_ENABLE ", "Tinstruction_enable"); |
---|
| 53 | if (_param->_have_port_inst_ifetch_ptr) |
---|
| 54 | vhdl->set_signal ("reg_PC_NEXT_INST_IFETCH_PTR ",_param->_size_inst_ifetch_ptr); |
---|
| 55 | vhdl->set_signal ("reg_PC_NEXT_BRANCH_STATE ", _param->_size_branch_state); |
---|
| 56 | if (_param->_have_port_depth) |
---|
| 57 | vhdl->set_signal ("reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID ", _param->_size_depth); |
---|
| 58 | |
---|
| 59 | vhdl->set_signal ("reg_PC_NEXT_NEXT_VAL ", 1); |
---|
| 60 | vhdl->set_signal ("reg_PC_NEXT_NEXT ", _param->_size_instruction_address); |
---|
| 61 | vhdl->set_signal ("reg_PC_NEXT_NEXT_IS_DS_TAKE ", 1); |
---|
| 62 | // vhdl->set_signal ("reg_PC_NEXT_NEXT_INSTRUCTION_ENABLE ", "Tinstruction_enable"); |
---|
| 63 | // if (_param->_have_port_inst_ifetch_ptr) |
---|
| 64 | // vhdl->set_signal ("reg_PC_NEXT_NEXT_INST_IFETCH_PTR ",_param->_size_inst_ifetch_ptr); |
---|
| 65 | // vhdl->set_signal ("reg_PC_NEXT_NEXT_BRANCH_STATE ", _param->_size_branch_state); |
---|
| 66 | // if (_param->_have_port_depth) |
---|
| 67 | // vhdl->set_signal ("reg_PC_NEXT_NEXT_BRANCH_UPDATE_PREDICTION_ID", _param->_size_depth); |
---|
| 68 | |
---|
| 69 | vhdl->set_signal ("internal_PREDICT_VAL ", 1); |
---|
| 70 | vhdl->set_signal ("internal_ADDRESS_VAL ", 1); |
---|
| 71 | vhdl->set_signal ("internal_EVENT_ACK ", 1); |
---|
| 72 | |
---|
[78] | 73 | log_printf(FUNC,Address_management,FUNCTION,"End"); |
---|
| 74 | }; |
---|
| 75 | |
---|
| 76 | }; // end namespace address_management |
---|
| 77 | }; // end namespace ifetch_unit |
---|
| 78 | }; // end namespace front_end |
---|
| 79 | }; // end namespace multi_front_end |
---|
| 80 | }; // end namespace core |
---|
| 81 | |
---|
| 82 | }; // end namespace behavioural |
---|
| 83 | }; // end namespace morpheo |
---|
| 84 | #endif |
---|