run.py (8802:ef66a9083bc4) | run.py (9384:877293183bdf) |
---|---|
1# Copyright (c) 2006-2007 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 --- 63 unchanged lines hidden (view full) --- 72# set default maxtick... script can override 73# -1 means run forever 74maxtick = m5.MaxTick 75 76# tweak configuration for specific test 77sys.path.append(joinpath(tests_root, category, mode, name)) 78execfile(joinpath(tests_root, category, mode, name, 'test.py')) 79 | 1# Copyright (c) 2006-2007 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 --- 63 unchanged lines hidden (view full) --- 72# set default maxtick... script can override 73# -1 means run forever 74maxtick = m5.MaxTick 75 76# tweak configuration for specific test 77sys.path.append(joinpath(tests_root, category, mode, name)) 78execfile(joinpath(tests_root, category, mode, name, 'test.py')) 79 |
80# Initialize all CPUs in a system 81def initCPUs(sys): 82 def initCPU(cpu): 83 # We might actually have a MemTest object or something similar 84 # here that just pretends to be a CPU. 85 if isinstance(cpu, BaseCPU): 86 cpu.createThreads() 87 88 # The CPU attribute doesn't exist in some cases, e.g. the Ruby 89 # testers. 90 if not hasattr(sys, "cpu"): 91 return 92 93 # The CPU can either be a list of CPUs or a single object. 94 if isinstance(sys.cpu, list): 95 [ initCPU(cpu) for cpu in sys.cpu ] 96 else: 97 initCPU(sys.cpu) 98 99# We might be creating a single system or a dual system. Try 100# initializing the CPUs in all known system attributes. 101for sysattr in [ "system", "testsys", "drivesys" ]: 102 if hasattr(root, sysattr): 103 initCPUs(getattr(root, sysattr)) 104 |
|
80# instantiate configuration 81m5.instantiate() 82 83# simulate until program terminates 84exit_event = m5.simulate(maxtick) 85 86print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause() | 105# instantiate configuration 106m5.instantiate() 107 108# simulate until program terminates 109exit_event = m5.simulate(maxtick) 110 111print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause() |