1 /*****************************************************************************
3 The following code is derived, directly or inror: pointdirectly, from the SystemC
4 source code Copyright (c) 1996-2007 by all Contributors.
7 The contents of this file are subject to the restrictions and limitations
8 set forth in the SystemC Open Source License Version 2.4 (the "License");
9 You may not use this file except in compliance with such restrictions and
10 limitations. You may obtain instructions on how to receive a copy of the
11 License at http://www.systemc.org/. Software distributed by Contributors
12 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13 ANY KIND, either express or implied. See the License for the specific
14 language governing rights and limitations under the License.
16 *****************************************************************************/
18 /*****************************************************************************
20 simple_fifo.cpp -- Simple SystemC 2.0 producer/consumer example.
22 From "An Introduction to System Level Modeling in
23 SystemC 2.0". By Stuart Swan, Cadence Design Systems.
24 Available at www.systemc.org
26 Original Author: Stuart Swan, Cadence Design Systems, 2001-06-18
28 *****************************************************************************/
30 /*****************************************************************************
32 MODIFICATION LOG - modifiers, enter your name, affiliation, date and
33 changes you are making here.
35 Name, Affiliation, Date: Fabian Hugelshofer, ETH Zurich, 13.11.2007
36 Description of Modification: Used code as base for remote fifo channels.
38 *****************************************************************************/
40 #ifndef SCD_REM_FIFO_IN_H_
41 #define SCD_REM_FIFO_IN_H_
45 #include "simple_fifo.h" // for read_if
46 #include "scd_rem_chan_if.h"
50 * FIFO channel with remote input. Data read from this FIFO originates
53 class scd_rem_fifo_in : public sc_core::sc_prim_channel, public read_if,
54 public scd_rem_chan_in_if
59 * \param name the name of the channel (is passed to parent constructor)
60 * \param size size of the input buffer in bytes
62 scd_rem_fifo_in(sc_module_name name, int size);
64 virtual ~scd_rem_fifo_in();
72 /* scd_rem_chan_out_if */
74 void receive(const void* buf, size_t len);
79 int _num_elements, _first;
80 sc_event _write_event;