Changeset 427 for trunk/modules/vci_mem_cache
- Timestamp:
- Jun 30, 2013, 9:09:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r422 r427 2159 2159 // coherence update required 2160 2160 { 2161 if(!r_write_to_cc_send_multi_req.read() 2162 2161 if(!r_write_to_cc_send_multi_req.read() && 2162 !r_write_to_cc_send_brdcast_req.read()) 2163 2163 { 2164 2164 r_write_fsm = WRITE_UPT_LOCK; … … 2276 2276 // and write the first copy in the FIFO 2277 2277 // send the request if only one copy 2278 2279 if(!r_write_to_cc_send_multi_req.read() && 2280 !r_write_to_cc_send_brdcast_req.read()) // no pending coherence request 2281 { 2282 r_write_to_cc_send_brdcast_req = false; 2283 r_write_to_cc_send_trdid = r_write_upt_index.read(); 2284 r_write_to_cc_send_nline = m_nline[(addr_t)(r_write_address.read())]; 2285 r_write_to_cc_send_index = r_write_word_index.read(); 2286 r_write_to_cc_send_count = r_write_word_count.read(); 2287 2288 for(size_t i=0; i<m_words ; i++) r_write_to_cc_send_be[i]=r_write_be[i].read(); 2289 2290 size_t min = r_write_word_index.read(); 2291 size_t max = r_write_word_index.read() + r_write_word_count.read(); 2292 for(size_t i=min ; i<max ; i++) r_write_to_cc_send_data[i] = r_write_data[i]; 2293 2294 if((r_write_copy.read() != r_write_srcid.read()) or(r_write_pktid.read() == TYPE_SC) or 2278 2279 assert(not r_write_to_cc_send_multi_req.read() and 2280 not r_write_to_cc_send_brdcast_req.read() and 2281 "Error in VCI_MEM_CACHE : pending multicast or broadcast\n" 2282 "transaction in WRITE_UPT_REQ state" 2283 ); 2284 2285 r_write_to_cc_send_brdcast_req = false; 2286 r_write_to_cc_send_trdid = r_write_upt_index.read(); 2287 r_write_to_cc_send_nline = m_nline[(addr_t)(r_write_address.read())]; 2288 r_write_to_cc_send_index = r_write_word_index.read(); 2289 r_write_to_cc_send_count = r_write_word_count.read(); 2290 2291 for(size_t i=0; i<m_words ; i++) r_write_to_cc_send_be[i]=r_write_be[i].read(); 2292 2293 size_t min = r_write_word_index.read(); 2294 size_t max = r_write_word_index.read() + r_write_word_count.read(); 2295 for(size_t i=min ; i<max ; i++) r_write_to_cc_send_data[i] = r_write_data[i]; 2296 2297 if((r_write_copy.read() != r_write_srcid.read()) or(r_write_pktid.read() == TYPE_SC) or 2295 2298 #if L1_MULTI_CACHE 2296 2297 #endif 2298 2299 2300 2301 2302 2303 2299 (r_write_copy_cache.read() != r_write_pktid.read()) or 2300 #endif 2301 r_write_copy_inst.read()) 2302 { 2303 // put the first srcid in the fifo 2304 write_to_cc_send_fifo_put = true; 2305 write_to_cc_send_fifo_inst = r_write_copy_inst.read(); 2306 write_to_cc_send_fifo_srcid = r_write_copy.read(); 2304 2307 #if L1_MULTI_CACHE 2305 write_to_cc_send_fifo_cache_id= r_write_copy_cache.read(); 2306 #endif 2307 if(r_write_count.read() == 1) 2308 { 2309 r_write_fsm = WRITE_IDLE; 2310 r_write_to_cc_send_multi_req = true; 2311 } 2312 else 2313 { 2314 r_write_fsm = WRITE_UPT_NEXT; 2315 r_write_to_dec = false; 2316 2317 } 2308 write_to_cc_send_fifo_cache_id= r_write_copy_cache.read(); 2309 #endif 2310 if(r_write_count.read() == 1) 2311 { 2312 r_write_fsm = WRITE_IDLE; 2313 r_write_to_cc_send_multi_req = true; 2318 2314 } 2319 2315 else … … 2321 2317 r_write_fsm = WRITE_UPT_NEXT; 2322 2318 r_write_to_dec = false; 2323 } 2319 2320 } 2321 } 2322 else 2323 { 2324 r_write_fsm = WRITE_UPT_NEXT; 2325 r_write_to_dec = false; 2326 } 2324 2327 2325 2328 #if DEBUG_MEMC_WRITE 2326 if(m_debug_write_fsm) 2327 { 2328 std::cout << " <MEMC " << name() << " WRITE_UPT_REQ> Post first request to CC_SEND FSM" 2329 << " / srcid = " << std::dec << r_write_copy.read() 2330 << " / inst = " << std::dec << r_write_copy_inst.read() << std::endl; 2331 if(r_write_count.read() == 1) 2332 std::cout << " ... and this is the last" << std::endl; 2333 } 2334 #endif 2335 } 2329 if(m_debug_write_fsm) 2330 { 2331 std::cout 2332 << " <MEMC " << name() 2333 << " WRITE_UPT_REQ> Post first request to CC_SEND FSM" 2334 << " / srcid = " << std::dec << r_write_copy.read() 2335 << " / inst = " << std::dec << r_write_copy_inst.read() << std::endl; 2336 2337 if(r_write_count.read() == 1) 2338 std::cout << " ... and this is the last" << std::endl; 2339 } 2340 #endif 2336 2341 break; 2337 2342 }
Note: See TracChangeset
for help on using the changeset viewer.