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

Subversion Repositories canny_edge_detector

[/] [canny_edge_detector/] [trunk/] [vhdl_src/] [DoubleLineBuffer.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 angelobacc
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
 
4
entity DoubleFiFOLineBuffer is
5
  generic (
6
        DATA_WIDTH : integer := 8;
7
        NO_OF_COLS : integer := 640
8
        );
9
  port(
10
    clk : in std_logic;
11
        fsync : in std_logic;
12
        pdata_in : in std_logic_vector(DATA_WIDTH -1 downto 0);
13
        pdata_out1 : out std_logic_vector(DATA_WIDTH -1 downto 0);
14
        pdata_out2 : buffer std_logic_vector(DATA_WIDTH -1 downto 0);
15
        pdata_out3 : buffer std_logic_vector(DATA_WIDTH -1 downto 0) );
16
  end DoubleFiFOLineBuffer;
17
 
18
architecture Behavioral of DoubleFiFOLineBuffer is
19
 
20
signal pdata_in_r : std_logic_vector(DATA_WIDTH -1 downto 0);
21
 
22
component FIFOLineBuffer is
23
  generic (
24
        DATA_WIDTH : integer := 8;
25
        NO_OF_COLS : integer := 640
26
        );
27
  port(
28
        clk : in std_logic;
29
        fsync : in std_logic;
30
        pdata_in : in std_logic_vector(DATA_WIDTH -1 downto 0);
31
        pdata_out : buffer std_logic_vector(DATA_WIDTH -1 downto 0));
32
  end component;
33
 
34
begin
35
 
36
  pdata_out1 <= pdata_in_r;
37
 
38
  update_reg : process (clk)
39
  begin
40
    if rising_edge(clk) then
41
          if fsync = '1' then
42
           pdata_in_r <= pdata_in;
43
          end if;
44
        end if;
45
  end process update_reg;
46
 
47
  LineBuffer1 : FIFOLineBuffer
48
        generic map (
49
          DATA_WIDTH => DATA_WIDTH,
50
          NO_OF_COLS => NO_OF_COLS
51
          )
52
        port map(clk,  fsync, pdata_in_r, pdata_out2);
53
 
54
  LineBuffer2 : FIFOLineBuffer
55
        generic map (
56
          DATA_WIDTH => DATA_WIDTH,
57
          NO_OF_COLS => NO_OF_COLS
58
          )
59
        port map(clk, fsync, pdata_out2, pdata_out3);
60
 
61
 
62
end Behavioral;

powered by: WebSVN 2.1.0

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