Changeset 290 for trunk/modules/vci_mem_cache_v4/caba/source/src
- Timestamp:
- Jan 25, 2013, 4:52:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp
r289 r290 3701 3701 bool match = match_srcid && match_inst; 3702 3702 3703 if (not r_cleanup_is_cnt.read() and not match) { 3704 std::cout 3705 << "VCI_MEM_CACHE ERROR : Cleanup request on a valid" 3706 << "entry using linked list mode with no corresponding" 3707 << "directory or heap entry" 3708 << std::endl; 3709 3710 exit(1); 3711 } 3712 3703 3713 // update the cache directory (for the copies) 3704 3714 DirectoryEntry entry; 3705 entry.valid = true; 3706 entry.is_cnt = r_cleanup_is_cnt.read(); 3707 entry.dirty = r_cleanup_dirty.read(); 3708 entry.tag = r_cleanup_tag.read(); 3709 entry.lock = r_cleanup_lock.read(); 3710 entry.ptr = r_cleanup_ptr.read(); 3711 3712 if ( r_cleanup_is_cnt.read() ) // counter mode 3713 { 3714 entry.count = r_cleanup_count.read() -1; 3715 entry.owner.srcid = 0; 3715 entry.valid = true; 3716 entry.is_cnt = r_cleanup_is_cnt.read(); 3717 entry.dirty = r_cleanup_dirty.read(); 3718 entry.tag = r_cleanup_tag.read(); 3719 entry.lock = r_cleanup_lock.read(); 3720 entry.ptr = r_cleanup_ptr.read(); 3721 entry.count = r_cleanup_count.read() - 1; 3722 entry.owner.srcid = 0; 3723 entry.owner.inst = 0; 3716 3724 #if L1_MULTI_CACHE 3717 entry.owner.cache_id= 0; 3718 #endif 3719 entry.owner.inst = 0; 3720 // response to the cache 3721 r_cleanup_fsm = CLEANUP_RSP; 3722 } 3723 else // linked_list mode 3724 { 3725 if ( match ) // hit 3726 { 3727 entry.count = 0; // no more copy 3728 entry.owner.srcid = 0; 3729 #if L1_MULTI_CACHE 3730 entry.owner.cache_id=0; 3731 #endif 3732 entry.owner.inst = 0; 3733 r_cleanup_fsm = CLEANUP_RSP; 3734 } 3735 else // miss 3736 { 3737 entry.count = r_cleanup_count.read(); 3738 entry.owner.srcid = r_cleanup_copy.read(); 3739 #if L1_MULTI_CACHE 3740 entry.owner.cache_id = r_cleanup_copy_cache.read(); 3741 #endif 3742 entry.owner.inst = r_cleanup_copy_inst.read(); 3743 r_cleanup_fsm = CLEANUP_UPT_LOCK; 3744 } 3745 } 3725 entry.owner.cache_id = 0; 3726 #endif 3727 3746 3728 m_cache_directory.write(set, way, entry); 3729 3730 r_cleanup_fsm = CLEANUP_RSP; 3747 3731 3748 3732 #if DEBUG_MEMC_CLEANUP
Note: See TracChangeset
for help on using the changeset viewer.