simple-atomic.py revision 4390:76bbcf725852
113432Spau.cabre@metempsy.com# Copyright (c) 2006-2007 The Regents of The University of Michigan 213432Spau.cabre@metempsy.com# All rights reserved. 313432Spau.cabre@metempsy.com# 413432Spau.cabre@metempsy.com# Redistribution and use in source and binary forms, with or without 513432Spau.cabre@metempsy.com# modification, are permitted provided that the following conditions are 613432Spau.cabre@metempsy.com# met: redistributions of source code must retain the above copyright 713432Spau.cabre@metempsy.com# notice, this list of conditions and the following disclaimer; 813432Spau.cabre@metempsy.com# redistributions in binary form must reproduce the above copyright 913432Spau.cabre@metempsy.com# notice, this list of conditions and the following disclaimer in the 1013432Spau.cabre@metempsy.com# documentation and/or other materials provided with the distribution; 1113432Spau.cabre@metempsy.com# neither the name of the copyright holders nor the names of its 1213432Spau.cabre@metempsy.com# contributors may be used to endorse or promote products derived from 1313432Spau.cabre@metempsy.com# this software without specific prior written permission. 1413432Spau.cabre@metempsy.com# 1513432Spau.cabre@metempsy.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1613432Spau.cabre@metempsy.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1713432Spau.cabre@metempsy.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1813432Spau.cabre@metempsy.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1913432Spau.cabre@metempsy.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2013432Spau.cabre@metempsy.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2113432Spau.cabre@metempsy.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2213432Spau.cabre@metempsy.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2313432Spau.cabre@metempsy.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2413432Spau.cabre@metempsy.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2513432Spau.cabre@metempsy.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2613432Spau.cabre@metempsy.com# 2713432Spau.cabre@metempsy.com# Authors: Steve Reinhardt 2813432Spau.cabre@metempsy.com 2913432Spau.cabre@metempsy.comimport m5 3013432Spau.cabre@metempsy.comfrom m5.objects import * 3113432Spau.cabre@metempsy.com 3213432Spau.cabre@metempsy.comsystem = System(cpu = AtomicSimpleCPU(cpu_id=0), 3313432Spau.cabre@metempsy.com physmem = PhysicalMemory(), 3413432Spau.cabre@metempsy.com membus = Bus()) 3513432Spau.cabre@metempsy.comsystem.physmem.port = system.membus.port 3613432Spau.cabre@metempsy.comsystem.cpu.connectMemPorts(system.membus) 3713432Spau.cabre@metempsy.comsystem.cpu.clock = '2GHz' 3813432Spau.cabre@metempsy.com 3913432Spau.cabre@metempsy.comroot = Root(system = system) 4013432Spau.cabre@metempsy.com