Deleted Added
sdiff udiff text old ( 3230:e86a03911728 ) new ( 3304:c5917aeb8e2f )
full compact
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

--- 50 unchanged lines hidden (view full) ---

59 help="restore from checkpoint <N>")
60
61(options, args) = parser.parse_args()
62
63if args:
64 print "Error: script doesn't take any positional arguments"
65 sys.exit(1)
66
67# client system CPU is always simple... note this is an assignment of
68# a class, not an instance.
69ClientCPUClass = AtomicSimpleCPU
70client_mem_mode = 'atomic'
71
72if options.detailed:
73 ServerCPUClass = DerivO3CPU
74 server_mem_mode = 'timing'
75elif options.timing:
76 ServerCPUClass = TimingSimpleCPU
77 server_mem_mode = 'timing'
78else:
79 ServerCPUClass = AtomicSimpleCPU
80 server_mem_mode = 'atomic'
81
82ServerCPUClass.clock = '2GHz'
83ClientCPUClass.clock = '2GHz'
84
85if options.benchmark:
86 try:
87 bm = Benchmarks[options.benchmark]
88 except KeyError:
89 print "Error benchmark %s has not been defined." % options.benchmark
90 print "Valid benchmarks are: %s" % DefinedBenchmarks
91 sys.exit(1)
92else:
93 if options.dual:
94 bm = [SysConfig(), SysConfig()]
95 else:
96 bm = [SysConfig()]
97
98server_sys = makeLinuxAlphaSystem(server_mem_mode, bm[0])
99server_sys.cpu = ServerCPUClass(cpu_id=0)
100server_sys.cpu.connectMemPorts(server_sys.membus)
101server_sys.cpu.mem = server_sys.physmem
102
103if len(bm) == 2:
104 client_sys = makeLinuxAlphaSystem(client_mem_mode, bm[1])
105 client_sys.cpu = ClientCPUClass(cpu_id=0)
106 client_sys.cpu.connectMemPorts(client_sys.membus)
107 client_sys.cpu.mem = client_sys.physmem
108 root = makeDualRoot(server_sys, client_sys, options.etherdump)
109elif len(bm) == 1:
110 root = Root(clock = '1THz', system = server_sys)
111else:
112 print "Error I don't know how to create more than 2 systems."
113 sys.exit(1)
114
115m5.instantiate(root)
116
117if options.checkpoint:
118 from os.path import isdir

--- 46 unchanged lines hidden ---