diff -r 7ae5dc314c93 -r e4a74a266d2a configs/common/FSConfig.py --- a/configs/common/FSConfig.py Sat Aug 06 02:39:59 2011 -0500 +++ b/configs/common/FSConfig.py Sat Aug 06 02:44:17 2011 -0500 @@ -54,7 +54,7 @@ default = Self.badaddr_responder.pio -def makeLinuxAlphaSystem(mem_mode, mdesc = None): +def makeLinuxAlphaSystem(mem_mode, mdesc = None, Ruby = False): class BaseTsunami(Tsunami): ethernet = NSGigE(pci_bus=0, pci_dev=1, pci_func=0) ide = IdeController(disks=[Parent.disk0, Parent.disk2], @@ -65,21 +65,14 @@ # generic system mdesc = SysConfig() self.readfile = mdesc.script() - self.iobus = Bus(bus_id=0) - self.membus = MemBus(bus_id=1) - self.bridge = Bridge(delay='50ns', nack_delay='4ns') self.physmem = PhysicalMemory(range = AddrRange(mdesc.mem())) - self.bridge.side_a = self.iobus.port - self.bridge.side_b = self.membus.port - self.physmem.port = self.membus.port + self.disk0 = CowIdeDisk(driveID='master') self.disk2 = CowIdeDisk(driveID='master') self.disk0.childImage(mdesc.disk()) self.disk2.childImage(disk('linux-bigswap2.img')) + self.tsunami = BaseTsunami() - self.tsunami.attachIO(self.iobus) - self.tsunami.ide.pio = self.iobus.port - self.tsunami.ethernet.pio = self.iobus.port self.simple_disk = SimpleDisk(disk=RawDiskImage(image_file = mdesc.disk(), read_only = True)) self.intrctrl = IntrControl() @@ -90,55 +83,36 @@ self.console = binary('console') self.boot_osflags = 'root=/dev/hda1 console=ttyS0' - return self + if Ruby: + # Create pio bus to connect all device pio ports to rubymem's pio port + self.piobus = Bus(bus_id=0) -def makeLinuxAlphaRubySystem(mem_mode, mdesc = None): - class BaseTsunami(Tsunami): - ethernet = NSGigE(pci_bus=0, pci_dev=1, pci_func=0) - ide = IdeController(disks=[Parent.disk0, Parent.disk2], - pci_func=0, pci_dev=0, pci_bus=0) - - physmem = PhysicalMemory(range = AddrRange(mdesc.mem())) - self = LinuxAlphaSystem(physmem = physmem) - if not mdesc: - # generic system - mdesc = SysConfig() - self.readfile = mdesc.script() + # + # Pio functional accesses from devices need direct access to memory + # RubyPort currently does support functional accesses. Therefore + # provide the piobus a direct connection to physical memory + # + self.piobus.port = self.physmem.port + self.tsunami.attachIO(self.piobus) + self.tsunami.ide.pio = self.piobus.port + self.tsunami.ethernet.pio = self.piobus.port - # Create pio bus to connect all device pio ports to rubymem's pio port - self.piobus = Bus(bus_id=0) - - # - # Pio functional accesses from devices need direct access to memory - # RubyPort currently does support functional accesses. Therefore provide - # the piobus a direct connection to physical memory - # - self.piobus.port = physmem.port - - self.disk0 = CowIdeDisk(driveID='master') - self.disk2 = CowIdeDisk(driveID='master') - self.disk0.childImage(mdesc.disk()) - self.disk2.childImage(disk('linux-bigswap2.img')) - self.tsunami = BaseTsunami() - self.tsunami.attachIO(self.piobus) - self.tsunami.ide.pio = self.piobus.port - self.tsunami.ethernet.pio = self.piobus.port - - # - # Store the dma devices for later connection to dma ruby ports. - # Append an underscore to dma_devices to avoid the SimObjectVector check. - # - self._dma_devices = [self.tsunami.ide, self.tsunami.ethernet] - - self.simple_disk = SimpleDisk(disk=RawDiskImage(image_file = mdesc.disk(), - read_only = True)) - self.intrctrl = IntrControl() - self.mem_mode = mem_mode - self.terminal = Terminal() - self.kernel = binary('vmlinux') - self.pal = binary('ts_osfpal') - self.console = binary('console') - self.boot_osflags = 'root=/dev/hda1 console=ttyS0' + # + # Store the dma devices for later connection to dma ruby ports. + # Append an underscore to dma_devices to avoid the SimObjectVector + # check. + # + self._dma_devices = [self.tsunami.ide, self.tsunami.ethernet] + else: + self.iobus = Bus(bus_id=0) + self.membus = MemBus(bus_id=1) + self.bridge = Bridge(delay='50ns', nack_delay='4ns') + self.bridge.side_a = self.iobus.port + self.bridge.side_b = self.membus.port + self.physmem.port = self.membus.port + self.tsunami.attachIO(self.iobus) + self.tsunami.ide.pio = self.iobus.port + self.tsunami.ethernet.pio = self.iobus.port return self diff -r 7ae5dc314c93 -r e4a74a266d2a configs/example/fs.py --- a/configs/example/fs.py Sat Aug 06 02:39:59 2011 -0500 +++ b/configs/example/fs.py Sat Aug 06 02:44:17 2011 -0500 @@ -137,7 +137,7 @@ CPUClass.clock = options.clock if buildEnv['TARGET_ISA'] == "alpha": - test_sys = makeLinuxAlphaRubySystem(test_mem_mode, bm[0]) + test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0], True) elif buildEnv['TARGET_ISA'] == "x86": test_sys = makeLinuxX86System(test_mem_mode, options.num_cpus, bm[0], True) setWorkCountOptions(system, options)