【问题标题】:Make a delay after falling edge of signal and then do something in VHDL在信号下降沿后做一个延迟,然后在 VHDL 中做一些事情
【发布时间】:2021-12-31 08:42:50
【问题描述】:

我想知道如何按此顺序执行以下操作:

首先检测输入信号的下降沿 (rd),然后等待15 ns最后进行必要的变量的变化,例如将db_input 8bits 向量存储到db_output 8bits 向量中。

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity ent1 is
    port
    (
        -- Input ports
        rd              : in std_logic;
        db_input        : in std_logic_vector (7 downto 0);

        -- Output ports
        db_output   : out std_logic_vector (7 downto 0) := (others => '0')
    );
end ent1;

architecture arch1 of ent1 is
begin

    process(rd)
    begin
        if (falling_edge(rd)) then
            -- Wait for 15 ns
            -- After the 15 ns save db_input into db_output
        end if;
    end process;
    
end arch1;

【问题讨论】:

  • 您是否尝试在 FPGA 上执行此操作?如果没有与 15ns 相关的时钟,这是不可能的。
  • 除非你真的试图在你的 VHDL 代码中将信号延迟 15ns?

标签: vhdl fpga intel-fpga


【解决方案1】:

以下内容满足您的要求:

process
begin
  wait until falling_edge(rd);
  wait for 15 ns;
  db_output <= db_input;
end process;

【讨论】:

    猜你喜欢
    • 2021-08-29
    • 1970-01-01
    • 1970-01-01
    • 2011-10-09
    • 2020-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多