OpenCores
URL https://opencores.org/ocsvn/fully-pipelined-edge-detection-algorithms/fully-pipelined-edge-detection-algorithms/trunk

Subversion Repositories fully-pipelined-edge-detection-algorithms

[/] [fully-pipelined-edge-detection-algorithms/] [trunk/] [src/] [EdgeDetection.vhd] - Blame information for rev 18

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 muhammedko
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: MUHAMMED KOCAOGLU
4
-- 
5
-- Create Date: 01/13/2022 10:56:24 PM
6
-- Design Name: 
7
-- Module Name: EdgeDetection - Behavioral
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool Versions: 
11
-- Description: 
12
-- 
13
-- Dependencies: 
14
-- 
15
-- Revision:
16
-- Revision 0.01 - File Created
17
-- Additional Comments:
18
-- 
19
----------------------------------------------------------------------------------
20
LIBRARY IEEE;
21
USE IEEE.STD_LOGIC_1164.ALL;
22
USE IEEE.NUMERIC_STD.ALL;
23
USE work.OperatorOverloading_pkg.ALL;
24
USE work.EdgeDetection_pkg.ALL;
25
ENTITY EdgeDetection IS
26
    GENERIC (
27
        EdgeDetection_Type   : STRING  := "0"; -- "0"->Sobel filter -- "1"->Prewitt filter -- "2"->Scharr filter -- "3"->Roberts filter
28
        EdgeDetection_Kernel : INTEGER := DetermineKernel(EdgeDetection_Type)
29
    );
30
    PORT (
31
        CLK                   : IN STD_LOGIC;
32
        EdgeDetection_Enable  : IN STD_LOGIC;
33
        EdgeDetection_Disable : IN STD_LOGIC;
34
        EdgeDetection_Din     : IN array2D(0 TO EdgeDetection_Kernel)(7 DOWNTO 0);
35
        EdgeDetection_Dout    : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
36
        EdgeDetection_Ready   : OUT STD_LOGIC
37
    );
38
END EdgeDetection;
39
 
40
ARCHITECTURE Behavioral OF EdgeDetection IS
41
 
42
BEGIN
43
    TypeSelectionCase : CASE EdgeDetection_Type GENERATE
44
        WHEN "0" =>
45
            SobelFilter_Inst : ENTITY work.SobelFilter(Behavioral)
46
                PORT MAP(
47
                    CLK                   => CLK,
48
                    EdgeDetection_Enable  => EdgeDetection_Enable,
49
                    EdgeDetection_Disable => EdgeDetection_Disable,
50
                    EdgeDetection_Din     => EdgeDetection_Din,
51
                    EdgeDetection_Dout    => EdgeDetection_Dout,
52
                    EdgeDetection_Ready   => EdgeDetection_Ready
53
                );
54
        WHEN "1" =>
55
            PrewittFilter_Inst : ENTITY work.PrewittFilter(Behavioral)
56
                PORT MAP(
57
                    CLK                   => CLK,
58
                    EdgeDetection_Enable  => EdgeDetection_Enable,
59
                    EdgeDetection_Disable => EdgeDetection_Disable,
60
                    EdgeDetection_Din     => EdgeDetection_Din,
61
                    EdgeDetection_Dout    => EdgeDetection_Dout,
62
                    EdgeDetection_Ready   => EdgeDetection_Ready
63
                );
64
        WHEN "2" =>
65
            ScharrFilter_Inst : ENTITY work.ScharrFilter(Behavioral)
66
                PORT MAP(
67
                    CLK                   => CLK,
68
                    EdgeDetection_Enable  => EdgeDetection_Enable,
69
                    EdgeDetection_Disable => EdgeDetection_Disable,
70
                    EdgeDetection_Din     => EdgeDetection_Din,
71
                    EdgeDetection_Dout    => EdgeDetection_Dout,
72
                    EdgeDetection_Ready   => EdgeDetection_Ready
73
                );
74
        WHEN "3" =>
75
            RobertsFilter_Inst : ENTITY work.RobertsFilter(Behavioral)
76
                PORT MAP(
77
                    CLK                   => CLK,
78
                    EdgeDetection_Enable  => EdgeDetection_Enable,
79
                    EdgeDetection_Disable => EdgeDetection_Disable,
80
                    EdgeDetection_Din     => EdgeDetection_Din,
81
                    EdgeDetection_Dout    => EdgeDetection_Dout,
82
                    EdgeDetection_Ready   => EdgeDetection_Ready
83
                );
84
        WHEN OTHERS =>
85
            RobertsFilter_Inst : ENTITY work.RobertsFilter(Behavioral)
86
                PORT MAP(
87
                    CLK                   => CLK,
88
                    EdgeDetection_Enable  => EdgeDetection_Enable,
89
                    EdgeDetection_Disable => EdgeDetection_Disable,
90
                    EdgeDetection_Din     => EdgeDetection_Din,
91
                    EdgeDetection_Dout    => EdgeDetection_Dout,
92
                    EdgeDetection_Ready   => EdgeDetection_Ready
93
                );
94
    END GENERATE;
95
 
96
END Behavioral;

powered by: WebSVN 2.1.0

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