Changeset 513
- Timestamp:
- Sep 3, 2013, 4:16:40 PM (11 years ago)
- Location:
- branches/RWT/modules/vci_cc_vcache_wrapper/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h
r495 r513 636 636 sc_signal<bool> r_dcache_llsc_valid; 637 637 638 639 sc_signal<bool> r_cache_frozen; 640 638 641 //////////////////////////////// 639 642 // Activity counters … … 801 804 void clear_stats(); 802 805 void print_trace(size_t mode = 0); 806 bool frozen(); 803 807 void cache_monitor(paddr_t addr); 804 808 void start_monitor(paddr_t,paddr_t); -
branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r495 r513 2033 2033 2034 2034 // Switch slot state to ZOMBI and send CLEANUP command 2035 r_icache.write_dir( 0, 2036 r_icache_cc_way.read(), 2035 r_icache.write_dir( r_icache_cc_way.read(), 2037 2036 r_icache_cc_set.read(), 2038 2037 CACHE_SLOT_STATE_ZOMBI ); … … 2913 2912 } 2914 2913 } 2914 #if DEBUG_DCACHE 2915 if ( m_debug_activated ) 2916 std::cout << " <PROC " << name() << " DCACHE_IDLE>" 2917 << " WRITE REQ " 2918 << " / wbuf_request = " << wbuf_request 2919 << " / updt_request = " << updt_request 2920 << " / cache_state = " << cache_state 2921 << " / PADDR = " << std::hex << paddr << std::endl; 2922 #endif 2923 2915 2924 } // end WRITE 2916 2925 … … 3940 3949 r_dcache_miss_set = set; 3941 3950 r_dcache_cc_cleanup_line_ncc = true; 3942 //if (r_dcache_content_state[m_dcache_sets*way+set] != LINE_CACHE_DATA_NOT_DIRTY)//Must send data in the cleanup3943 if (true)//Must send data in the cleanup3951 if (r_dcache_content_state[m_dcache_sets*way+set] != LINE_CACHE_DATA_NOT_DIRTY)//Must send data in the cleanup 3952 //if (true)//Must send data in the cleanup 3944 3953 { 3945 3954 r_dcache_xtn_flush_addr_data = (tag * m_dcache_sets + set) * m_dcache_words * 4; … … 4189 4198 { 4190 4199 r_dcache_cc_cleanup_line_ncc = true; 4191 //if ((r_dcache_content_state[way*m_dcache_sets+set] != LINE_CACHE_DATA_NOT_DIRTY)) //must send data4192 if (true) //must send data4200 if ((r_dcache_content_state[way*m_dcache_sets+set] != LINE_CACHE_DATA_NOT_DIRTY)) //must send data 4201 //if (true) //must send data 4193 4202 { 4194 4203 r_dcache_cc_cleanup_updt_data = true; … … 4334 4343 bool s_cleanup_updt_data = false; 4335 4344 bool s_cleanup_line_ncc = false; 4345 uint32_t mask = 0; 4336 4346 4337 4347 #ifdef INSTRUMENTATION … … 4360 4370 s_cleanup_line_ncc = true; 4361 4371 r_dcache_miss_data_addr = (victim*m_dcache_words)*4; 4362 //if ((r_dcache_content_state[way*m_dcache_sets+set] != LINE_CACHE_DATA_NOT_DIRTY))//must send data4363 if (true)//must send data4372 if ((r_dcache_content_state[way*m_dcache_sets+set] != LINE_CACHE_DATA_NOT_DIRTY))//must send data 4373 //if (true)//must send data 4364 4374 { 4365 4375 s_cleanup_updt_data = true; … … 4368 4378 m_cpt_cleanup_data_dirty_word += r_dcache_dirty_word[(m_dcache_sets*way+set)*m_dcache_words + w]; 4369 4379 } 4380 mask = r_dcache.get_cache_mask(way, set); 4381 // std::cout << "found a vcitim ncc dirty mask = " << mask << std::endl; 4370 4382 r_dcache_fsm = DCACHE_MISS_DATA; 4371 4383 } … … 4373 4385 { 4374 4386 s_cleanup_updt_data = false; 4387 mask = r_dcache.get_cache_mask(way, set); 4388 // std::cout << "found a vcitim ncc non dirty mask = " << mask << std::endl; 4375 4389 } 4376 4390 … … 4401 4415 r_dcache_cleanup_victim_updt_data = s_cleanup_updt_data; 4402 4416 r_dcache_cleanup_victim_line_ncc = s_cleanup_line_ncc; 4403 std::cout << " <PROC " << name()4404 << "/ CYCLE = "4405 << m_cpt_total_cycles4406 << std :: endl;4407 4417 } 4408 4418 } … … 4662 4672 { 4663 4673 r_dcache_fsm = DCACHE_MISS_DIR_UPDT; 4674 r_dcache.reset_cache_mask(r_dcache_miss_way.read(), r_dcache_miss_set.read()); 4664 4675 } 4665 4676 } … … 5097 5108 if ( m_debug_activated ) 5098 5109 { 5099 std::cout << " <PROC " << name() 5110 std::cout << " <PROC " << name() << std::hex 5100 5111 << " DCACHE_CC_CHECK> paddr = " << paddr 5101 5112 << " r_dcache_vci_paddr = " << r_dcache_vci_paddr.read() … … 5107 5118 << " ((r_dcache_vci_paddr.read() & mask) == (paddr & mask)) = " 5108 5119 << ((r_dcache_vci_paddr.read() & mask) == (paddr & mask)) 5109 << std::endl;5120 << std::dec <<std::endl; 5110 5121 } 5111 5122 #endif … … 5273 5284 int cache_state = r_dcache_cc_state.read(); 5274 5285 bool dirty_save = false; 5286 uint32_t mask = 0; 5275 5287 5276 5288 if (r_dcache_cc_need_write.read()) … … 5329 5341 { 5330 5342 r_dcache_cc_cleanup_line_ncc = true; 5331 //if ((r_dcache_content_state[way*m_dcache_sets+set] != LINE_CACHE_DATA_NOT_DIRTY) or r_dcache_dirty_save.read() or dirty_save) //must send data5332 if (true) //must send data5343 if ((r_dcache_content_state[way*m_dcache_sets+set] != LINE_CACHE_DATA_NOT_DIRTY) or r_dcache_dirty_save.read() or dirty_save) //must send data 5344 //if (true) //must send data 5333 5345 { 5334 5346 r_dcache_cc_cleanup_updt_data = true; … … 5337 5349 m_cpt_cleanup_data_dirty_word += r_dcache_dirty_word[(m_dcache_sets*way+set)*m_dcache_words + w]; 5338 5350 } 5351 5352 mask = r_dcache.get_cache_mask(way, set); 5353 // std::cout << "cc inval ncc dirty mask = " << mask << std::endl; 5354 5339 5355 r_dcache_fsm = DCACHE_CC_INVAL_DATA; 5340 5356 } 5341 5357 else 5342 5358 { 5359 r_dcache.write_dir( way, 5360 set, 5361 CACHE_SLOT_STATE_ZOMBI ); 5362 5363 mask = r_dcache.get_cache_mask(way, set); 5364 // std::cout << "cc inval ncc non dirty mask = " << mask << std::endl; 5365 5343 5366 r_dcache_cc_cleanup_updt_data = false; 5344 5367 r_dcache_fsm = r_dcache_fsm_cc_save.read();
Note: See TracChangeset
for help on using the changeset viewer.