src/CacheSim/SystemMemoryManager.py
def read(self,address):
        '''Method returns the value in the given address.  It will
        check to see if the address is a hit in the cache and if not
        load it into the cache. '''
        print('\nREAD {0:x}'.format(address))
        if self.cache.checkCache(address):
            print('HIT')
            print('Value {0:x}'.format(self.cache.getAddressValue(address)))

        else:
            print('MISS')
            #Write Back to main Memory if current row is dirty
            if self.cache.isDirty(address):
                # print("CACHE DIRTY Writing back to MM")
                cacheBlock = self.cache.getBlock(address)
                self.memory.writeBlock(cacheBlock)
            newRow = self.memory.getBlock(address)
            self.cache.insertBlock(newRow)
            print('Value {0:x}'.format(self.cache.getAddressValue(address)))
Method returns the value in the given address.  It will
        check to see if the address is a hit in the cache and if not
        load it into the cache. 
Method returns the value in the given address.  It will
check to see if the address is a hit in the cache and if not
load it into the cache.
Method returns the value in the given address . It will check to see if the address is a hit in the cache and if not load it into the cache .
def read(self,address):
        print('\nREAD {0:x}'.format(address))
        if self.cache.checkCache(address):
            print('HIT')
            print('Value {0:x}'.format(self.cache.getAddressValue(address)))
        else:
            print('MISS')
            if self.cache.isDirty(address):
                cacheBlock = self.cache.getBlock(address)
                self.memory.writeBlock(cacheBlock)
            newRow = self.memory.getBlock(address)
            self.cache.insertBlock(newRow)
            print('Value {0:x}'.format(self.cache.getAddressValue(address)))
def read ( self , address ) : print ( '\nREAD {0:x}' . format ( address ) ) if self . cache . checkCache ( address ) : print ( 'HIT' ) print ( 'Value {0:x}' . format ( self . cache . getAddressValue ( address ) ) ) else : print ( 'MISS' ) if self . cache . isDirty ( address ) : cacheBlock = self . cache . getBlock ( address ) self . memory . writeBlock ( cacheBlock ) newRow = self . memory . getBlock ( address ) self . cache . insertBlock ( newRow ) print ( 'Value {0:x}' . format ( self . cache . getAddressValue ( address ) ) )
Method returns the value in the given address.
Method returns the value in the given address .
'''Method returns the value in the given address.  It will
        check to see if the address is a hit in the cache and if not
        load it into the cache. ''' #Write Back to main Memory if current row is dirty # print("CACHE DIRTY Writing back to MM")
self
address