Interface CoreModel

All Known Implementing Classes:
Core

public interface CoreModel
CoreModel is the viewer interface of the core. It exposes only the getters for the Core objects. This is used by UI components.
Since:
1.0 - 2021 / 08 / 23
Version:
1.0
Author:
Laurent Menten
  • Method Details

    • getDescriptor

      CoreDescriptor getDescriptor()
      Get the core descriptor of this device.
      Returns:
      the core descriptor
    • getDefaultConfig

      Properties getDefaultConfig(Properties config)
      Get the default configuration for this device. If the parameter is null a new Properties object is created.
      Parameters:
      config - a Properties object to receive the configuration or null
      Returns:
      a Properties object containing the definition
    • supportsInstruction

      boolean supportsInstruction(InstructionSet instruction)
      Checks if the core supports an instruction. The check is made against the core version as well as the specificity of the specific device.
      Parameters:
      instruction - the instruction
      Returns:
      true if instruction supported
    • supportsBootLoaderSection

      boolean supportsBootLoaderSection()
      Checks if the core supports boot loader sections.
      Returns:
      true if supported
    • getApplicationSectionBase

      int getApplicationSectionBase()
      Get the base address of the application section.
      Returns:
      the base address (in bytes) of the application section
    • getApplicationSectionSize

      int getApplicationSectionSize()
      Get the size of the application section. This is computed using the fuse's BOOTSZ bits value from the core configuration.
      Returns:
      the size (in bytes) of the application section
    • getBootLoaderSectionBase

      int getBootLoaderSectionBase()
      Get the base address of the boot loader section.
      Returns:
      the base address (in bytes) of the boot loader section
    • getBootLoaderSectionSize

      int getBootLoaderSectionSize()
      Get the size of the boot loader section. This is computed using the fuse's BOOTSZ bits value from the core configuration.
      Returns:
      the size (in bytes) of the boot loader section
    • supportsExternalMemoryFeature

      boolean supportsExternalMemoryFeature()
      Checks if the core supports external memory.
      Returns:
      true if supported
    • getExternalSramSize

      int getExternalSramSize()
      Get the size of the installed external memory from the core configuration.
      Returns:
      the size (in bytes) of the external memory
    • getProgramCounter

      int getProgramCounter()
      Get the current program counter value.
      Returns:
      the program counter value
    • getCurrentInstruction

      Instruction getCurrentInstruction()
      Get the current instruction (that is, the instruction pointed by the program counter).
      Returns:
      the instruction
    • getFollowingInstruction

      Instruction getFollowingInstruction()
      Get the instruction after current instruction.
      Returns:
      the instruction
    • getClockCyclesCounter

      long getClockCyclesCounter()
      Get the current clock cycles counter value.
      Returns:
      the clock cycles counter value
    • getCoreMode

      RunningMode getCoreMode()
      Get current device running mode.
      Returns:
      the mode
    • getInterruptsCount

      long getInterruptsCount()
      Get the total count of interrupts that were triggered so far.
      Returns:
      the count
    • getInterruptCount

      long getInterruptCount(int vector)
      Get the count of triggering that occurred for a specific interrupt vector so far.
      Parameters:
      vector - the vector
      Returns:
      the count
    • ioDebugRegisterDirty

      boolean ioDebugRegisterDirty()
      On-chip Debug Register.
      Returns:
    • getStatusRegisterCopy

      CoreStatusRegister getStatusRegisterCopy()

      Get a copy of the StatusRegister.

      A copy is given to allow full manipulation without any triggering of events.

      Returns:
      a copy of the StatusRegister
    • getStackPointer

      int getStackPointer()
      Get the current stack pointer value. This method abstracts differences among devices.
      Returns:
      the stack pointer value
    • getIndexRegisterValue

      int getIndexRegisterValue(IRegisterIndex r, boolean ext)
      Get the value of the X, Y or Z index register
      Parameters:
      r - the index register
      ext - true for extended register
      Returns:
      the value
    • getInstructionIndexRegisterValue

      int getInstructionIndexRegisterValue(boolean ext)
      Get the value of the instruction index register value.
      Parameters:
      ext - this for extended register
      Returns:
      the value
    • getRegister

      CoreRegister getRegister(IRegister reg)
      Get a General Purpose Register (R0-R31) by it register number
      Parameters:
      reg - the register identifier
      Returns:
      the register
    • getRegister

      CoreRegister getRegister(CoreControlRegister reg)
      Get a register.
      Parameters:
      reg - the register identifier
      Returns:
      the register
    • getRegister

      CoreRegister getRegister(String name)
      Get a register by its name.
      Parameters:
      name - the register name
      Returns:
      the register
    • getIORegisterByAddress

      CoreRegister getIORegisterByAddress(int address)
      Get an I/O Register by its address as passed to IN/OUT (0..63) or CBI/SBI/SBIC/SBIS (0..31) instructions.
      Parameters:
      address -
      Returns:
      the registe
    • getIORegisterByPhysicalAddress

      CoreRegister getIORegisterByPhysicalAddress(int address)
      Get an I/O Register by its physical address.
      Parameters:
      address -
      Returns:
      the register
    • getLockBits

      CoreRegister getLockBits(String name)
      Get a lock bits register by its name.
      Parameters:
      name -
      Returns:
    • getFuseByte

      CoreRegister getFuseByte(String name)
      Get a fuses register by its name.
      Parameters:
      name -
      Returns:
    • getFlashCell

      Instruction getFlashCell(int address)
      Get a memory cell from the flash program memory.
      Parameters:
      address -
      Returns:
      the memory cell
    • getSramCell

      CoreData getSramCell(int address)
      Get a memory cell from the sram data memory.
      Parameters:
      address -
      Returns:
    • getEepromCell

      CoreData getEepromCell(int address)
      Get a memory cell from the eeprom memory.
      Parameters:
      address -
      Returns:
    • getSymbol

      String getSymbol(CoreMemory memory, int address)
      Get the symbol for an address if any exists.
      Parameters:
      memory - the memory zone
      address - the address
      Returns:
      the symbol or null