se.py (3444:6abefa632e10) se.py (3448:bb2632fa57dc)
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

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

30#
31# "m5 test.py"
32
33import m5
34from m5.objects import *
35import os, optparse, sys
36m5.AddToPath('../common')
37import Simulation
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

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

30#
31# "m5 test.py"
32
33import m5
34from m5.objects import *
35import os, optparse, sys
36m5.AddToPath('../common')
37import Simulation
38from Caches import *
38
39# Get paths we might need. It's expected this file is in m5/configs/example.
40config_path = os.path.dirname(os.path.abspath(__file__))
41config_root = os.path.dirname(config_path)
42m5_root = os.path.dirname(config_root)
39
40# Get paths we might need. It's expected this file is in m5/configs/example.
41config_path = os.path.dirname(os.path.abspath(__file__))
42config_root = os.path.dirname(config_path)
43m5_root = os.path.dirname(config_root)
44print m5_root
45print config_path
46print config_root
43
47
48
44parser = optparse.OptionParser()
45
46# Benchmark options
47parser.add_option("-c", "--cmd",
48 default=os.path.join(m5_root, "tests/test-progs/hello/bin/alpha/linux/hello"),
49 help="The binary to run in syscall emulation mode.")
50parser.add_option("-o", "--options", default="",
51 help="The options to pass to the binary, use \" \" around the entire\

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

106 physmem = PhysicalMemory(range=AddrRange("512MB")),
107 membus = Bus(), mem_mode = test_mem_mode)
108
109system.physmem.port = system.membus.port
110
111for i in xrange(np):
112 if options.caches and not options.standard_switch:
113 system.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
49parser = optparse.OptionParser()
50
51# Benchmark options
52parser.add_option("-c", "--cmd",
53 default=os.path.join(m5_root, "tests/test-progs/hello/bin/alpha/linux/hello"),
54 help="The binary to run in syscall emulation mode.")
55parser.add_option("-o", "--options", default="",
56 help="The options to pass to the binary, use \" \" around the entire\

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

111 physmem = PhysicalMemory(range=AddrRange("512MB")),
112 membus = Bus(), mem_mode = test_mem_mode)
113
114system.physmem.port = system.membus.port
115
116for i in xrange(np):
117 if options.caches and not options.standard_switch:
118 system.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '32kB'),
114 L2Cache(size = '64kB'))
119 L1Cache(size = '64kB'))
115 system.cpu[i].connectMemPorts(system.membus)
116 system.cpu[i].mem = system.physmem
117 system.cpu[i].workload = process
118
119root = Root(system = system)
120
121Simulation.run(options, root, system)
120 system.cpu[i].connectMemPorts(system.membus)
121 system.cpu[i].mem = system.physmem
122 system.cpu[i].workload = process
123
124root = Root(system = system)
125
126Simulation.run(options, root, system)