111247Sradhika.jagtap@ARM.com# Copyright (c) 2013 - 2015 ARM Limited 211247Sradhika.jagtap@ARM.com# All rights reserved. 311247Sradhika.jagtap@ARM.com# 411247Sradhika.jagtap@ARM.com# The license below extends only to copyright in the software and shall 511247Sradhika.jagtap@ARM.com# not be construed as granting a license to any other intellectual 611247Sradhika.jagtap@ARM.com# property including but not limited to intellectual property relating 711247Sradhika.jagtap@ARM.com# to a hardware implementation of the functionality of the software 811247Sradhika.jagtap@ARM.com# licensed hereunder. You may use the software subject to the license 911247Sradhika.jagtap@ARM.com# terms below provided that you ensure that this notice is replicated 1011247Sradhika.jagtap@ARM.com# unmodified and in its entirety in all distributions of the software, 1111247Sradhika.jagtap@ARM.com# modified or unmodified, in source code or in binary form. 1211247Sradhika.jagtap@ARM.com# 1311247Sradhika.jagtap@ARM.com# Redistribution and use in source and binary forms, with or without 1411247Sradhika.jagtap@ARM.com# modification, are permitted provided that the following conditions are 1511247Sradhika.jagtap@ARM.com# met: redistributions of source code must retain the above copyright 1611247Sradhika.jagtap@ARM.com# notice, this list of conditions and the following disclaimer; 1711247Sradhika.jagtap@ARM.com# redistributions in binary form must reproduce the above copyright 1811247Sradhika.jagtap@ARM.com# notice, this list of conditions and the following disclaimer in the 1911247Sradhika.jagtap@ARM.com# documentation and/or other materials provided with the distribution; 2011247Sradhika.jagtap@ARM.com# neither the name of the copyright holders nor the names of its 2111247Sradhika.jagtap@ARM.com# contributors may be used to endorse or promote products derived from 2211247Sradhika.jagtap@ARM.com# this software without specific prior written permission. 2311247Sradhika.jagtap@ARM.com# 2411247Sradhika.jagtap@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2511247Sradhika.jagtap@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2611247Sradhika.jagtap@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2711247Sradhika.jagtap@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2811247Sradhika.jagtap@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2911247Sradhika.jagtap@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3011247Sradhika.jagtap@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3111247Sradhika.jagtap@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3211247Sradhika.jagtap@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3311247Sradhika.jagtap@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3411247Sradhika.jagtap@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3511247Sradhika.jagtap@ARM.com# 3611247Sradhika.jagtap@ARM.com# Authors: Radhika Jagtap 3711247Sradhika.jagtap@ARM.com# Andreas Hansson 3811247Sradhika.jagtap@ARM.com# Thomas Grass 3911247Sradhika.jagtap@ARM.com 4013665Sandreas.sandberg@arm.comfrom m5.objects.Probe import * 4111247Sradhika.jagtap@ARM.com 4211247Sradhika.jagtap@ARM.comclass ElasticTrace(ProbeListenerObject): 4311247Sradhika.jagtap@ARM.com type = 'ElasticTrace' 4411247Sradhika.jagtap@ARM.com cxx_header = 'cpu/o3/probe/elastic_trace.hh' 4511247Sradhika.jagtap@ARM.com 4611247Sradhika.jagtap@ARM.com # Trace files for the following params are created in the output directory. 4711247Sradhika.jagtap@ARM.com # User is forced to provide these when an instance of this class is created. 4811247Sradhika.jagtap@ARM.com instFetchTraceFile = Param.String(desc="Protobuf trace file name for " \ 4911247Sradhika.jagtap@ARM.com "instruction fetch tracing") 5011247Sradhika.jagtap@ARM.com dataDepTraceFile = Param.String(desc="Protobuf trace file name for " \ 5111247Sradhika.jagtap@ARM.com "data dependency tracing") 5211247Sradhika.jagtap@ARM.com # The dependency window size param must be equal to or greater than the 5311247Sradhika.jagtap@ARM.com # number of entries in the O3CPU ROB, a typical value is 3 times ROB size 5411247Sradhika.jagtap@ARM.com depWindowSize = Param.Unsigned(desc="Instruction window size used for " \ 5511247Sradhika.jagtap@ARM.com "recording and processing data " \ 5611247Sradhika.jagtap@ARM.com "dependencies") 5711247Sradhika.jagtap@ARM.com # The committed instruction count from which to start tracing 5811247Sradhika.jagtap@ARM.com startTraceInst = Param.UInt64(0, "The number of committed instructions " \ 5911247Sradhika.jagtap@ARM.com "after which to start tracing. Default " \ 6011247Sradhika.jagtap@ARM.com "zero means start tracing from first " \ 6111247Sradhika.jagtap@ARM.com "committed instruction.") 6211253Sradhika.jagtap@ARM.com # Whether to trace virtual addresses for memory accesses 6311253Sradhika.jagtap@ARM.com traceVirtAddr = Param.Bool(False, "Set to true if virtual addresses are " \ 6411253Sradhika.jagtap@ARM.com "to be traced.") 65