RubyPortProxy.hh revision 8706
18706Sandreas.hansson@arm.com/* 28706Sandreas.hansson@arm.com * Copyright (c) 2011 ARM Limited 38706Sandreas.hansson@arm.com * All rights reserved 48706Sandreas.hansson@arm.com * 58706Sandreas.hansson@arm.com * The license below extends only to copyright in the software and shall 68706Sandreas.hansson@arm.com * not be construed as granting a license to any other intellectual 78706Sandreas.hansson@arm.com * property including but not limited to intellectual property relating 88706Sandreas.hansson@arm.com * to a hardware implementation of the functionality of the software 98706Sandreas.hansson@arm.com * licensed hereunder. You may use the software subject to the license 108706Sandreas.hansson@arm.com * terms below provided that you ensure that this notice is replicated 118706Sandreas.hansson@arm.com * unmodified and in its entirety in all distributions of the software, 128706Sandreas.hansson@arm.com * modified or unmodified, in source code or in binary form. 138706Sandreas.hansson@arm.com * 148706Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without 158706Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are 168706Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright 178706Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer; 188706Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright 198706Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the 208706Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution; 218706Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its 228706Sandreas.hansson@arm.com * contributors may be used to endorse or promote products derived from 238706Sandreas.hansson@arm.com * this software without specific prior written permission. 248706Sandreas.hansson@arm.com * 258706Sandreas.hansson@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 268706Sandreas.hansson@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 278706Sandreas.hansson@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 288706Sandreas.hansson@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 298706Sandreas.hansson@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 308706Sandreas.hansson@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 318706Sandreas.hansson@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 328706Sandreas.hansson@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 338706Sandreas.hansson@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 348706Sandreas.hansson@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 358706Sandreas.hansson@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 368706Sandreas.hansson@arm.com * 378706Sandreas.hansson@arm.com * Authors: Andreas Hansson 388706Sandreas.hansson@arm.com */ 398706Sandreas.hansson@arm.com 408706Sandreas.hansson@arm.com/** 418706Sandreas.hansson@arm.com * @file 428706Sandreas.hansson@arm.com * RobyPortProxy for connecting system port to Ruby 438706Sandreas.hansson@arm.com * 448706Sandreas.hansson@arm.com * A trivial wrapper that allows the system port to connect to Ruby 458706Sandreas.hansson@arm.com * and use nothing but functional accesses. 468706Sandreas.hansson@arm.com */ 478706Sandreas.hansson@arm.com 488706Sandreas.hansson@arm.com#ifndef __MEM_RUBY_SYSTEM_RUBYPORTPROXY_HH__ 498706Sandreas.hansson@arm.com#define __MEM_RUBY_SYSTEM_RUBYPORTPROXY_HH__ 508706Sandreas.hansson@arm.com 518706Sandreas.hansson@arm.com#include "mem/ruby/system/RubyPort.hh" 528706Sandreas.hansson@arm.com#include "params/RubyPortProxy.hh" 538706Sandreas.hansson@arm.com 548706Sandreas.hansson@arm.comclass RubyPortProxy : public RubyPort 558706Sandreas.hansson@arm.com{ 568706Sandreas.hansson@arm.com 578706Sandreas.hansson@arm.com public: 588706Sandreas.hansson@arm.com 598706Sandreas.hansson@arm.com /** 608706Sandreas.hansson@arm.com * Create a new RubyPortProxy. 618706Sandreas.hansson@arm.com * 628706Sandreas.hansson@arm.com * @param p Parameters inherited from the RubyPort 638706Sandreas.hansson@arm.com */ 648706Sandreas.hansson@arm.com RubyPortProxy(const RubyPortProxyParams* p); 658706Sandreas.hansson@arm.com 668706Sandreas.hansson@arm.com /** 678706Sandreas.hansson@arm.com * Destruct a RubyPortProxy. 688706Sandreas.hansson@arm.com */ 698706Sandreas.hansson@arm.com virtual ~RubyPortProxy(); 708706Sandreas.hansson@arm.com 718706Sandreas.hansson@arm.com /** 728706Sandreas.hansson@arm.com * Initialise a RubyPortProxy by doing nothing and avoid 738706Sandreas.hansson@arm.com * involving the super class. 748706Sandreas.hansson@arm.com */ 758706Sandreas.hansson@arm.com void init(); 768706Sandreas.hansson@arm.com 778706Sandreas.hansson@arm.com /** 788706Sandreas.hansson@arm.com * Pure virtual member in the super class that we are forced to 798706Sandreas.hansson@arm.com * implement even if it is never used (since there are only 808706Sandreas.hansson@arm.com * functional accesses). 818706Sandreas.hansson@arm.com * 828706Sandreas.hansson@arm.com * @param pkt The packet to serve to Ruby 838706Sandreas.hansson@arm.com * @returns always a NULL status 848706Sandreas.hansson@arm.com */ 858706Sandreas.hansson@arm.com RequestStatus makeRequest(PacketPtr pkt); 868706Sandreas.hansson@arm.com 878706Sandreas.hansson@arm.com /** 888706Sandreas.hansson@arm.com * Pure virtual member in the super class that we are forced to 898706Sandreas.hansson@arm.com * implement even if it is never used (since there are only 908706Sandreas.hansson@arm.com * functional accesses). 918706Sandreas.hansson@arm.com * 928706Sandreas.hansson@arm.com * @returns always 0 938706Sandreas.hansson@arm.com */ 948706Sandreas.hansson@arm.com int outstandingCount() const { return 0; } 958706Sandreas.hansson@arm.com 968706Sandreas.hansson@arm.com /** 978706Sandreas.hansson@arm.com * Pure virtual member in the super class that we are forced to 988706Sandreas.hansson@arm.com * implement even if it is never used (since there are only 998706Sandreas.hansson@arm.com * functional accesses). 1008706Sandreas.hansson@arm.com * 1018706Sandreas.hansson@arm.com * @returns always false 1028706Sandreas.hansson@arm.com */ 1038706Sandreas.hansson@arm.com bool isDeadlockEventScheduled() const { return false; } 1048706Sandreas.hansson@arm.com 1058706Sandreas.hansson@arm.com /** 1068706Sandreas.hansson@arm.com * Pure virtual member in the super class that we are forced to 1078706Sandreas.hansson@arm.com * implement even if it is never used (since there are only 1088706Sandreas.hansson@arm.com * functional accesses). 1098706Sandreas.hansson@arm.com */ 1108706Sandreas.hansson@arm.com void descheduleDeadlockEvent() { } 1118706Sandreas.hansson@arm.com 1128706Sandreas.hansson@arm.com}; 1138706Sandreas.hansson@arm.com 1148706Sandreas.hansson@arm.com#endif // __MEM_RUBY_SYSTEM_RUBYPORTPROXY_HH__ 115