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 * |
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 |
47 |
48 |
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'), |
119 L1Cache(size = '64kB')) |
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) |