dummy_port.hh revision 13892:0182a0601f66
16145Snate@binkert.org/* 26145Snate@binkert.org * Copyright 2019 Google, Inc. 36145Snate@binkert.org * 46145Snate@binkert.org * Redistribution and use in source and binary forms, with or without 56145Snate@binkert.org * modification, are permitted provided that the following conditions are 66145Snate@binkert.org * met: redistributions of source code must retain the above copyright 76145Snate@binkert.org * notice, this list of conditions and the following disclaimer; 86145Snate@binkert.org * redistributions in binary form must reproduce the above copyright 96145Snate@binkert.org * notice, this list of conditions and the following disclaimer in the 106145Snate@binkert.org * documentation and/or other materials provided with the distribution; 116145Snate@binkert.org * neither the name of the copyright holders nor the names of its 126145Snate@binkert.org * contributors may be used to endorse or promote products derived from 136145Snate@binkert.org * this software without specific prior written permission. 146145Snate@binkert.org * 156145Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 166145Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 176145Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 186145Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 196145Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 206145Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 216145Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 226145Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 236145Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 246145Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 256145Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 266145Snate@binkert.org * 276145Snate@binkert.org * Authors: Gabe Black 286145Snate@binkert.org */ 297054Snate@binkert.org 307054Snate@binkert.org#ifndef __MEM_RUBY_NETWORK_DUMMY_PORT_HH__ 316145Snate@binkert.org#define __MEM_RUBY_NETWORK_DUMMY_PORT_HH__ 327055Snate@binkert.org 337454Snate@binkert.org#include "mem/port.hh" 347055Snate@binkert.org 356154Snate@binkert.orgclass RubyDummyPort : public Port 366154Snate@binkert.org{ 377054Snate@binkert.org public: 386876Ssteve.reinhardt@amd.com RubyDummyPort() : Port("DummyPort", -1) {} 396145Snate@binkert.org 406145Snate@binkert.org void 416145Snate@binkert.org bind(Port &peer) override 426145Snate@binkert.org { 436145Snate@binkert.org // No need to connect anything here currently. MessageBuffer 446145Snate@binkert.org // port connections only serve to print the connections in 456145Snate@binkert.org // the config output. 467054Snate@binkert.org // TODO: Add real ports to MessageBuffers and use SimObject connect 477054Snate@binkert.org // code below to bind MessageBuffer senders and receivers 487054Snate@binkert.org } 496876Ssteve.reinhardt@amd.com void unbind() override {} 506876Ssteve.reinhardt@amd.com 517054Snate@binkert.org static RubyDummyPort & 526145Snate@binkert.org instance() 537054Snate@binkert.org { 546145Snate@binkert.org static RubyDummyPort dummy; 558259SBrad.Beckmann@amd.com return dummy; 568259SBrad.Beckmann@amd.com } 578259SBrad.Beckmann@amd.com}; 588259SBrad.Beckmann@amd.com 599863Snilay@cs.wisc.edu#endif //__MEM_RUBY_NETWORK_DUMMY_PORT_HH__ 609863Snilay@cs.wisc.edu