TraceCPU.py revision 11249:0733a1c08600
12740SN/A# Copyright (c) 2013 - 2015 ARM Limited 27534Ssteve.reinhardt@amd.com# All rights reserved. 31046SN/A# 41046SN/A# The license below extends only to copyright in the software and shall 51046SN/A# not be construed as granting a license to any other intellectual 61046SN/A# property including but not limited to intellectual property relating 71046SN/A# to a hardware implementation of the functionality of the software 81046SN/A# licensed hereunder. You may use the software subject to the license 91046SN/A# terms below provided that you ensure that this notice is replicated 101046SN/A# unmodified and in its entirety in all distributions of the software, 111046SN/A# modified or unmodified, in source code or in binary form. 121046SN/A# 131046SN/A# Redistribution and use in source and binary forms, with or without 141046SN/A# modification, are permitted provided that the following conditions are 151046SN/A# met: redistributions of source code must retain the above copyright 161046SN/A# notice, this list of conditions and the following disclaimer; 171046SN/A# redistributions in binary form must reproduce the above copyright 181046SN/A# notice, this list of conditions and the following disclaimer in the 191046SN/A# documentation and/or other materials provided with the distribution; 201046SN/A# neither the name of the copyright holders nor the names of its 211046SN/A# contributors may be used to endorse or promote products derived from 221046SN/A# this software without specific prior written permission. 231046SN/A# 241046SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 251046SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 261046SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 272665SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 282665SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 292665SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 301046SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 315766Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 328331Ssteve.reinhardt@amd.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 331438SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 346654Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 356654Snate@binkert.org# 366654Snate@binkert.org# Authors: Radhika Jagtap 376654Snate@binkert.org# Andreas Hansson 386654Snate@binkert.org# Thomas Grass 394762Snate@binkert.org 406654Snate@binkert.orgfrom m5.params import * 413102Sstever@eecs.umich.edufrom BaseCPU import BaseCPU 423102Sstever@eecs.umich.edu 433102Sstever@eecs.umich.educlass TraceCPU(BaseCPU): 443102Sstever@eecs.umich.edu """Trace CPU model which replays traces generated in a prior simulation 456654Snate@binkert.org using DerivO3CPU or its derived classes. It interfaces with L1 caches. 463102Sstever@eecs.umich.edu """ 473102Sstever@eecs.umich.edu type = 'TraceCPU' 487528Ssteve.reinhardt@amd.com cxx_header = "cpu/trace/trace_cpu.hh" 497528Ssteve.reinhardt@amd.com 503102Sstever@eecs.umich.edu @classmethod 516654Snate@binkert.org def memory_mode(cls): 526654Snate@binkert.org return 'timing' 53679SN/A 54679SN/A @classmethod 55679SN/A def require_caches(cls): 56679SN/A return True 57679SN/A 58679SN/A def addPMU(self, pmu = None): 591692SN/A pass 60679SN/A 61679SN/A @classmethod 62679SN/A def support_take_over(cls): 63679SN/A return True 64679SN/A 65679SN/A instTraceFile = Param.String("", "Instruction trace file") 66679SN/A dataTraceFile = Param.String("", "Data dependency trace file") 67679SN/A sizeStoreBuffer = Param.Unsigned(16, "Number of entries in the store "\ 68679SN/A "buffer") 69679SN/A sizeLoadBuffer = Param.Unsigned(16, "Number of entries in the load buffer") 70679SN/A sizeROB = Param.Unsigned(40, "Number of entries in the re-order buffer") 71679SN/A 72679SN/A