Ejemplo n.º 1
0
    def __init__(self, opts):
        super(MySystem, self).__init__()
        self._opts = opts

        self.clk_domain = SrcClockDomain()
        self.clk_domain.clock = '3GHz'
        self.clk_domain.voltage_domain = VoltageDomain()

        mem_size = '3GB'
        self.mem_ranges = [
            AddrRange(mem_size),
            AddrRange(0xC0000000, size=0x100000),
        ]

        self.membus = SystemXBar()
        self.membus.badaddr_responder = BadAddr()
        self.membus.default = self.membus.badaddr_responder.pio

        self.system_port = self.membus.slave

        x86.init_fs(self, self.membus)

        self.kernel = '/dist/m5/system/binaries/x86_64-vmlinux-2.6.22.9'

        boot_options = [
            'earlyprintk = ttyS0', 'console=ttyS0', 'lpj=7999923',
            'root=/dev/hda1'
        ]
        self.boot_osflags = ' '.join(boot_options)

        self.setDiskImage('/dist/m5/system/disks/linux-x86.img')
        self.createCPU()
        self.createCacheHierarchy()
        #self.setupInterrupts()
        self.createMemoryControllers()
Ejemplo n.º 2
0
    def __init__(self, opts):
        super(MySystem, self).__init__()
        self._opts = opts
        np = int(opts.n)  # number of processors stored in np
        # Set up the clock domain and the voltage domain
        self.clk_domain = SrcClockDomain()
        self.clk_domain.clock = '3GHz'
        self.clk_domain.voltage_domain = VoltageDomain()

        # For x86, there is an I/O gap from 3GB to 4GB.
        # We can have at most 3GB of memory unless we do something special
        # to account for this I/O gap. For simplicity, this is omitted.
        mem_size = '512MB'
        self.mem_ranges = [
            AddrRange(mem_size),
            AddrRange(0xC0000000, size=0x100000),  # For I/0
        ]

        # Create the main memory bus
        # This connects to main memory
        self.membus = SystemXBar()
        self.membus.badaddr_responder = BadAddr()
        self.membus.default = self.membus.badaddr_responder.pio

        # Set up the system port for functional access from the simulator
        self.system_port = self.membus.slave

        # This will initialize most of the x86-specific system parameters
        # This includes things like the I/O, multiprocessor support, BIOS...
        x86.init_fs(self, self.membus, np)

        # Change this path to point to the kernel you want to use
        # Kernel from http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2
        self.kernel = '../temp/old/CS757/binaries/x86_64-vmlinux-2.6.22.9'
        #self.kernel = '../temp/linux-bigswap2.img'
        # Options specified on the kernel command line
        boot_options = [
            'earlyprintk=ttyS0', 'console=ttyS0', 'lpj=7999923',
            'root=/dev/hda1'
        ]
        self.boot_osflags = ' '.join(boot_options)

        # Replace these paths with the path to your disk images.
        # The first disk is the root disk. The second could be used for swap
        # or anything else.
        # Disks from http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2
        self.setDiskImage('../temp/x86root.img')

        # Create the CPU for our system.
        self.createCPU()

        # Create the cache heirarchy for the system.
        self.createCacheHierarchy()

        # Create the memory controller for the sytem
        self.createMemoryControllers()

        # Set up the interrupt controllers for the system (x86 specific)
        self.setupInterrupts()
Ejemplo n.º 3
0
    def __init__(self, opts):
        super(MySystem, self).__init__()
        self._opts = opts
        np= int(opts.n) # number of processors stored in np
        # Set up the clock domain and the voltage domain
        self.clk_domain = SrcClockDomain()
        self.clk_domain.clock = '3GHz'
        self.clk_domain.voltage_domain = VoltageDomain()

        # For x86, there is an I/O gap from 3GB to 4GB.
        # We can have at most 3GB of memory unless we do something special
        # to account for this I/O gap. For simplicity, this is omitted.
        mem_size = '512MB'
        self.mem_ranges = [AddrRange(mem_size),
                           AddrRange(0xC0000000, size=0x100000), # For I/0
                           ]

        # Create the main memory bus
        # This connects to main memory
        self.membus = SystemXBar()
        self.membus.badaddr_responder = BadAddr()
        self.membus.default = self.membus.badaddr_responder.pio

        # Set up the system port for functional access from the simulator
        self.system_port = self.membus.slave

        # This will initialize most of the x86-specific system parameters
        # This includes things like the I/O, multiprocessor support, BIOS...
        x86.init_fs(self, self.membus, np)

        # Change this path to point to the kernel you want to use
        # Kernel from http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2
        self.kernel = '../temp/old/CS757/binaries/x86_64-vmlinux-2.6.22.9'
        #self.kernel = '../temp/linux-bigswap2.img'
        # Options specified on the kernel command line
        boot_options = ['earlyprintk=ttyS0', 'console=ttyS0', 'lpj=7999923',
                        'root=/dev/hda1']
        self.boot_osflags = ' '.join(boot_options)

        # Replace these paths with the path to your disk images.
        # The first disk is the root disk. The second could be used for swap
        # or anything else.
        # Disks from http://www.m5sim.org/dist/current/x86/x86-system.tar.bz2
        self.setDiskImage('../temp/x86root.img')

        # Create the CPU for our system.
        self.createCPU()

        # Create the cache heirarchy for the system.
        self.createCacheHierarchy()

        # Create the memory controller for the sytem
        self.createMemoryControllers()

        # Set up the interrupt controllers for the system (x86 specific)
        self.setupInterrupts()
Ejemplo n.º 4
0
    def __init__(self, opts):
        super(MySystem, self).__init__()
        self._opts = opts
        
        self.clk_domain = SrcClockDomain()
        self.clk_domain.clock = '3GHz'
        self.clk_domain.voltage_domain = VoltageDomain()

        mem_size = '3GB'
        self.mem_ranges = [AddrRange(mem_size),
                           AddrRange(0xC0000000, size=0x200000) # PCIe and I/O ////////
                           ]

        self.membus = SystemXBar()
        self.membus.badaddr_responder = BadAddr()
        self.membus.default = self.membus.badaddr_responder.pio

        self.system_port = self.membus.slave

        # initialize x86 system
        x86.init_fs(self, self.membus)

        self.kernel = '/root/images/baseTDNN/vmlinux-5.2.3'
        #self.kernel = '/root/Gem5-PCI-Express/vmlinux' # only works for ARM system I think
        
        boot_options = ['earlyprintk=ttyS0', 'console=ttyS0', 'lpj=7999923', 'root=/dev/hda1']

        self.boot_osflags = ' '.join(boot_options)

        self.setDiskImage('/root/images/miniDNN/linux-x86.img')

        self.createCPU()

        self.createCacheHierarchy()

        self.createMemoryControllers()

        self.setupInterrupts()