Ejemplo n.º 1
0
 def set(self,
         iaddr: str,
         address: SSV.SimAddress,
         srcval: SV.SimValue) -> None:
     for base in self.baseoffsets:
         if (
                 address.offsetvalue >= base
                 and address.offsetvalue < base + self.buffersize):
             address = address.add_offset(-base)
             SimMemory.set(self, iaddr, address, srcval)
             break
     else:
         raise SU.CHBSimError(
             self.simstate, iaddr, "Invalid shared memory address: " + str(address))
Ejemplo n.º 2
0
 def initialize(self, iaddr: str):
     addr = SSV.mk_global_address(0, "shared")
     for i in range(0, self.buffersize):
         SimMemory.set(self, iaddr, addr.add_offset(i), SV.simZerobyte)