当前位置:   article > 正文

vivado VHDL序列逻辑_vld 逻辑

vld 逻辑

VHDL顺序逻辑

当一些分配的信号不是时,VHDL过程是顺序的(与组合相反)在进程内的所有路径中显式分配。生成的硬件具有内部状态或内存(触发器或锁存器)。

建议:使用基于灵敏度列表的描述风格来描述时序逻辑。使用具有灵敏度列表的过程来描述时序逻辑包括:

•时钟信号

•异步控制顺序元件的任何可选信号(异步设置/重置)

•模拟时钟事件的if语句。

Sequential Process With a Sensitivity List Syntax
process (<sensitivity list>)
begin
<asynchronous part>
<clock event>
<synchronous part>
end;

异步控制逻辑建模

任何异步控制逻辑的建模(异步设置/重置)在时钟之前完成事件声明。同步逻辑的建模(数据、可选同步设置/重置、可选时钟enable)在时钟事件的if分支中完成。

Clock Event Statements
Describe the clock event statement as:
• Rising edge clock:
if rising_edge (clk) then
• Falling edge clock:
if falling_edge (clk) then

缺少信号

如果灵敏度列表中缺少任何信号,则合成结果可能与初始结果不同设计规范。在这种情况下,Vivado synthesis会发出警告消息,并添加灵敏度列表中缺少信号。

重要!为了避免模拟过程中出现问题,在HDL源中显式添加所有丢失的信号代码并重新运行合成。

没有灵敏度列表的VHDL顺序过程

Vivado合成允许使用等待语句来描述顺序过程。这个在没有灵敏度列表的情况下描述了顺序过程。wait语句是第一个语句,wait语句中的条件描述顺序逻辑时钟。

重要!同一个顺序进程不能同时具有敏感度列表和等待语句,并且只允许使用一个等待语句。

Sequential Process Using a Wait Statement Coding Example (VHDL)
process begin
wait until rising_edge(clk);
q <= d;
end process;
Describing a Clock Enable in the wait Statement Example (VHDL)
You can describe a clock enable ( clken ) in the wait statement together with the clock.
process begin
wait until rising_edge(clk) and clken = '1';
q <= d;
end process;
Describing a Clock Enable After the Wait Statement Example (VHDL)
You can describe the clock enable separately, as follows:
process begin
wait until rising_edge(clk);
if clken = '1' then
q <= d;
end if;
end process;

描述同步控制逻辑

您可以使用与描述时钟所示相同的编码方法来描述同步控制逻辑,例如同步复位或设置。

重要!不能使用进程来描述具有异步控制逻辑的顺序元素没有敏感度列表。只有具有敏感度列表的进程才允许这样的功能。Vivado合成不允许基于wait语句描述Latch。为了获得更大的灵活性,请描述使用具有敏感度列表的进程的同步逻辑。

VHDL初始值和操作设置/重置

您可以在声明寄存器时对其进行初始化。初始化值是一个常量,可以可以从函数调用中生成。

初始化寄存器示例一(VHDL)

此编码示例指定一个通电值,在该值中初始化顺序元素当电路通电并且应用电路全局复位时。

signal arb_onebit : std_logic := '0';
signal arb_priority : std_logic_vector(3 downto 0) := "1011";
Initializing Registers Example Two (VHDL)
Filename: initial_1.vhd
This coding example combines power-up initialization and operational reset.
--
-- Register initialization
-- Specifying initial contents at circuit powes-up
-- Specifying an operational set/reset
--
-- File: VHDL_Language_Support/initial/initial_1.vhd
--
library ieee;
use ieee.std_logic_1164.all;
entity initial_1 is
Port(
clk, rst : in std_logic;
din : in std_logic;
dout : out std_logic
);
end initial_1;
architecture behavioral of initial_1 is
signal arb_onebit : std_logic := '1'; -- power-up to vcc
begin
process(clk)
begin
if (rising_edge(clk)) then
if rst = '1' then -- local synchronous reset
arb_onebit <= '0';
else
arb_onebit <= din;
end if;
end if;
end process;
dout <= arb_onebit;
end behavioral;
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/879499
推荐阅读
相关标签
  

闽ICP备14008679号