OpenCores
URL https://opencores.org/ocsvn/graphiti/graphiti/trunk

Subversion Repositories graphiti

[/] [graphiti/] [trunk/] [xilinx/] [delay.vhd] - Blame information for rev 10

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 pototschni
-------------------------------------------------------------------------------
2
--      MiniGA
3
--  Author: Thomas Pototschnig (thomas.pototschnig@gmx.de)
4
--
5
--  License: Creative Commons Attribution-NonCommercial-ShareAlike 2.0 License
6
--           http://creativecommons.org/licenses/by-nc-sa/2.0/de/
7
--
8
--  If you want to use MiniGA for commercial purposes please contact the author
9
-------------------------------------------------------------------------------
10
-- delay
11
-- for synchronizing u,v,y after FIR filter
12
library IEEE;
13
use IEEE.STD_LOGIC_1164.ALL;
14
use IEEE.STD_LOGIC_ARITH.ALL;
15
use IEEE.STD_LOGIC_UNSIGNED.ALL;
16
 
17
entity delay is
18
        generic (
19
                TAPS : integer := 8 -- group-delay der FIR-Filter ist 500ns
20
        );
21
 
22
        port (
23
                clk : in std_logic;
24
                reset : in std_logic;
25
                input : in std_logic_vector(11 downto 0);
26
                output : out std_logic_vector(11 downto 0)
27
        );
28
end delay;
29
 
30
architecture behaviour of delay is
31
begin
32
        process (clk, reset)
33
        type tsr is array(0 to TAPS-1) of signed(11 downto 0);
34
        variable sr : tsr;
35
        begin
36
                if reset='0' then
37
                        for I in 0 to TAPS-1 loop
38
                                sr(I) := (others => '0');
39
                        end loop;
40
                        output <= (others => '0');
41
                elsif clk'event and clk='1' then
42
-- Schieberegister
43
                        for I in (TAPS-1) downto 1 loop
44
                                sr(I):=sr(I-1);
45
                        end loop;
46
                        sr(0) := signed(input);
47
 
48
                        output <= conv_std_logic_vector(sr(TAPS-1),12);
49
                end if;
50
        end process;
51
 
52
end architecture;

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.