Changeset 33 for trunk/modules/vci_local_ring_network_2/caba
- Timestamp:
- Apr 29, 2010, 12:24:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_local_ring_network_2/caba/source/src/vci_local_ring_network_2.cpp
r8 r33 67 67 std::ostringstream o; 68 68 o << name() << "_hg_init"; 69 70 m_half_gateway_initiator = new half_gateway_initiator_t(o.str().c_str(), false, half_gateway_fifo_depth, mt, ringid, false);69 bool alloc_hg_init = (m_nai == 0); 70 m_half_gateway_initiator = new half_gateway_initiator_t(o.str().c_str(), alloc_hg_init, half_gateway_fifo_depth, mt, ringid, false); 71 71 72 72 std::ostringstream p; 73 73 p << name() << "_hg_target"; 74 m_half_gateway_target = new half_gateway_target_t(p.str().c_str(), false, half_gateway_fifo_depth, mt, ringid, false); 74 bool alloc_hg_target = (m_nat == 0); 75 m_half_gateway_target = new half_gateway_target_t(p.str().c_str(), alloc_hg_target, half_gateway_fifo_depth, mt, ringid, false); 75 76 76 77 for(size_t i=0; i<m_nai; ++i) { … … 125 126 } 126 127 128 if(m_nai > 0) { 127 129 for(size_t i=0;i<m_nat;i++){ 128 130 m_ring_target[i]->update_ring_signals(m_ring_signal[m_nai+i-1], m_ring_signal[m_nai+i] ); 129 131 } 132 } 133 else { 134 135 for(size_t i=0;i<m_nat;i++){ 136 size_t h = 0; 137 if(i == 0) h = m_ns-1; 138 else h = i-1; 139 m_ring_target[i]->update_ring_signals(m_ring_signal[h], m_ring_signal[i] ); 140 } 141 } 130 142 131 143 m_half_gateway_initiator->update_ring_signals(m_ring_signal[m_nai+m_nat-1], m_ring_signal[m_nai+m_nat] ); … … 141 153 } 142 154 155 if(m_nai > 0) { 143 156 for(size_t i=0;i<m_nat;i++){ 144 157 m_ring_target[i]->update_ring_signals(m_ring_signal[m_nai+i-1], m_ring_signal[m_nai+i] ); 145 158 } 159 } 160 else { 161 162 for(size_t i=0;i<m_nat;i++){ 163 size_t h = 0; 164 if(i == 0) h = m_ns-1; 165 else h = i-1; 166 m_ring_target[i]->update_ring_signals(m_ring_signal[h], m_ring_signal[i] ); 167 } 168 } 169 146 170 147 171 m_half_gateway_initiator->update_ring_signals(m_ring_signal[m_nai+m_nat-1], m_ring_signal[m_nai+m_nat] ); … … 158 182 } 159 183 184 if(m_nai > 0) { 160 185 for(size_t i=0;i<m_nat;i++){ 161 186 m_ring_target[i]->update_ring_signals(m_ring_signal[m_nai+i-1], m_ring_signal[m_nai+i] ); 162 187 } 188 } 189 else { 190 191 for(size_t i=0;i<m_nat;i++){ 192 size_t h = 0; 193 if(i == 0) h = m_ns-1; 194 else h = i-1; 195 m_ring_target[i]->update_ring_signals(m_ring_signal[h], m_ring_signal[i] ); 196 } 197 } 198 163 199 164 200 m_half_gateway_initiator->update_ring_signals(m_ring_signal[m_nai+m_nat-1], m_ring_signal[m_nai+m_nat] ); … … 176 212 m_ring_initiator[i]->transition(p_to_initiator[i], m_ring_signal[h]); 177 213 } 214 215 if(m_nai > 0) { 178 216 for(size_t t=0;t<m_nat;t++) { 179 217 m_ring_target[t]->transition(p_to_target[t], m_ring_signal[m_nai+t-1]); 180 218 } 181 219 } 220 else { 221 222 for(size_t t=0;t<m_nat;t++) { 223 size_t h = 0; 224 if(t == 0) h = m_ns-1; 225 else h = t-1; 226 227 m_ring_target[t]->transition(p_to_target[t], m_ring_signal[h]); 228 } 229 } 182 230 m_half_gateway_initiator->transition(p_gate_initiator, m_ring_signal[m_nai+m_nat-1]); 183 231 m_half_gateway_target->transition(p_gate_target, m_ring_signal[m_nai+m_nat]);
Note: See TracChangeset
for help on using the changeset viewer.