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

Subversion Repositories uos_processor

[/] [vhdl/] [edgedetect.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 droggen
 
2
 
3
library IEEE;
4
use IEEE.STD_LOGIC_1164.ALL;
5
 
6
entity edgedetect is
7
        port(
8
                clk : in STD_LOGIC;
9
                din : in STD_LOGIC;
10
                dout : out STD_LOGIC
11
                );
12
end edgedetect;
13
 
14
architecture Behavioral of edgedetect is
15
        signal last : STD_LOGIC;
16
begin
17
 
18
        process(clk)
19
        begin
20
                if rising_edge(clk) then
21
                        last <= din;
22
                end if;
23
        end process;
24
 
25
        dout <= din and not last;
26
 
27
end Behavioral;
28
 

powered by: WebSVN 2.1.0

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