channel.hh revision 13059
12847Sksewell@umich.edu/* 27783SGiacomo.Gabrielli@arm.com * Copyright 2018 Google, Inc. 37783SGiacomo.Gabrielli@arm.com * 47783SGiacomo.Gabrielli@arm.com * Redistribution and use in source and binary forms, with or without 57783SGiacomo.Gabrielli@arm.com * modification, are permitted provided that the following conditions are 67783SGiacomo.Gabrielli@arm.com * met: redistributions of source code must retain the above copyright 77783SGiacomo.Gabrielli@arm.com * notice, this list of conditions and the following disclaimer; 87783SGiacomo.Gabrielli@arm.com * redistributions in binary form must reproduce the above copyright 97783SGiacomo.Gabrielli@arm.com * notice, this list of conditions and the following disclaimer in the 107783SGiacomo.Gabrielli@arm.com * documentation and/or other materials provided with the distribution; 117783SGiacomo.Gabrielli@arm.com * neither the name of the copyright holders nor the names of its 127783SGiacomo.Gabrielli@arm.com * contributors may be used to endorse or promote products derived from 137783SGiacomo.Gabrielli@arm.com * this software without specific prior written permission. 145596Sgblack@eecs.umich.edu * 152847Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162847Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172847Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182847Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192847Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202847Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212847Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222847Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232847Sksewell@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242847Sksewell@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252847Sksewell@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262847Sksewell@umich.edu * 272847Sksewell@umich.edu * Authors: Gabe Black 282847Sksewell@umich.edu */ 292847Sksewell@umich.edu 302847Sksewell@umich.edu#ifndef __SYSTEMC_CORE_CHANNEL_HH__ 312847Sksewell@umich.edu#define __SYSTEMC_CORE_CHANNEL_HH__ 322847Sksewell@umich.edu 332847Sksewell@umich.edu#include <set> 342847Sksewell@umich.edu 352847Sksewell@umich.edu#include "systemc/core/list.hh" 362847Sksewell@umich.edu#include "systemc/ext/core/sc_prim.hh" 372847Sksewell@umich.edu 382847Sksewell@umich.edunamespace sc_gem5 392847Sksewell@umich.edu{ 405596Sgblack@eecs.umich.edu 412847Sksewell@umich.educlass Channel : public ListNode 422847Sksewell@umich.edu{ 432847Sksewell@umich.edu public: 442847Sksewell@umich.edu Channel(sc_core::sc_prim_channel *_sc_chan); 452847Sksewell@umich.edu 465596Sgblack@eecs.umich.edu virtual ~Channel(); 476658Snate@binkert.org 488229Snate@binkert.org void requestUpdate(); 498229Snate@binkert.org void asyncRequestUpdate(); 505596Sgblack@eecs.umich.edu void update() { _sc_chan->update(); } 515596Sgblack@eecs.umich.edu 522847Sksewell@umich.edu sc_core::sc_prim_channel *sc_chan() { return _sc_chan; } 535596Sgblack@eecs.umich.edu 545596Sgblack@eecs.umich.edu private: 555596Sgblack@eecs.umich.edu sc_core::sc_prim_channel *_sc_chan; 565596Sgblack@eecs.umich.edu}; 575596Sgblack@eecs.umich.edu 585596Sgblack@eecs.umich.eduextern std::set<Channel *> allChannels; 595596Sgblack@eecs.umich.edu 605596Sgblack@eecs.umich.edu} // namespace sc_gem5 615596Sgblack@eecs.umich.edu 625596Sgblack@eecs.umich.edu#endif //__SYSTEMC_CORE_CHANNEL_HH__ 635596Sgblack@eecs.umich.edu