simple-atomic.py revision 4390
12817Sksewell@umich.edu# Copyright (c) 2006-2007 The Regents of The University of Michigan 22817Sksewell@umich.edu# All rights reserved. 32817Sksewell@umich.edu# 42817Sksewell@umich.edu# Redistribution and use in source and binary forms, with or without 52817Sksewell@umich.edu# modification, are permitted provided that the following conditions are 62817Sksewell@umich.edu# met: redistributions of source code must retain the above copyright 72817Sksewell@umich.edu# notice, this list of conditions and the following disclaimer; 82817Sksewell@umich.edu# redistributions in binary form must reproduce the above copyright 92817Sksewell@umich.edu# notice, this list of conditions and the following disclaimer in the 102817Sksewell@umich.edu# documentation and/or other materials provided with the distribution; 112817Sksewell@umich.edu# neither the name of the copyright holders nor the names of its 122817Sksewell@umich.edu# contributors may be used to endorse or promote products derived from 132817Sksewell@umich.edu# this software without specific prior written permission. 142817Sksewell@umich.edu# 152817Sksewell@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162817Sksewell@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172817Sksewell@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182817Sksewell@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192817Sksewell@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202817Sksewell@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212817Sksewell@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222817Sksewell@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232817Sksewell@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242817Sksewell@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252817Sksewell@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262817Sksewell@umich.edu# 272817Sksewell@umich.edu# Authors: Steve Reinhardt 282817Sksewell@umich.edu 292817Sksewell@umich.eduimport m5 302817Sksewell@umich.edufrom m5.objects import * 312817Sksewell@umich.edu 322817Sksewell@umich.edusystem = System(cpu = AtomicSimpleCPU(cpu_id=0), 332817Sksewell@umich.edu physmem = PhysicalMemory(), 342935Sksewell@umich.edu membus = Bus()) 352817Sksewell@umich.edusystem.physmem.port = system.membus.port 362817Sksewell@umich.edusystem.cpu.connectMemPorts(system.membus) 372834Sksewell@umich.edusystem.cpu.clock = '2GHz' 382834Sksewell@umich.edu 392834Sksewell@umich.eduroot = Root(system = system) 402834Sksewell@umich.edu