fs.py (3476:0e26b5458236) | fs.py (3481:14362d3b0756) |
---|---|
1# Copyright (c) 2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 58 unchanged lines hidden (view full) --- 67 print "Error: script doesn't take any positional arguments" 68 sys.exit(1) 69 70# driver system CPU is always simple... note this is an assignment of 71# a class, not an instance. 72DriveCPUClass = AtomicSimpleCPU 73drive_mem_mode = 'atomic' 74 | 1# Copyright (c) 2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 58 unchanged lines hidden (view full) --- 67 print "Error: script doesn't take any positional arguments" 68 sys.exit(1) 69 70# driver system CPU is always simple... note this is an assignment of 71# a class, not an instance. 72DriveCPUClass = AtomicSimpleCPU 73drive_mem_mode = 'atomic' 74 |
75# system under test can be any of these CPUs 76if options.detailed: 77 TestCPUClass = DerivO3CPU 78 test_mem_mode = 'timing' 79elif options.timing: 80 TestCPUClass = TimingSimpleCPU 81 test_mem_mode = 'timing' 82else: 83 TestCPUClass = AtomicSimpleCPU 84 test_mem_mode = 'atomic' | 75# system under test can be any CPU 76(TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options) |
85 86TestCPUClass.clock = '2GHz' 87DriveCPUClass.clock = '2GHz' 88 89if options.benchmark: 90 try: 91 bm = Benchmarks[options.benchmark] 92 except KeyError: --- 5 unchanged lines hidden (view full) --- 98 bm = [SysConfig(), SysConfig()] 99 else: 100 bm = [SysConfig()] 101 102test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0]) 103np = options.num_cpus 104test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)] 105for i in xrange(np): | 77 78TestCPUClass.clock = '2GHz' 79DriveCPUClass.clock = '2GHz' 80 81if options.benchmark: 82 try: 83 bm = Benchmarks[options.benchmark] 84 except KeyError: --- 5 unchanged lines hidden (view full) --- 90 bm = [SysConfig(), SysConfig()] 91 else: 92 bm = [SysConfig()] 93 94test_sys = makeLinuxAlphaSystem(test_mem_mode, bm[0]) 95np = options.num_cpus 96test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)] 97for i in xrange(np): |
106 if options.caches and not options.standard_switch: | 98 if options.caches and not options.standard_switch and not FutureClass: |
107 test_sys.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'), 108 L1Cache(size = '64kB')) 109 test_sys.cpu[i].connectMemPorts(test_sys.membus) 110 111if len(bm) == 2: 112 drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1]) 113 drive_sys.cpu = DriveCPUClass(cpu_id=0) 114 drive_sys.cpu.connectMemPorts(drive_sys.membus) 115 root = makeDualRoot(test_sys, drive_sys, options.etherdump) 116elif len(bm) == 1: 117 root = Root(clock = '1THz', system = test_sys) 118else: 119 print "Error I don't know how to create more than 2 systems." 120 sys.exit(1) 121 | 99 test_sys.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'), 100 L1Cache(size = '64kB')) 101 test_sys.cpu[i].connectMemPorts(test_sys.membus) 102 103if len(bm) == 2: 104 drive_sys = makeLinuxAlphaSystem(drive_mem_mode, bm[1]) 105 drive_sys.cpu = DriveCPUClass(cpu_id=0) 106 drive_sys.cpu.connectMemPorts(drive_sys.membus) 107 root = makeDualRoot(test_sys, drive_sys, options.etherdump) 108elif len(bm) == 1: 109 root = Root(clock = '1THz', system = test_sys) 110else: 111 print "Error I don't know how to create more than 2 systems." 112 sys.exit(1) 113 |
122Simulation.run(options, root, test_sys) | 114Simulation.run(options, root, test_sys, FutureClass) |