Changeset 65 for trunk/IPs/systemC/processor
- Timestamp:
- Dec 5, 2007, 1:40:16 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural
- Files:
-
- 4 added
- 4 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp
r64 r65 374 374 LABEL("Initialisation"); 375 375 376 in_NRESET->write(0); 377 SC_START(5); 378 in_NRESET->write(1); 379 376 380 for (uint32_t i=0; i<_param->_nb_gpr_read ; i++) 377 381 in_GPR_READ_VAL [i]->write(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters.cpp
r60 r65 58 58 59 59 _size_gpr_address = log2(nb_general_register [0]); 60 60 61 61 for (uint32_t i=1; i<nb_ooo_engine; i++) 62 if (log2(nb_general_register [i]) > _size_gpr_address) 63 _size_gpr_address = log2(nb_general_register [i]); 62 { 63 uint32_t new_size = log2(nb_general_register [i]); 64 if (new_size > _size_gpr_address) 65 _size_gpr_address = new_size; 66 } 64 67 65 68 _size_spr_address = log2(nb_special_register [0]); 66 69 67 70 for (uint32_t i=1; i<nb_ooo_engine; i++) 68 if (log2(nb_special_register [i]) > _size_spr_address) 69 _size_spr_address = log2(nb_special_register [i]); 71 { 72 uint32_t new_size = log2(nb_special_register [i]); 73 if (new_size > _size_spr_address) 74 _size_spr_address = new_size; 75 } 76 70 77 71 78 _param_gpr = new morpheo::behavioural::generic::registerfile::Parameters * [_nb_ooo_engine]; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
r62 r65 72 72 if (_param->_have_port_ooo_engine_id == true) 73 73 in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); 74 in_GPR_READ_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , log2(_param->_size_gpr_address));74 in_GPR_READ_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , _param->_size_gpr_address); 75 75 out_GPR_READ_DATA [i]= interface->set_signal_out<Tgeneral_data_t > ("data" , _param->_size_general_data); 76 76 out_GPR_READ_DATA_VAL [i]= interface->set_signal_out<Tcontrol_t > ("data_val" , 1); … … 99 99 if (_param->_have_port_ooo_engine_id == true) 100 100 in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); 101 in_GPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , log2(_param->_size_gpr_address));101 in_GPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , _param->_size_gpr_address); 102 102 in_GPR_WRITE_DATA [i]= interface->set_signal_in <Tgeneral_data_t > ("data" , _param->_size_general_data); 103 103 } … … 126 126 if (_param->_have_port_ooo_engine_id == true) 127 127 in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); 128 in_SPR_READ_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , log2(_param->_size_spr_address));128 in_SPR_READ_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , _param->_size_spr_address); 129 129 out_SPR_READ_DATA [i]= interface->set_signal_out<Tspecial_data_t > ("data" , _param->_size_special_data); 130 130 out_SPR_READ_DATA_VAL [i]= interface->set_signal_out<Tcontrol_t > ("data_val" , 1); … … 153 153 if (_param->_have_port_ooo_engine_id == true) 154 154 in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); 155 in_SPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , log2(_param->_size_spr_address));155 in_SPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , _param->_size_spr_address); 156 156 in_SPR_WRITE_DATA [i]= interface->set_signal_in <Tspecial_data_t > ("data" , _param->_size_special_data); 157 157 } … … 190 190 out_INSERT_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); 191 191 in_INSERT_ROB_RD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_use" , 1); 192 in_INSERT_ROB_RD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_num_reg", log2(_param->_size_gpr_address));192 in_INSERT_ROB_RD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_num_reg", _param->_size_gpr_address); 193 193 in_INSERT_ROB_RE_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_use" , 1); 194 in_INSERT_ROB_RE_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_num_reg", log2(_param->_size_spr_address));194 in_INSERT_ROB_RE_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_num_reg", _param->_size_spr_address); 195 195 196 196 } … … 238 238 out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); 239 239 in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); 240 in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", log2(_param->_size_gpr_address));240 in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); 241 241 in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); 242 in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", log2(_param->_size_spr_address));242 in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); 243 243 in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); 244 in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", log2(_param->_size_gpr_address));244 in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); 245 245 in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); 246 in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", log2(_param->_size_spr_address));246 in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); 247 247 } 248 248 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r62 r65 55 55 private : const string _name ; 56 56 private : const direction_t _direction ; 57 private : const uint32_t _size ;58 57 private : const presence_port_t _presence_port ; 58 private : uint32_t _size ; 59 59 60 60 private : Signal * _connect_to_signal; // the actual implementaion, this signal link with one signal (but if signal is an output, it can be connect with many signal ...) … … 81 81 public : string get_name (void); 82 82 public : uint32_t get_size (void); 83 public : void set_size (uint32_t size); 84 public : void set_size_max (uint32_t size); 85 83 86 public : Signal * get_connect_to_signal (void); 84 87 public : Signal * get_connect_from_signal (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
r44 r65 18 18 #include "Common/include/ToString.h" 19 19 #include "Common/include/Debug.h" 20 #include "Common/include/ErrorMorpheo.h" 20 21 21 22 using namespace std; … … 127 128 public : void set_body_component_port_map (list<string> & list_port_map , 128 129 string name_port , 129 string name_signal ); 130 uint32_t size_port , 131 string name_signal , 132 uint32_t size_signal ); 130 133 131 134 private : string get_library_ieee (uint32_t depth ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r62 r65 88 88 } 89 89 90 signal_dest = signal_internal (entity_productor, signal_productor); 90 signal_dest= signal_internal (entity_productor, signal_productor); 91 signal_dest->set_size_max(signal_src->get_size()); 92 91 93 dest_is_port = false; 92 94 } … … 131 133 if (signal_src->get_direction() != OUT) 132 134 throw (ErrorMorpheo ("<Component::port_map> the direction of the signal '"+signal_src->get_name()+"' must be OUT.")); 135 136 Signal * signal_dest; 137 138 signal_dest= signal_internal (entity_src, signal_src); 139 signal_dest->set_size_max(signal_src->get_size()); 133 140 134 141 try 135 142 { 136 signal_src->link(signal_ internal (entity_src, signal_src),143 signal_src->link(signal_dest, 137 144 false); 138 145 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
r58 r65 140 140 // else 141 141 // { 142 // cout << "Kane à dit : " << signal_dest->get_name() << endl;143 142 // // Test if output 144 143 // if (signal_dest->get_direction() == OUT) … … 156 155 // } 157 156 // } 158 159 vhdl->set_body_component_port_map (list_port_map, name_src, name_dest); 157 158 vhdl->set_body_component_port_map (list_port_map, 159 name_src , signal_src ->get_size(), 160 name_dest, signal_dest->get_size() ); 160 161 } 161 162 ++k; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
r62 r65 17 17 _name (name ), 18 18 _direction (direction ), 19 _size (size ),20 19 _presence_port ((direction==INTERNAL)?PORT_VHDL_NO_TESTBENCH_NO:presence_port) 21 20 { 22 21 log_printf(FUNC,Behavioural,"Signal","Begin"); 23 _is_allocate = false; 24 _is_map_as_src = false; 25 _is_map_as_dest= false; 22 _size = size; 23 _is_allocate = false; 24 _is_map_as_src = false; 25 _is_map_as_dest = false; 26 26 _connect_from_signal = NULL; 27 27 _connect_to_signal = NULL; 28 _sc_signal = NULL;29 _sc_signal_map = NULL;30 _type_info = UNKNOW;28 _sc_signal = NULL; 29 _sc_signal_map = NULL; 30 _type_info = UNKNOW; 31 31 #ifdef VHDL_TESTBENCH 32 _list_value = new list<string>;32 _list_value = new list<string>; 33 33 #endif 34 34 log_printf(FUNC,Behavioural,"Signal","End"); … … 38 38 _name (signal._name ), 39 39 _direction (signal._direction ), 40 _size (signal._size ),41 40 _presence_port (signal._presence_port) 42 41 { 43 42 log_printf(FUNC,Behavioural,"Signal (copy)","Begin"); 44 _is_allocate = signal._is_allocate; 45 _is_map_as_src = signal._is_map_as_src ; 46 _is_map_as_dest = signal._is_map_as_dest; 43 _size = signal._size; 44 _is_allocate = signal._is_allocate; 45 _is_map_as_src = signal._is_map_as_src ; 46 _is_map_as_dest = signal._is_map_as_dest; 47 47 _connect_from_signal = signal._connect_from_signal; 48 48 _connect_to_signal = signal._connect_to_signal; 49 _sc_signal = signal._sc_signal ;50 _sc_signal_map = signal._sc_signal_map;51 _type_info = signal._type_info ;49 _sc_signal = signal._sc_signal ; 50 _sc_signal_map = signal._sc_signal_map; 51 _type_info = signal._type_info ; 52 52 #ifdef VHDL_TESTBENCH 53 _list_value = signal._list_value;53 _list_value = signal._list_value; 54 54 #endif 55 55 log_printf(FUNC,Behavioural,"Signal (copy)","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_from_signal.cpp
r44 r65 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 Signal * _return = _connect_from_signal; 21 22 while ((_return != NULL) and 23 (_return->get_direction () == INTERNAL)) 24 _return = _return->get_connect_from_signal(); 25 20 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_to_signal.cpp
r44 r65 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 Signal * _return = _connect_to_signal; 21 22 while ((_return != NULL) and 23 (_return->get_direction () == INTERNAL)) 24 _return = _return->get_connect_to_signal(); 25 20 26 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r62 r65 29 29 throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal_dest->get_name()+"\", because the first signal is already mapped.")); 30 30 31 // log_printf(TRACE,Behavioural,FUNCTION, " * sc_signal (before) %.8x - %.8x", (uint32_t)(_sc_signal_map), (uint32_t)(signal_dest->_sc_signal_map));32 33 31 // List of all case 34 32 // … … 55 53 signal_dest->_is_map_as_dest = true; 56 54 55 // an internal signal and port can't be a source. 56 // also, to fill the connect_to_signal's field 57 if ((signal_src->_direction == OUT) and 58 (signal_dest->_direction == INTERNAL)) 59 { 60 signal_dest->_connect_to_signal = signal_src; 61 } 62 57 63 // vhdl_testbench : to read an output producte by a internal component 58 64 // TODO : à vérifier !!!!!!!!!!!! … … 63 69 connect (signal_dest); 64 70 65 // log_printf(TRACE,Behavioural,FUNCTION, " * sc_signal (after ) %.8x - %.8x", (uint32_t)(_sc_signal_map), (uint32_t)(signal_dest->_sc_signal_map));66 67 71 log_printf(FUNC,Behavioural,FUNCTION,"End"); 68 72 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp
r43 r65 20 20 void Vhdl::set_body_component_port_map (list<string> & list_port_map , 21 21 string name_port , 22 string name_signal ) 22 uint32_t size_port , 23 string name_signal , 24 uint32_t size_signal ) 23 25 { 24 26 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 25 set_list(list_port_map, name_port + "\t=>" + name_signal); 27 28 if (size_port > size_signal) 29 throw (ErrorMorpheo ("<Vhdl::set_body_component_port_map> size of port '"+name_port+"' ("+toString(size_port)+") is greater than size of signal '"+name_signal+"' ("+toString(size_signal)+").")); 30 31 string str_size = ""; 32 33 // test if size is different (possible if multi write 34 if (size_port != size_signal) 35 str_size = std_logic_range(size_port); 36 37 set_list(list_port_map, name_port + "\t=>" + name_signal+str_size); 38 26 39 log_printf(FUNC,Behavioural,FUNCTION,"End"); 27 40 };
Note: See TracChangeset
for help on using the changeset viewer.