Skip to content

Commit

Permalink
fix mapper read/write of ext for "mmio" refs
Browse files Browse the repository at this point in the history
  • Loading branch information
bdcht committed Mar 4, 2024
1 parent 5bdc6ba commit cd95a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amoco/cas/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _Mem_read(self, a, l, endian=1):
if p._is_def == 0:
# p is "bottom":
p = mem(a, p.size, disp=cur)
elif p._is_ext and p._subrefs.get("mmio_r",None):
elif p.etype==et_ext and p._subrefs.get("mmio_r",None):
p = p.stub(self,mode="r")
P.append(p)
cur += plen
Expand All @@ -237,7 +237,7 @@ def _Mem_write(self, a, v, endian=1):
oldv = self.__Mem.read(l,len(v))[0]
except MemoryError:
oldv = l
if isinstance(oldv,ext) and oldv._subrefs.get("mmio_w",None):
if oldv.etype==et_ext and oldv._subrefs.get("mmio_w",None):
oldv.stub(self,mode="w")
else:
self.__Mem.write(l, v, endian)
Expand Down

0 comments on commit cd95a61

Please sign in to comment.