etherint.cc revision 2665
15086Sgblack@eecs.umich.edu/* 25086Sgblack@eecs.umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan 35086Sgblack@eecs.umich.edu * All rights reserved. 45086Sgblack@eecs.umich.edu * 57087Snate@binkert.org * Redistribution and use in source and binary forms, with or without 67087Snate@binkert.org * modification, are permitted provided that the following conditions are 77087Snate@binkert.org * met: redistributions of source code must retain the above copyright 87087Snate@binkert.org * notice, this list of conditions and the following disclaimer; 97087Snate@binkert.org * redistributions in binary form must reproduce the above copyright 107087Snate@binkert.org * notice, this list of conditions and the following disclaimer in the 117087Snate@binkert.org * documentation and/or other materials provided with the distribution; 127087Snate@binkert.org * neither the name of the copyright holders nor the names of its 135086Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 147087Snate@binkert.org * this software without specific prior written permission. 157087Snate@binkert.org * 167087Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 177087Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 187087Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 197087Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 207087Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 217087Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 225086Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 237087Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 245086Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 255086Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 265086Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 275086Sgblack@eecs.umich.edu * 285086Sgblack@eecs.umich.edu * Authors: Nathan Binkert 295086Sgblack@eecs.umich.edu */ 305086Sgblack@eecs.umich.edu 315086Sgblack@eecs.umich.edu#include "dev/etherint.hh" 325086Sgblack@eecs.umich.edu#include "base/misc.hh" 335086Sgblack@eecs.umich.edu#include "sim/param.hh" 345086Sgblack@eecs.umich.edu#include "sim/sim_object.hh" 355086Sgblack@eecs.umich.edu 365086Sgblack@eecs.umich.eduvoid 375086Sgblack@eecs.umich.eduEtherInt::setPeer(EtherInt *p) 385086Sgblack@eecs.umich.edu{ 395086Sgblack@eecs.umich.edu if (peer && peer != p) 405086Sgblack@eecs.umich.edu panic("You cannot change the peer once it is set.\n" 415086Sgblack@eecs.umich.edu "Current peer=%s Desired peer=%s", peer->name(), p->name()); 427901Shestness@cs.utexas.edu 437901Shestness@cs.utexas.edu peer = p; 445086Sgblack@eecs.umich.edu} 457901Shestness@cs.utexas.edu 467901Shestness@cs.utexas.eduDEFINE_SIM_OBJECT_CLASS_NAME("EtherInt", EtherInt) 477901Shestness@cs.utexas.edu 487924Sgblack@eecs.umich.edu