checker.cc revision 11793
12350SN/A/* 28733SN/A * Copyright (c) 2011 ARM Limited 38733SN/A * All rights reserved 48733SN/A * 58733SN/A * The license below extends only to copyright in the software and shall 68733SN/A * not be construed as granting a license to any other intellectual 78733SN/A * property including but not limited to intellectual property relating 88733SN/A * to a hardware implementation of the functionality of the software 98733SN/A * licensed hereunder. You may use the software subject to the license 108733SN/A * terms below provided that you ensure that this notice is replicated 118733SN/A * unmodified and in its entirety in all distributions of the software, 128733SN/A * modified or unmodified, in source code or in binary form. 138733SN/A * 142350SN/A * Copyright (c) 2006 The Regents of The University of Michigan 152350SN/A * All rights reserved. 162350SN/A * 172350SN/A * Redistribution and use in source and binary forms, with or without 182350SN/A * modification, are permitted provided that the following conditions are 192350SN/A * met: redistributions of source code must retain the above copyright 202350SN/A * notice, this list of conditions and the following disclaimer; 212350SN/A * redistributions in binary form must reproduce the above copyright 222350SN/A * notice, this list of conditions and the following disclaimer in the 232350SN/A * documentation and/or other materials provided with the distribution; 242350SN/A * neither the name of the copyright holders nor the names of its 252350SN/A * contributors may be used to endorse or promote products derived from 262350SN/A * this software without specific prior written permission. 272350SN/A * 282350SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 292350SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 302350SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 312350SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 322350SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 332350SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 342350SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 352350SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 362350SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 372350SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 382350SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 392689SN/A * 402689SN/A * Authors: Kevin Lim 412350SN/A */ 422315SN/A 4311793Sbrandon.potter@amd.com#include "cpu/o3/checker.hh" 4411793Sbrandon.potter@amd.com 452765SN/A#include "cpu/checker/cpu_impl.hh" 464762SN/A#include "params/O3Checker.hh" 472315SN/A 482669SN/Aclass MemObject; 492669SN/A 502765SN/Atemplate 518733SN/Aclass Checker<O3CPUImpl>; 522765SN/A 532315SN/A//////////////////////////////////////////////////////////////////////// 542315SN/A// 552315SN/A// CheckerCPU Simulation Object 562315SN/A// 574762SN/AO3Checker * 584762SN/AO3CheckerParams::create() 592315SN/A{ 602315SN/A O3Checker::Params *params = new O3Checker::Params(); 614762SN/A params->name = name; 628733SN/A params->numThreads = numThreads; 632315SN/A params->max_insts_any_thread = 0; 642315SN/A params->max_insts_all_threads = 0; 652315SN/A params->max_loads_any_thread = 0; 662315SN/A params->max_loads_all_threads = 0; 672315SN/A params->exitOnError = exitOnError; 682356SN/A params->updateOnError = updateOnError; 692732SN/A params->warnOnlyOnLoadError = warnOnlyOnLoadError; 709793Sakash.bagdia@arm.com params->clk_domain = clk_domain; 718733SN/A params->tracer = tracer; 722315SN/A // Hack to touch all parameters. Consider not deriving Checker 732315SN/A // from BaseCPU..it's not really a CPU in the end. 742315SN/A Counter temp; 752315SN/A temp = max_insts_any_thread; 762315SN/A temp = max_insts_all_threads; 772315SN/A temp = max_loads_any_thread; 782315SN/A temp = max_loads_all_threads; 798887SN/A temp++; 802356SN/A Tick temp2 = progress_interval; 812367SN/A params->progress_interval = 0; 822356SN/A temp2++; 832315SN/A 842315SN/A params->itb = itb; 852315SN/A params->dtb = dtb; 869384SAndreas.Sandberg@arm.com params->isa = isa; 875104SN/A params->system = system; 885110SN/A params->cpu_id = cpu_id; 892315SN/A params->profile = profile; 908733SN/A params->workload = workload; 912315SN/A 922315SN/A O3Checker *cpu = new O3Checker(params); 932315SN/A return cpu; 942315SN/A} 95