Changeset 101 for trunk/IPs/systemC/Environment/Cache
- Timestamp:
- Jan 15, 2009, 6:19:08 PM (16 years ago)
- Location:
- trunk/IPs/systemC/Environment/Cache
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Cache/include/Cache_OneLevel.h
r81 r101 32 32 33 33 34 public : void reset (void); 35 public : void transition (void); 36 private : void update_lru (uint32_t familly, uint32_t num_associativity); 37 private : uint32_t index_victim (uint32_t familly); 38 private : Address translate_address (uint32_t address); 39 public : type_rsp_cache_t access (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir); 40 private : type_rsp_cache_t access_cached (uint32_t num_port, uint32_t address, uint32_t trdid, direction_req_cache_t dir); 41 private : type_rsp_cache_t access_uncached (uint32_t num_port, uint32_t address, uint32_t trdid); 42 private : type_rsp_cache_t access_invalidate (uint32_t num_port, uint32_t address, uint32_t trdid); 43 private : type_rsp_cache_t access_flush (uint32_t num_port, uint32_t address, uint32_t trdid); 44 private : uint32_t hit_write_buffer (uint32_t trdid, Address address); 45 private : uint32_t hit_cache (uint32_t trdid, Address address); 46 private : uint32_t hit_access_port (uint32_t trdid, Address address); 47 public : uint32_t need_slot (void); 48 public : uint32_t latence (uint32_t num_port); 49 public : uint32_t update_latence (uint32_t num_port, uint32_t latence); 50 public : std::string information (uint32_t depth); 34 public : void reset (void); 35 public : void transition (void); 36 private : void update_lru (uint32_t familly, uint32_t num_associativity); 37 private : uint32_t index_victim (uint32_t familly); 38 private : Address translate_address (uint32_t address); 39 public : type_rsp_cache_t access (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir); 40 private : type_rsp_cache_t access_cached (uint32_t num_port, uint32_t address, uint32_t trdid, direction_req_cache_t dir); 41 private : type_rsp_cache_t access_uncached (uint32_t num_port, uint32_t address, uint32_t trdid); 42 private : type_rsp_cache_t access_invalidate (uint32_t num_port, uint32_t address, uint32_t trdid); 43 private : type_rsp_cache_t access_flush (uint32_t num_port, uint32_t address, uint32_t trdid); 44 private : type_rsp_cache_t access_lock (uint32_t num_port, uint32_t address, uint32_t trdid); 45 private : type_rsp_cache_t access_prefetch (uint32_t num_port, uint32_t address, uint32_t trdid); 46 private : type_rsp_cache_t access_synchronization (uint32_t num_port, uint32_t address, uint32_t trdid); 47 private : uint32_t hit_write_buffer (uint32_t trdid, Address address); 48 private : uint32_t hit_cache (uint32_t trdid, Address address); 49 private : uint32_t hit_access_port (uint32_t trdid, Address address); 50 public : uint32_t need_slot (void); 51 public : uint32_t latence (uint32_t num_port); 52 public : uint32_t update_latence (uint32_t num_port, uint32_t latence); 53 public : std::string information (uint32_t depth); 51 54 52 55 public : friend std::ostream& operator<< (std::ostream& output, Cache_OneLevel & x); -
trunk/IPs/systemC/Environment/Cache/include/Types.h
r81 r101 32 32 typedef enum 33 33 { 34 CACHED , // address can be in the cache 35 UNCACHED , // Always miss (not address in cache) 36 INVALIDATE , // The direction is not used 37 PREFETCH , // The direction is not used 38 FLUSH // The direction is not used 34 CACHED , // address can be in the cache 35 UNCACHED , // Always miss (not address in cache) 36 INVALIDATE , // The direction is not used 37 PREFETCH , // The direction is not used 38 FLUSH , // The direction is not used 39 LOCK , // The direction is not used 40 SYNCHRONIZATION // The direction is not used 39 41 } type_req_cache_t; 40 42 -
trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp
r81 r101 20 20 // << " * direction : " << dir << std::endl; 21 21 22 // no difference with the simple read cached (have no add a prefetch cache) 22 23 switch (type) 23 24 { 24 case UNCACHED : return access_uncached (num_port,address,trdid ); break; 25 case INVALIDATE : return access_invalidate (num_port,address,trdid ); break; 26 case FLUSH : return access_flush (num_port,address,trdid ); break; 27 case PREFETCH : // no difference with the simple read cached (have no add a prefetch cache) 28 case CACHED : return access_cached (num_port,address,trdid,dir); break; 29 default : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break; 25 case UNCACHED : return access_uncached (num_port,address,trdid ); break; 26 case INVALIDATE : return access_invalidate (num_port,address,trdid ); break; 27 case FLUSH : return access_flush (num_port,address,trdid ); break; 28 case PREFETCH : return access_prefetch (num_port,address,trdid ); break; 29 case LOCK : return access_lock (num_port,address,trdid ); break; 30 case SYNCHRONIZATION : return access_synchronization (num_port,address,trdid ); break; 31 case CACHED : return access_cached (num_port,address,trdid,dir); break; 32 default : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break; 30 33 } 31 34 }
Note: See TracChangeset
for help on using the changeset viewer.