]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
new entity for rising edge detection - cu
authorhadaq <hadaq>
Wed, 27 Mar 2013 08:06:57 +0000 (08:06 +0000)
committerhadaq <hadaq>
Wed, 27 Mar 2013 08:06:57 +0000 (08:06 +0000)
tdc_releases/tdc_v1.1.1/risingEdgeDetect.vhd [new file with mode: 0644]

diff --git a/tdc_releases/tdc_v1.1.1/risingEdgeDetect.vhd b/tdc_releases/tdc_v1.1.1/risingEdgeDetect.vhd
new file mode 100644 (file)
index 0000000..8f46a48
--- /dev/null
@@ -0,0 +1,18 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.all;
+
+entity risingEdgeDetect is
+  port (
+    CLK       : in  std_logic;
+    SIGNAL_IN : in  std_logic;
+    PULSE_OUT : out std_logic);
+end risingEdgeDetect;
+
+architecture Behavioral of risingEdgeDetect is
+  
+  signal signal_d : std_logic;
+  
+begin
+  signal_d  <= SIGNAL_IN                    when rising_edge(CLK);
+  PULSE_OUT <= (not signal_d) and SIGNAL_IN when rising_edge(CLK);
+end Behavioral;