/* -*- c++ -*- * * SOCLIB_LGPL_HEADER_BEGIN * * This file is part of SoCLib, GNU LGPLv2.1. * * SoCLib is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; version 2.1 of the License. * * SoCLib is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with SoCLib; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA * * SOCLIB_LGPL_HEADER_END * * Copyright (c) UPMC, Lip6, Asim * Nicolas Pouillon , 2007 * Alain Greiner , 2003 * * Maintainers: nipo */ #ifndef SOCLIB_CABA_GENERIC_FIFO_H #define SOCLIB_CABA_GENERIC_FIFO_H #include #include "register.h" namespace soclib { namespace caba { using namespace sc_core; template class GenericFifo { T *m_data; sc_signal r_ptr; sc_signal r_ptw; sc_signal r_fill_state; int m_depth; public: typedef T data_t; void print (void) const { std::cout << "r_fill_state : " << r_fill_state << std::endl; std::cout << "r_ptr/ptw/max : " << r_ptr << " - " << r_ptw << " - " << m_depth << std::endl; std::cout << "m_data : " << std::hex; int i=0; while (i