diff options
author | Johann Faerber <johann.faerber@hs-augsburg.de> | 2022-03-09 09:48:43 +0100 |
---|---|---|
committer | Johann Faerber <johann.faerber@hs-augsburg.de> | 2022-03-09 09:48:43 +0100 |
commit | a04bbf15b0f51696894e37f3e566998108aefd74 (patch) | |
tree | 35a36178bfb2fa257b0afcddaec29868f6e4fc77 /src/a_falling_edge_detector_rtl.vhd | |
parent | fd7c3d6c1352353f3ee2da9267308a51fd67315d (diff) |
added basic design directory structure
Diffstat (limited to 'src/a_falling_edge_detector_rtl.vhd')
-rw-r--r-- | src/a_falling_edge_detector_rtl.vhd | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/a_falling_edge_detector_rtl.vhd b/src/a_falling_edge_detector_rtl.vhd new file mode 100644 index 0000000..117c3f1 --- /dev/null +++ b/src/a_falling_edge_detector_rtl.vhd @@ -0,0 +1,42 @@ +------------------------------------------------------------------------------- +-- Module : rtl +------------------------------------------------------------------------------- +-- Author : Johann Faerber +-- Company : University of Applied Sciences Augsburg +------------------------------------------------------------------------------- +-- Description: detects a falling edge of input signal x_i +-- and produces a high-active signal for one clock period at +-- output fall_o +-- clk_i __|--|__|--|__|--|__|--|__|--|__|--|__|--|__|--|__|--| +-- x_i -----|___________________________________|----------- +-- fall_o ________|-----|______________________________________ +-- +-- rtl model based on two flip flops with output logic +------------------------------------------------------------------------------- +-- Revisions : see end of file +------------------------------------------------------------------------------- +LIBRARY IEEE; +USE IEEE.std_logic_1164.ALL; + +ARCHITECTURE rtl OF falling_edge_detector IS + + SIGNAL q0, q1 : std_ulogic; -- D-Type Flip-Flop outputs + +BEGIN + + dflipflop_0 : q0 <= '0' WHEN (rst_ni = '0') ELSE + x_i WHEN rising_edge(clk_i); + + dflipflop_1 : q1 <= '0' WHEN (rst_ni = '0') ELSE + q0 WHEN rising_edge(clk_i); + + output_logic : fall_o <= ; -- fill in the correct equation here + +END rtl; + +------------------------------------------------------------------------------- +-- Revisions: +-- ---------- +-- $Id:$ +------------------------------------------------------------------------------- + |