示例#1
0
class LupioBLK(DmaDevice):

    type = 'LupioBLK'
    cxx_class = 'gem5::LupioBLK'
    cxx_header = 'dev/lupio/lupio_blk.hh'
    pio_size = Param.Addr(0x1000, "PIO Size")
    image = Param.DiskImage("Disk image")
    pio_addr = Param.Addr("Device Address")
    latency = Param.Latency('0ns', "DMA Device Latency")
    platform = Param.Platform(Parent.any, "Platform this device is part of.")
    int_id = Param.Int("Interrupt ID for the PIC to use")
示例#2
0
class LupioIPI(BasicPioDevice):
    type = 'LupioIPI'
    cxx_class='gem5::LupioIPI'
    cxx_header = 'dev/lupio/lupio_ipi.hh'
    pio_size = Param.Addr(0x1000, "PIO Size")
    int_type = Param.Int("Type of interrupt")
    num_threads = Param.Int("Number of threads")
示例#3
0
class LupioTMR(BasicPioDevice):
    type = 'LupioTMR'
    cxx_class = 'gem5::LupioTMR'
    cxx_header = 'dev/lupio/lupio_tmr.hh'
    pio_size = Param.Addr(0x1000, "PIO Size")
    num_threads = Param.Int("Number of threads in the system.")
    int_type = Param.Int("Type of interrupt.")
示例#4
0
class GenericTimerMem(PioDevice):
    """
System level implementation. It provides three main components:
- Memory-mapped counter module: controls the system timer through the
  CNTControlBase frame, and provides its value through the CNTReadBase frame
- Memory-mapped timer control module: controls the memory-mapped timers
- Memory-mapped timers: implementations of the GenericTimer for system
  peripherals

Reference:
    Arm ARM (ARM DDI 0487E.a)
    I2 - System Level Implementation of the Generic Timer
    """

    type = 'GenericTimerMem'
    cxx_header = "dev/arm/generic_timer.hh"
    cxx_class = 'gem5::GenericTimerMem'

    _freq_in_dtb = False

    counter = Param.SystemCounter(Parent.any, "Global system counter")

    cnt_control_base = Param.Addr("CNTControlBase register frame base")
    cnt_read_base = Param.Addr("CNTReadBase register frame base")
    cnt_ctl_base = Param.Addr("CNTCTLBase register frame base")

    # Maximum of 8 timer frames
    frames = VectorParam.GenericTimerFrame([], "Memory-mapped timer frames")

    def generateDeviceTree(self, state):
        node = self.generateBasicPioDeviceNode(state, "timer",
                                               self.cnt_ctl_base, 0x1000)
        node.appendCompatible(["arm,armv7-timer-mem"])
        node.append(state.addrCellsProperty())
        node.append(state.sizeCellsProperty())
        node.append(FdtProperty("ranges"))

        if self._freq_in_dtb:
            node.append(self.counter.unproxy(self).generateDtb())

        gic = self._parent.unproxy(self).gic

        for i, frame in enumerate(self.frames):
            frame._frame_num = i
            node.append(frame.generateDeviceTree(state, gic))

        yield node
示例#5
0
class LupioTTY(BasicPioDevice):
    type = 'LupioTTY'
    cxx_class = 'gem5::LupioTTY'
    cxx_header = "dev/lupio/lupio_tty.hh"
    terminal = Param.SerialDevice(Parent.any, "The terminal")
    pio_size = Param.Addr(0x1000, "PIO size")
    platform = Param.Platform(Parent.any,
                              "Platform this device is part of.")
    int_id = Param.Int("Interrupt ID for the PIC to use")
示例#6
0
class LupioPIC(BasicPioDevice):

    type = 'LupioPIC'
    cxx_class = 'gem5::LupioPIC'
    cxx_header = 'dev/lupio/lupio_pic.hh'
    pio_size = Param.Addr(0x1000, "PIO Size")
    n_src = Param.Int("Number of interrupt sources")
    num_threads = Param.Int("Number of threads")
    int_type = Param.Int("Type of interrupt")
示例#7
0
class LupioRNG(BasicPioDevice):

    type = 'LupioRNG'
    cxx_class='gem5::LupioRNG'
    cxx_header = 'dev/lupio/lupio_rng.hh'
    pio_size = Param.Addr(0x1000, "PIO Size")
    seed = Param.Int(0, "Initial seed for the random number generator")
    platform = Param.Platform(Parent.any,
                              "Platform this device is part of.")
    int_id = Param.Int("Interrupt ID to be used by the PIC")
示例#8
0
class GenericTimerFrame(PioDevice):
    """
Memory-mapped timer frame implementation. Controlled from GenericTimerMem,
may be used by peripherals without a system register interface.

Reference:
    Arm ARM (ARM DDI 0487E.a)
    I2.3.2 - The CNTBaseN and CNTEL0BaseN frames
    """

    type = 'GenericTimerFrame'
    cxx_header = "dev/arm/generic_timer.hh"
    cxx_class = 'gem5::GenericTimerFrame'

    _frame_num = 0

    counter = Param.SystemCounter(Parent.any, "Global system counter")

    cnt_base = Param.Addr("CNTBase register frame base")
    cnt_el0_base = Param.Addr(MaxAddr, "CNTEL0Base register frame base")

    int_phys = Param.ArmSPI("Physical Interrupt")
    int_virt = Param.ArmSPI("Virtual Interrupt")

    def generateDeviceTree(self, state, gic):
        node = FdtNode("frame@{:08x}".format(self.cnt_base.value))
        node.append(FdtPropertyWords("frame-number", self._frame_num))

        ints = self.int_phys.generateFdtProperty(gic)
        if self.int_virt != NULL:
            ints.extend(self.int_virt.generateFdtProperty(gic))
        node.append(FdtPropertyWords("interrupts", ints))

        reg = state.addrCells(self.cnt_base) + state.sizeCells(0x1000)
        if self.cnt_el0_base.value != MaxAddr:
            reg.extend(
                state.addrCells(self.cnt_el0_base) + state.sizeCells(0x1000))
        node.append(FdtPropertyWords("reg", reg))

        return node
示例#9
0
class LupioRTC(BasicPioDevice):
    type = 'LupioRTC'
    cxx_class = 'gem5::LupioRTC'
    cxx_header = 'dev/lupio/lupio_rtc.hh'
    time = Param.Time('01/01/2020', "Initial system time to use")
    pio_size = Param.Addr(0x1000, "PIO Size")
示例#10
0
class LupioSYS(BasicPioDevice):
    type = 'LupioSYS'
    cxx_class = 'gem5::LupioSYS'
    cxx_header = 'dev/lupio/lupio_sys.hh'
    pio_size = Param.Addr(0x1000, "PIO Size")