o3-timing.py revision 6654
114184Sgabeblack@google.com# Copyright (c) 2006-2007 The Regents of The University of Michigan 214184Sgabeblack@google.com# All rights reserved. 314184Sgabeblack@google.com# 414184Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without 514184Sgabeblack@google.com# modification, are permitted provided that the following conditions are 614184Sgabeblack@google.com# met: redistributions of source code must retain the above copyright 714184Sgabeblack@google.com# notice, this list of conditions and the following disclaimer; 814184Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright 914184Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the 1014184Sgabeblack@google.com# documentation and/or other materials provided with the distribution; 1114184Sgabeblack@google.com# neither the name of the copyright holders nor the names of its 1214184Sgabeblack@google.com# contributors may be used to endorse or promote products derived from 1314184Sgabeblack@google.com# this software without specific prior written permission. 1414184Sgabeblack@google.com# 1514184Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1614184Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1714184Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1814184Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1914184Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2014184Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2114184Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2214184Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2314184Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2414184Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2514184Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2614184Sgabeblack@google.com# 2714184Sgabeblack@google.com# Authors: Steve Reinhardt 2814184Sgabeblack@google.com 2914184Sgabeblack@google.comimport m5 3014184Sgabeblack@google.comfrom m5.objects import * 3114184Sgabeblack@google.comm5.util.addToPath('../configs/common') 3214184Sgabeblack@google.com 3314184Sgabeblack@google.comclass MyCache(BaseCache): 3414184Sgabeblack@google.com assoc = 2 3514184Sgabeblack@google.com block_size = 64 3614184Sgabeblack@google.com latency = '1ns' 3714184Sgabeblack@google.com mshrs = 10 3814184Sgabeblack@google.com tgts_per_mshr = 5 3914184Sgabeblack@google.com 4014184Sgabeblack@google.comcpu = DerivO3CPU(cpu_id=0) 4114184Sgabeblack@google.comcpu.addTwoLevelCacheHierarchy(MyCache(size = '128kB'), MyCache(size = '256kB'), 4214184Sgabeblack@google.com MyCache(size = '2MB')) 4314184Sgabeblack@google.comcpu.clock = '2GHz' 4414184Sgabeblack@google.com 4514184Sgabeblack@google.comsystem = System(cpu = cpu, 4614184Sgabeblack@google.com physmem = PhysicalMemory(), 4714184Sgabeblack@google.com membus = Bus()) 4814184Sgabeblack@google.comsystem.physmem.port = system.membus.port 4914184Sgabeblack@google.comcpu.connectMemPorts(system.membus) 5014184Sgabeblack@google.com 5114184Sgabeblack@google.comroot = Root(system = system) 5214184Sgabeblack@google.com