realview-simple-atomic.py revision 9282
1451SN/A# Copyright (c) 2006-2007 The Regents of The University of Michigan 22212SN/A# All rights reserved. 3451SN/A# 4451SN/A# Redistribution and use in source and binary forms, with or without 5451SN/A# modification, are permitted provided that the following conditions are 6451SN/A# met: redistributions of source code must retain the above copyright 7451SN/A# notice, this list of conditions and the following disclaimer; 8451SN/A# redistributions in binary form must reproduce the above copyright 9451SN/A# notice, this list of conditions and the following disclaimer in the 10451SN/A# documentation and/or other materials provided with the distribution; 11451SN/A# neither the name of the copyright holders nor the names of its 12451SN/A# contributors may be used to endorse or promote products derived from 13451SN/A# this software without specific prior written permission. 14451SN/A# 15451SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16451SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17451SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18451SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19451SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20451SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21451SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22451SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23451SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24451SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25451SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26451SN/A# 272665Ssaidi@eecs.umich.edu# Authors: Steve Reinhardt 282665Ssaidi@eecs.umich.edu 292665Ssaidi@eecs.umich.eduimport m5 302665Ssaidi@eecs.umich.edufrom m5.objects import * 31451SN/Am5.util.addToPath('../configs/common') 32451SN/Aimport FSConfig 332212SN/A 342212SN/A# -------------------- 35451SN/A# Base L1 Cache 36451SN/A# ==================== 371070SN/A 381070SN/Aclass L1(BaseCache): 391070SN/A hit_latency = '1ns' 402212SN/A response_latency = '1ns' 412212SN/A block_size = 64 422212SN/A mshrs = 4 432212SN/A tgts_per_mshr = 8 442212SN/A is_top_level = True 452212SN/A 46451SN/A# ---------------------- 47885SN/A# Base L2 Cache 48885SN/A# ---------------------- 49885SN/A 50885SN/Aclass L2(BaseCache): 51885SN/A block_size = 64 522212SN/A hit_latency = '10ns' 53451SN/A response_latency = '10ns' 54451SN/A mshrs = 92 551885SN/A tgts_per_mshr = 16 561885SN/A write_buffers = 8 571885SN/A 581885SN/A# --------------------- 591885SN/A# I/O Cache 601885SN/A# --------------------- 611885SN/Aclass IOCache(BaseCache): 621885SN/A assoc = 8 631885SN/A block_size = 64 641885SN/A hit_latency = '50ns' 651885SN/A response_latency = '50ns' 661885SN/A mshrs = 20 671885SN/A size = '1kB' 681885SN/A tgts_per_mshr = 12 691885SN/A addr_ranges = [AddrRange(0, size='256MB')] 701885SN/A forward_snoops = False 712212SN/A 721855SN/A#cpu 731855SN/Acpu = AtomicSimpleCPU(cpu_id=0) 741855SN/A#the system 751855SN/Asystem = FSConfig.makeArmSystem('atomic', "RealView_PBX", None, False) 761855SN/A 771855SN/Asystem.cpu = cpu 781855SN/A 791855SN/A#create the iocache 801855SN/Asystem.iocache = IOCache() 811855SN/Asystem.iocache.cpu_side = system.iobus.master 821855SN/Asystem.iocache.mem_side = system.membus.slave 831855SN/A 841855SN/A#connect up the cpu and caches 851855SN/Acpu.addTwoLevelCacheHierarchy(L1(size = '32kB', assoc = 1), 861855SN/A L1(size = '32kB', assoc = 4), 871855SN/A L2(size = '4MB', assoc = 8)) 881855SN/A# create the interrupt controller 891855SN/Acpu.createInterruptController() 901855SN/A# connect cpu and caches to the rest of the system 911855SN/Acpu.connectAllPorts(system.membus) 921492SN/A# set the cpu clock along with the caches and l1-l2 bus 93887SN/Acpu.clock = '2GHz' 94451SN/A 951492SN/Aroot = Root(full_system=True, system=system) 961492SN/Am5.ticks.setGlobalFrequency('1THz') 971492SN/A 981070SN/A