##// END OF EJS Templates
Chaine de traitement sur 5 voies (FFT + MATRIX) OKAI
Chaine de traitement sur 5 voies (FFT + MATRIX) OKAI

File last commit:

r109:02eade4e2829 martin
r109:02eade4e2829 martin
Show More
apb_fifo_Driver.h
76 lines | 2.7 KiB | text/x-c | CLexer
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52 /*------------------------------------------------------------------------------
-- This file is a part of the LPP VHDL IP LIBRARY
-- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program 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 General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------
-- Author : Martin Morlot
-- Mail : martin.morlot@lpp.polytechnique.fr
-----------------------------------------------------------------------------*/
#ifndef APB_FIFO_DRIVER_H
#define APB_FIFO_DRIVER_H
martin
Comment C drivers for FFT,FIFO and UART
r69
/*! \file apb_fifo_Driver.h
\brief LPP FIFO driver.
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52
martin
Comment C drivers for FFT,FIFO and UART
r69 This library is written to work with LPP_APB_FIFO VHDL module from LPP's FreeVHDLIB. It represents a standard FIFO working,
used in many type of application.
martin
FIFO updated (vhdl,C driver) and Matrix tested, Bench validated
r93 \todo Check "DEVICE1 => count = 2" function Open
martin
Comment C drivers for FFT,FIFO and UART
r69 \author Martin Morlot martin.morlot@lpp.polytechnique.fr
*/
martin
FIFO updated (vhdl,C driver) and Matrix tested, Bench validated
r93 #define FIFO_Ctrl 0
#define FIFO_RWdata 1
martin
5 FIFO Matrix added (VHDL,C)
r94
martin
FIFO updated (vhdl,C driver) and Matrix tested, Bench validated
r93 #define FIFO_Full 0x00010000
#define FIFO_Empty 0x00000001
martin
5 FIFO Matrix added (VHDL,C)
r94 #define FIFO_ReUse 0x00000002
martin
FIFO updated (vhdl,C driver) and Matrix tested, Bench validated
r93 #define Mask_2hex 0x000000FF
#define Mask_4hex 0x0000FFFF
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52
/*===================================================
T Y P E S D E F
====================================================*/
martin
Comment C drivers for FFT,FIFO and UART
r69 /*! \struct APB_FIFO_REG
\brief Sturcture representing the fifo registers
*/
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52 struct APB_FIFO_REG
{
martin
Chaine de traitement sur 5 voies (FFT + MATRIX) OKAI
r109 volatile int IDreg;
volatile int FIFOreg[2*8];
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52 };
martin
Matrix C-driver added
r86 typedef volatile struct APB_FIFO_REG FIFO_Device;
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52
/*===================================================
F U N C T I O N S
====================================================*/
martin
Comment C drivers for FFT,FIFO and UART
r69 /*! \fn APB_FIFO_Device* apbfifoOpen(int count);
\brief Return count FIFO.
This Function scans APB devices table and returns count FIFO.
\param count The number of the FIFO you whant to get. For example if you have 3 FIFOS on your SOC you want
martin
Matrix C-driver added
r86 to use FIFO1 so count = 1.
martin
Comment C drivers for FFT,FIFO and UART
r69 \return The pointer to the device.
*/
martin
Matrix C-driver added
r86 FIFO_Device* openFIFO(int count);
martin
Chaine de traitement sur 5 voies (FFT + MATRIX) OKAI
r109 int FillFifo(FIFO_Device* dev,int ID,int Tbl[],int count);
martin
APB_FIFO updated and APBs added to lpp_FIFO
r52
#endif