dummy_checker.cc revision 9793
18733SN/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 *
148733SN/A * Redistribution and use in source and binary forms, with or without
158733SN/A * modification, are permitted provided that the following conditions are
168733SN/A * met: redistributions of source code must retain the above copyright
178733SN/A * notice, this list of conditions and the following disclaimer;
188733SN/A * redistributions in binary form must reproduce the above copyright
198733SN/A * notice, this list of conditions and the following disclaimer in the
208733SN/A * documentation and/or other materials provided with the distribution;
218733SN/A * neither the name of the copyright holders nor the names of its
228733SN/A * contributors may be used to endorse or promote products derived from
238733SN/A * this software without specific prior written permission.
248733SN/A *
258733SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
268733SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
278733SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
288733SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
298733SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
308733SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
318733SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
328733SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
338733SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
348733SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
358733SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
368733SN/A *
378733SN/A * Authors: Geoffrey Blake
388733SN/A */
398733SN/A
409340SAndreas.Sandberg@arm.com#include "cpu/dummy_checker.hh"
418733SN/A#include "params/DummyChecker.hh"
428733SN/A
438733SN/A////////////////////////////////////////////////////////////////////////
448733SN/A//
458733SN/A//  DummyChecker Simulation Object
468733SN/A//
478733SN/ADummyChecker *
488733SN/ADummyCheckerParams::create()
498733SN/A{
508733SN/A    DummyChecker::Params *params = new DummyChecker::Params();
518733SN/A    params->name = name;
528733SN/A    params->numThreads = numThreads;
538733SN/A    params->max_insts_any_thread = 0;
548733SN/A    params->max_insts_all_threads = 0;
558733SN/A    params->max_loads_any_thread = 0;
568733SN/A    params->max_loads_all_threads = 0;
579793Sakash.bagdia@arm.com    params->clk_domain = clk_domain;
588733SN/A    // Hack to touch all parameters.  Consider not deriving Checker
598733SN/A    // from BaseCPU..it's not really a CPU in the end.
608733SN/A    Counter temp;
618733SN/A    temp = max_insts_any_thread;
628733SN/A    temp = max_insts_all_threads;
638733SN/A    temp = max_loads_any_thread;
648733SN/A    temp = max_loads_all_threads;
658887SN/A    temp++;
668733SN/A    Tick temp2 = progress_interval;
678733SN/A    params->progress_interval = 0;
688733SN/A    temp2++;
698733SN/A
708733SN/A    params->itb = itb;
718733SN/A    params->dtb = dtb;
729384SAndreas.Sandberg@arm.com    params->isa = isa;
738733SN/A    params->system = system;
748733SN/A    params->cpu_id = cpu_id;
758733SN/A    params->profile = profile;
768733SN/A    params->interrupts = NULL;
778733SN/A    params->workload = workload;
788733SN/A
798733SN/A    DummyChecker *cpu = new DummyChecker(params);
808733SN/A    return cpu;
818733SN/A}
82