DirectedGenerator.cc revision 8832
12330SN/A/* 22330SN/A * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 32330SN/A * Copyright (c) 2009-2010 Advanced Micro Devices, Inc. 42330SN/A * All rights reserved. 52330SN/A * 62330SN/A * Redistribution and use in source and binary forms, with or without 72330SN/A * modification, are permitted provided that the following conditions are 82330SN/A * met: redistributions of source code must retain the above copyright 92330SN/A * notice, this list of conditions and the following disclaimer; 102330SN/A * redistributions in binary form must reproduce the above copyright 112330SN/A * notice, this list of conditions and the following disclaimer in the 122330SN/A * documentation and/or other materials provided with the distribution; 132330SN/A * neither the name of the copyright holders nor the names of its 142330SN/A * contributors may be used to endorse or promote products derived from 152330SN/A * this software without specific prior written permission. 162330SN/A * 172330SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182330SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192330SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202330SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212330SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222330SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232330SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242330SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252330SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262330SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272689Sktlim@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282689Sktlim@umich.edu */ 292330SN/A 302292SN/A#include "cpu/testers/directedtest/DirectedGenerator.hh" 312292SN/A#include "sim/system.hh" 322292SN/A 332292SN/ADirectedGenerator::DirectedGenerator(const Params *p) 342980Sgblack@eecs.umich.edu : SimObject(p), 356658Snate@binkert.org masterId(p->system->getMasterId(name())) 368229Snate@binkert.org{ 372362SN/A m_num_cpus = p->num_cpus; 382680Sktlim@umich.edu m_directed_tester = NULL; 392683Sktlim@umich.edu} 402683Sktlim@umich.edu 412678Sktlim@umich.eduvoid 422292SN/ADirectedGenerator::setDirectedTester(RubyDirectedTester* directed_tester) 432292SN/A{ 442292SN/A assert(m_directed_tester == NULL); 453548Sgblack@eecs.umich.edu m_directed_tester = directed_tester; 463548Sgblack@eecs.umich.edu} 473548Sgblack@eecs.umich.edu