Flag_Extremum.vhd
72 lines
| 2.5 KiB
| text/x-vhdl
|
VhdlLexer
martin
|
r62 | ------------------------------------------------------------------------------ | ||
-- 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 | ||||
------------------------------------------------------------------------------ | ||||
library IEEE; | ||||
use IEEE.std_logic_1164.all; | ||||
use IEEE.numeric_std.all; | ||||
use work.FFT_config.all; | ||||
martin
|
r65 | --! Programme qui va permettre de g�n�rer des flags utilis�s au niveau du driver C | ||
martin
|
r62 | entity Flag_Extremum is | ||
port( | ||||
martin
|
r65 | clk,raz : in std_logic; --! Horloge et Reset g�n�ral du composant | ||
load : in std_logic; --! Signal en provenance de CoreFFT | ||||
y_rdy : in std_logic; --! Signal en provenance de CoreFFT | ||||
martin
|
r96 | fill : out std_logic; --! Flag, Va permettre d'autoriser l'�criture (Driver C) | ||
ready : out std_logic --! Flag, Va permettre d'autoriser la lecture (Driver C) | ||||
martin
|
r62 | ); | ||
end Flag_Extremum; | ||||
martin
|
r65 | --! @details Flags g�n�r�s a partir de signaux fourni par l'IP FFT d'actel | ||
martin
|
r62 | architecture ar_Flag_Extremum of Flag_Extremum is | ||
martin
|
r65 | begin | ||
martin
|
r62 | process (clk,raz) | ||
begin | ||||
if(raz='0')then | ||||
martin
|
r96 | fill <= '0'; | ||
ready <= '0'; | ||||
martin
|
r65 | |||
elsif(clk' event and clk='1')then | ||||
martin
|
r62 | |||
martin
|
r64 | if(load='1' and y_rdy='0')then | ||
martin
|
r96 | fill <= '1'; | ||
ready <= '0'; | ||||
martin
|
r64 | |||
elsif(y_rdy='1')then | ||||
martin
|
r96 | fill <= '0'; | ||
ready <= '1'; | ||||
martin
|
r64 | |||
else | ||||
martin
|
r96 | fill <= '0'; | ||
ready <= '0'; | ||||
martin
|
r64 | |||
end if; | ||||
martin
|
r62 | end if; | ||
end process; | ||||
end ar_Flag_Extremum; | ||||