Credit.hh revision 12492
12023SN/A/* 22023SN/A * Copyright (c) 2008 Princeton University 32023SN/A * Copyright (c) 2016 Georgia Institute of Technology 42023SN/A * All rights reserved. 52023SN/A * 62023SN/A * Redistribution and use in source and binary forms, with or without 72023SN/A * modification, are permitted provided that the following conditions are 82023SN/A * met: redistributions of source code must retain the above copyright 92023SN/A * notice, this list of conditions and the following disclaimer; 102023SN/A * redistributions in binary form must reproduce the above copyright 112023SN/A * notice, this list of conditions and the following disclaimer in the 122023SN/A * documentation and/or other materials provided with the distribution; 132023SN/A * neither the name of the copyright holders nor the names of its 142023SN/A * contributors may be used to endorse or promote products derived from 152023SN/A * this software without specific prior written permission. 162023SN/A * 172023SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182023SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192023SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202023SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212023SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222023SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232023SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242023SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252023SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262023SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272665Ssaidi@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282972Sgblack@eecs.umich.edu * 292023SN/A * Authors: Niket Agarwal 302023SN/A * Tushar Krishna 312023SN/A */ 322023SN/A 332023SN/A 342972Sgblack@eecs.umich.edu#ifndef __MEM_RUBY_NETWORK_GARNET2_0_CREDIT_HH__ 352225SN/A#define __MEM_RUBY_NETWORK_GARNET2_0_CREDIT_HH__ 362225SN/A 372225SN/A#include <cassert> 382225SN/A#include <iostream> 392680Sktlim@umich.edu 402023SN/A#include "base/types.hh" 412023SN/A#include "mem/ruby/network/garnet2.0/CommonTypes.hh" 422225SN/A#include "mem/ruby/network/garnet2.0/flit.hh" 432023SN/A 442225SN/A// Credit Signal for buffers inside VC 452225SN/A// Carries m_vc (inherits from flit.hh) 462023SN/A// and m_is_free_signal (whether VC is free or not) 472458SN/A 482023SN/Aclass Credit : public flit 492650Ssaidi@eecs.umich.edu{ 502650Ssaidi@eecs.umich.edu public: 512650Ssaidi@eecs.umich.edu Credit() {}; 522023SN/A Credit(int vc, bool is_free_signal, Cycles curTime); 532458SN/A 542458SN/A bool is_free_signal() { return m_is_free_signal; } 552972Sgblack@eecs.umich.edu 562972Sgblack@eecs.umich.edu private: 572972Sgblack@eecs.umich.edu bool m_is_free_signal; 582972Sgblack@eecs.umich.edu}; 592972Sgblack@eecs.umich.edu 603093Sksewell@umich.edu#endif // __MEM_RUBY_NETWORK_GARNET2_0_CREDIT_HH__ 613093Sksewell@umich.edu