From a04bbf15b0f51696894e37f3e566998108aefd74 Mon Sep 17 00:00:00 2001 From: Johann Faerber Date: Wed, 9 Mar 2022 09:48:43 +0100 Subject: added basic design directory structure --- src/a_falling_edge_detector_rtl.vhd | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/a_falling_edge_detector_rtl.vhd (limited to 'src/a_falling_edge_detector_rtl.vhd') 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:$ +------------------------------------------------------------------------------- + -- cgit v1.2.3