Example #1
0
 def possibleDataWithCondition1(addr):
     """
     addr :: int
     return :: int
     
     """
     assert (isinstance(addr, int))
     firstOverlapPackS = None
     packId = self.totalNumPacks() - 1
     while packId >= 0:
         packS = self.packStateList()[packId]
         if (packS.isEnd() and packS.pack().isWrite()
                 and hasAddr(packS.pack(), addr)):
             firstOverlapPackS = packS
             break
         packId -= 1
     if firstOverlapPackS is None:
         return dataAt(self.fStorage(), addr)
     else:
         return dataAt(firstOverlapPackS.pack(), addr)
Example #2
0
 def possibleDataWithCondition1(addr):
     """
     addr :: int
     return :: int
     
     """
     assert(isinstance(addr, int))
     firstOverlapPackS = None
     packId = self.totalNumPacks() - 1
     while packId >= 0:
         packS = self.packStateList()[packId]
         if (packS.isEnd() and
             packS.pack().isWrite() and
             hasAddr(packS.pack(), addr)):
             firstOverlapPackS = packS
             break
         packId -= 1
     if firstOverlapPackS is None:
         return dataAt(self.fStorage(), addr)
     else:
         return dataAt(firstOverlapPackS.pack(), addr)
Example #3
0
 def f1(packS):
     assert (isinstance(packS, PackState))
     return (packS.isBegin() and packS.pack().isWrite()
             and hasAddr(packS.pack(), addr))
Example #4
0
 def checkValidAddr(self, addr):
     assert (isinstance(addr, int))
     assert (hasAddr(self.pack(), addr))
Example #5
0
 def f1(packS):
     assert(isinstance(packS, PackState))
     return (packS.isBegin() and 
             packS.pack().isWrite() and
             hasAddr(packS.pack(), addr))
Example #6
0
 def checkValidAddr(self, addr):
     assert(isinstance(addr, int))
     assert(hasAddr(self.pack(), addr))