Changeset 102 for trunk/modules/vci_synthetic_initator/caba/sources/src
- Timestamp:
- Oct 4, 2010, 5:22:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp
r98 r102 45 45 tmpl(/**/)::VciSyntheticInitiator( 46 46 sc_module_name name, 47 const 48 const 49 size_t length, // Packet length (flit numbers)50 float rho, // Packets ratio on the network51 size_t depth, // Fifo depth52 size_t xmesh,53 size_t ymesh,54 size_t bc_period = 0, // Broadcast period, if no broadcast => 055 size_t xmin = 0,56 size_t xmax = 0,57 size_t ymin = 0,58 size_t ymax = 047 const soclib::common::MappingTable &mt, 48 const soclib::common::IntTab &vci_index, 49 const uint32_t length, // Packet length (flit numbers) 50 const float rho, // Packets ratio on the network 51 const uint32_t depth, // Fifo depth 52 const uint32_t xmesh, 53 const uint32_t ymesh, 54 const uint32_t bc_period, // Broadcast period, if no broadcast => 0 55 const uint32_t xmin, 56 const uint32_t xmax, 57 const uint32_t ymin, 58 const uint32_t ymax 59 59 ) 60 60 … … 71 71 m_rho(rho), 72 72 m_depth(depth), 73 m_x(x),74 m_y(y),75 73 m_xmesh(xmesh), 76 74 m_ymesh(ymesh), … … 81 79 m_ymax(ymax), 82 80 m_date_fifo("m_date_fifo", depth), 83 r_vci_fsm("r_vci_fsm") ,81 r_vci_fsm("r_vci_fsm") 84 82 { 85 83 … … 160 158 } else { 161 159 r_vci_fsm = VCI_SINGLE_SEND ; 162 destAdress();160 r_address_to_send = destAdress(); 163 161 m_count = 0; 164 162 } … … 196 194 case VCI_BC_SEND: 197 195 { 198 m_address_to_send.broadcast_address.xmin = m_xmin; 199 m_address_to_send.broadcast_address.xmax = m_xmax; 200 m_address_to_send.broadcast_address.ymin = m_ymin; 201 m_address_to_send.broadcast_address.ymax = m_ymax; 202 m_address_to_send.broadcast_address.bc = 0x3; 196 r_address_to_send = (((((((((m_xmin << 5) & m_xmax ) << 5 ) & m_ymin ) << 5 ) & m_ymax ) << 5 ) << 17 ) & 0x3) | 0 ; 197 //m_address_to_send.broadcast_address.xmin = m_xmin; 198 //m_address_to_send.broadcast_address.xmax = m_xmax; 199 //m_address_to_send.broadcast_address.ymin = m_ymin; 200 //m_address_to_send.broadcast_address.ymax = m_ymax; 201 //m_address_to_send.broadcast_address.bc = 0x3; 203 202 m_bc_nrsp = (m_xmax - m_xmin) * (m_ymax - m_ymin); 204 203 r_vci_fsm = VCI_BC_SEND; … … 223 222 224 223 /////////////////// Filling fifo 225 if( ( rhos < m_rho) && (rand()/RAND_MAX) ){224 if( (m_rhos < m_rho) && (rand()/RAND_MAX) ){ 226 225 if (m_date_fifo.wok()){ 227 226 date_fifo_put = true ; 228 227 } 229 if (!r_broadcast_req.read() && (m_cpt_cycles % bc_period)){228 if (!r_broadcast_req.read() && (m_cpt_cycles % m_bc_period)){ 230 229 r_broadcast_req = true; 231 230 } … … 288 287 { 289 288 p_vci.cmdval = true; 290 p_vci.address = ( typename vci_param::addr_t)(m_address_to_send+(m_count*4));289 p_vci.address = (vci_addr_t)(r_address_to_send.read() + (m_count*4)); 291 290 p_vci.plen = m_length*4; 292 291 p_vci.wdata = 0; … … 316 315 { 317 316 p_vci.cmdval = true; 318 p_vci.address = ( typename vci_param::addr_t) m_address_to_send;317 p_vci.address = (vci_addr_t) r_address_to_send.read(); 319 318 p_vci.plen = 4; 320 319 p_vci.wdata = 0;
Note: See TracChangeset
for help on using the changeset viewer.