Changeset 716 for trunk/modules/vci_iox_network/caba
- Timestamp:
- Jun 23, 2014, 3:44:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_iox_network/caba/source/src/vci_iox_network.cpp
r549 r716 70 70 71 71 const bool m_is_cmd; // CMD XBAR if true 72 const size_t 73 const size_t 72 const size_t m_inputs; // number of inputs 73 const size_t m_outputs; // number of outputs 74 74 void* m_rt; // pointer on routing table (CMD or RSP) 75 75 … … 84 84 size_t nb_inputs, 85 85 size_t nb_outputs, 86 87 86 void* rt ) 87 : m_is_cmd( is_cmd ), 88 88 m_inputs( nb_inputs ), 89 89 m_outputs( nb_outputs ), 90 90 m_rt ( rt ) 91 92 93 r_out_origin= new sc_signal<size_t>[nb_outputs];94 95 r_in_dest= new sc_signal<size_t>[nb_inputs];96 91 { 92 r_out_allocated = new sc_signal<bool>[nb_outputs]; 93 r_out_origin = new sc_signal<size_t>[nb_outputs]; 94 r_in_allocated = new sc_signal<bool>[nb_inputs]; 95 r_in_dest = new sc_signal<size_t>[nb_inputs]; 96 } 97 97 98 98 //////////// 99 99 void reset() 100 100 { 101 102 { 103 104 105 106 107 { 108 109 110 101 for (size_t i=0 ; i<m_outputs ; ++i) 102 { 103 r_out_origin[i] = 0; 104 r_out_allocated[i] = false; 105 } 106 for (size_t i=0 ; i<m_inputs ; ++i) 107 { 108 r_in_dest[i] = 0; 109 r_in_allocated[i] = false; 110 } 111 111 } 112 112 … … 214 214 if (r_out_allocated[out]) 215 215 { 216 216 size_t in = r_out_origin[out]; 217 217 pkt_t tmp; 218 218 tmp.readFrom(*input_port[in]); … … 280 280 /////////////////////////////////////////////////////////////////////////// 281 281 tmpl(/**/)::VciIoxNetwork( sc_core::sc_module_name name, 282 283 284 282 const soclib::common::MappingTable &mt, 283 size_t nb_tgt, 284 size_t nb_ini ) 285 285 : BaseModule(name), 286 286 p_clk("clk"), 287 287 p_resetn("resetn"), 288 288 p_to_tgt(soclib::common::alloc_elems<VciInitiator<vci_param> >( 289 289 "p_to_tgt", nb_tgt)), 290 290 p_to_ini(soclib::common::alloc_elems<VciTarget<vci_param> >( 291 291 "p_to_ini", nb_ini)), 292 292 … … 306 306 dont_initialize(); 307 307 sensitive << p_clk.neg(); 308 308 for ( size_t i=0; i<nb_ini; ++i ) sensitive << p_to_ini[i]; 309 309 310 310 SC_METHOD(genMealy_cmd_ack); // controls to intiators CMDACK 311 311 dont_initialize(); 312 312 sensitive << p_clk.neg(); 313 313 for ( size_t i=0; i<nb_tgt; ++i ) sensitive << p_to_tgt[i]; 314 314 315 315 SC_METHOD(genMealy_rsp_val); // controls to initiators RSPVAL 316 316 dont_initialize(); 317 317 sensitive << p_clk.neg(); 318 318 for ( size_t i=0; i<nb_tgt; ++i ) sensitive << p_to_tgt[i]; 319 319 320 320 SC_METHOD(genMealy_rsp_ack); // controls to targets RSPACK 321 321 dont_initialize(); 322 322 sensitive << p_clk.neg(); 323 323 for ( size_t i=0; i<nb_ini; ++i ) sensitive << p_to_ini[i]; 324 324 325 325 // constructing CMD & RSP XBARs 326 326 m_rsp_xbar = new rsp_xbar_t( false, // RSP XBAR 327 327 nb_tgt, 328 328 nb_ini, 329 329 &m_rsp_rt ); 330 330 331 331 m_cmd_xbar = new cmd_xbar_t( true, // CMD XBAR 332 332 nb_ini, 333 333 nb_tgt,
Note: See TracChangeset
for help on using the changeset viewer.