etherint.cc revision 56
17118Sgblack@eecs.umich.edu/* 27118Sgblack@eecs.umich.edu * Copyright (c) 2003 The Regents of The University of Michigan 37118Sgblack@eecs.umich.edu * All rights reserved. 47118Sgblack@eecs.umich.edu * 57118Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 67118Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 77118Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 87118Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 97118Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 107118Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 117118Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 127118Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 137118Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 147118Sgblack@eecs.umich.edu * this software without specific prior written permission. 156253Sgblack@eecs.umich.edu * 166253Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 176253Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 186253Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 196253Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 206253Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 216253Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 226253Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 236253Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 246253Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 256253Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 266253Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 276253Sgblack@eecs.umich.edu */ 286253Sgblack@eecs.umich.edu 296253Sgblack@eecs.umich.edu#include "dev/etherint.hh" 306253Sgblack@eecs.umich.edu#include "base/misc.hh" 316253Sgblack@eecs.umich.edu#include "sim/sim_object.hh" 326253Sgblack@eecs.umich.edu 336253Sgblack@eecs.umich.eduvoid 346253Sgblack@eecs.umich.eduEtherInt::setPeer(EtherInt *p) 356253Sgblack@eecs.umich.edu{ 366253Sgblack@eecs.umich.edu if (peer && peer != p) 376253Sgblack@eecs.umich.edu panic("You cannot change the peer once it is set.\n" 386253Sgblack@eecs.umich.edu "Current peer=%s Desired peer=%s", peer->name(), p->name()); 396253Sgblack@eecs.umich.edu 406253Sgblack@eecs.umich.edu peer = p; 416253Sgblack@eecs.umich.edu} 426253Sgblack@eecs.umich.edu 436253Sgblack@eecs.umich.eduDEFINE_SIM_OBJECT_CLASS_NAME("EtherInt", EtherInt) 446253Sgblack@eecs.umich.edu 456253Sgblack@eecs.umich.edu