Class MemoryBank

Constructor Detail

  • Method Detail

    • getMemoryFaultHandler

      public MemoryFaultHandler getMemoryFaultHandler()
      Returns:
      memory fault handler (may be null)
    • isBigEndian

      public boolean isBigEndian()
      Returns:
      true if memory bank is big endian
    • getPageSize

      public int getPageSize()
      A MemoryBank is instantiated with a \e natural page size. Requests for large chunks of data may be broken down into units of this size.
      Returns:
      the number of bytes in a page.
    • getInitializedMaskSize

      public int getInitializedMaskSize()
      Returns:
      the size of a page initialized mask in bytes. Each bit within the mask corresponds to a data byte within a page.
    • getSpace

      public AddressSpace getSpace()
      Returns:
      the AddressSpace associated with this bank.
    • getPage NEW

      protected abstract MemoryPage getPage​(long addr)
    • setPage NEW

      protected abstract void setPage​(long addr,
                                      byte[] val,
                                      int skip,
                                      int size,
                                      int bufOffset)
    • setPageInitialized NEW

      protected abstract void setPageInitialized​(long addr,
                                                 boolean initialized,
                                                 int skip,
                                                 int size,
                                                 int bufOffset)
    • setChunk

      public void setChunk​(long offset,
                           int size,
                           byte[] val)
    • setInitialized

      public void setInitialized​(long offset,
                                 int size,
                                 boolean initialized)
    • getChunk

      public int getChunk​(long addrOffset,
                          int size,
                          byte[] res,
                          boolean stopOnUnintialized)
    • constructValue

      public static long constructValue​(byte[] ptr,
                                        int offset,
                                        int size,
                                        boolean bigendian)
    • deconstructValue

      public static void deconstructValue​(byte[] ptr,
                                          int offset,
                                          long val,
                                          int size,
                                          boolean bigendian)