示例#1
0
  def __init__( self, memory, debug, reset_addr=0x400 ):
    Machine.__init__(self,
                     memory,
                     ArmRegisterFile( self, num_regs=16 ),
                     debug,
                     reset_addr=reset_addr )
    self.rf[ 15 ]  = self.pc

    # current program status register (CPSR)
    self.N    = r_uint( 0b0 )     # Negative condition
    self.Z    = r_uint( 0b0 )     # Zero condition
    self.C    = r_uint( 0b0 )     # Carry condition
    self.V    = r_uint( 0b0 )     # Overflow condition
    #self.J    = 0b0      # Jazelle state flag
    #self.I    = 0b0      # IRQ Interrupt Mask
    #self.F    = 0b0      # FIQ Interrupt Mask
    #self.T    = 0b0      # Thumb state flag
    #self.M    = 0b00000  # Processor Mode

    # processor modes:
    # 0b10000     usr
    # 0b10001     fiq
    # 0b10010     irq
    # 0b10011     svc (supervisor)
    # 0b10111     abt (abort)
    # 0b11011     und (undefined)
    # 0b11111     sys
    self.mode = r_uint( 0b10000 )

    # syscall stuff... TODO: should this be here?
    self.breakpoint = 0
示例#2
0
    def __init__(self, memory, debug, reset_addr=0x400):
        Machine.__init__(self,
                         memory,
                         ArmRegisterFile(self, num_regs=16),
                         debug,
                         reset_addr=reset_addr)
        self.rf[15] = self.pc

        # current program status register (CPSR)
        self.N = r_uint(0b0)  # Negative condition
        self.Z = r_uint(0b0)  # Zero condition
        self.C = r_uint(0b0)  # Carry condition
        self.V = r_uint(0b0)  # Overflow condition
        #self.J    = 0b0      # Jazelle state flag
        #self.I    = 0b0      # IRQ Interrupt Mask
        #self.F    = 0b0      # FIQ Interrupt Mask
        #self.T    = 0b0      # Thumb state flag
        #self.M    = 0b00000  # Processor Mode

        # processor modes:
        # 0b10000     usr
        # 0b10001     fiq
        # 0b10010     irq
        # 0b10011     svc (supervisor)
        # 0b10111     abt (abort)
        # 0b11011     und (undefined)
        # 0b11111     sys
        self.mode = r_uint(0b10000)

        # syscall stuff... TODO: should this be here?
        self.breakpoint = 0
示例#3
0
    def __init__(self, memory, debug, reset_addr=RESET_ADDR):
        Machine.__init__(self, memory, RegisterFile(constant_zero=False, num_regs=107), debug, reset_addr=RESET_ADDR)

        # Epiphany-specific flags.
        self.AN = False
        self.AZ = False
        self.AC = False
        self.AV = False
        self.AVS = False
        self.BN = False
        self.BZ = False
        self.BIS = False
        self.BUS = False
        self.BV = False
        self.BVS = False
示例#4
0
  def __init__( self, memory, debug, reset_addr=0x400):
    Machine.__init__(self, memory, RegisterFile(), debug, reset_addr=reset_addr )

    # parc special
    self.src_ptr  = 0
    self.sink_ptr = 0

    # indicate if this is running a self-checking test
    self.testbin  = False

    # executable name
    self.exe_name = ""

    # syscall stuff... TODO: should this be here?
    self.breakpoint = r_uint( 0 )