DirectedGenerator.cc revision 11320:42ecb523c64a
111598Sandreas.sandberg@arm.com/*
27586SAli.Saidi@arm.com * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
37586SAli.Saidi@arm.com * Copyright (c) 2009-2010 Advanced Micro Devices, Inc.
47586SAli.Saidi@arm.com * All rights reserved.
57586SAli.Saidi@arm.com *
67586SAli.Saidi@arm.com * Redistribution and use in source and binary forms, with or without
77586SAli.Saidi@arm.com * modification, are permitted provided that the following conditions are
87586SAli.Saidi@arm.com * met: redistributions of source code must retain the above copyright
97586SAli.Saidi@arm.com * notice, this list of conditions and the following disclaimer;
107586SAli.Saidi@arm.com * redistributions in binary form must reproduce the above copyright
117586SAli.Saidi@arm.com * notice, this list of conditions and the following disclaimer in the
127586SAli.Saidi@arm.com * documentation and/or other materials provided with the distribution;
1310118Snilay@cs.wisc.edu * neither the name of the copyright holders nor the names of its
1410118Snilay@cs.wisc.edu * contributors may be used to endorse or promote products derived from
153970Sgblack@eecs.umich.edu * this software without specific prior written permission.
163005Sstever@eecs.umich.edu *
173005Sstever@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
183005Sstever@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
193005Sstever@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
203005Sstever@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
213005Sstever@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
223005Sstever@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
233005Sstever@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
243005Sstever@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
253005Sstever@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
263005Sstever@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
273005Sstever@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
283005Sstever@eecs.umich.edu */
293005Sstever@eecs.umich.edu
303005Sstever@eecs.umich.edu#include "cpu/testers/directedtest/DirectedGenerator.hh"
313005Sstever@eecs.umich.edu#include "sim/system.hh"
323005Sstever@eecs.umich.edu
333005Sstever@eecs.umich.eduDirectedGenerator::DirectedGenerator(const Params *p)
343005Sstever@eecs.umich.edu    : SimObject(p),
353005Sstever@eecs.umich.edu      masterId(p->system->getMasterId(name()))
363005Sstever@eecs.umich.edu{
373005Sstever@eecs.umich.edu    m_num_cpus = p->num_cpus;
383005Sstever@eecs.umich.edu    m_directed_tester = NULL;
393005Sstever@eecs.umich.edu}
403005Sstever@eecs.umich.edu
413005Sstever@eecs.umich.eduvoid
4210118Snilay@cs.wisc.eduDirectedGenerator::setDirectedTester(RubyDirectedTester* directed_tester)
433005Sstever@eecs.umich.edu{
446654Snate@binkert.org    assert(m_directed_tester == NULL);
456654Snate@binkert.org    m_directed_tester = directed_tester;
462889SN/A}
472710SN/A