Class UniqueMemoryBank


  • public class UniqueMemoryBank
    extends MemoryBank
    An subclass of MemoryBank intended for modeling the "unique" memory space. The space is byte-addressable and paging is not supported.
    • Field Detail

      • map

        protected MapSTL<java.lang.Long,​UniqueMemoryBank.WordInfo> map
        A map from Long offsets to byte values would require many lookups. As an optimization, this map is defined from Long values to UniqueMemoryBank.WordInfo objects, each of which represents an eight-byte word of memory. Each key in this map must be 0 mod 8.
    • Constructor Detail

      • UniqueMemoryBank

        public UniqueMemoryBank​(AddressSpace spc,
                                boolean isBigEndian)
    • Method Detail

      • setPage

        protected void setPage​(long addr,
                               byte[] val,
                               int skip,
                               int size,
                               int bufOffset)
        Specified by:
        setPage in class MemoryBank
      • setPageInitialized

        protected void setPageInitialized​(long addr,
                                          boolean initialized,
                                          int skip,
                                          int size,
                                          int bufOffset)
        Specified by:
        setPageInitialized in class MemoryBank
      • getChunk

        public int getChunk​(long offset,
                            int size,
                            byte[] dest,
                            boolean stopOnUninitialized)
        Overrides:
        getChunk in class MemoryBank
      • setChunk

        public void setChunk​(long offset,
                             int size,
                             byte[] src)
        Overrides:
        setChunk in class MemoryBank
      • clear

        public void clear()
        Clear unique storage at the start of an instruction