【发布时间】:2016-08-06 01:08:29
【问题描述】:
目前,我尝试发展我的 VHDL 技能,因此我使用 Eclipse 的 Sigasi 插件来编写一些 VHDL 代码。 Sigasi 是一个很棒的工具,但是有一件事情让我很困扰。 Sigasi 不断地抛出关于流程定义中不完整的敏感性列表的警告,从我的角度来看,这是不合理的。一个示例是具有相应架构的以下实体。这是一个环形移位寄存器的描述
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity RingShiftReg is
generic(
WIDTH : integer := 8
);
port(
clock : in std_ulogic;
reset : in std_ulogic;
set : in std_ulogic;
initValue : in std_ulogic_vector(WIDTH - 1 downto 0);
value : out std_ulogic_vector(WIDTH - 1 downto 0)
);
end;
architecture ringShiftRegArch of RingShiftReg is
signal innerValue : std_ulogic_vector(WIDTH - 1 downto 0);
begin
P1: process(clock, reset)
begin
if reset = '1' then
innerValue <= (others => '0');
elsif rising_edge(clock) then
if set = '1' then
innerValue <= initValue;
end if;
else
innerValue <= innerValue(WIDTH - 2 downto 0) & innerValue(WIDTH - 1);
end if;
end process;
value <= innerValue;
end ringShiftRegArch;
Sigasi Linter 声称进程P1 的敏感度列表不完整,因为信号innerValue 丢失。但在我看来,没有必要将innerValue 放在敏感列表中,因为它完全依赖于clock 和reset。
什么是正确的,现在?
【问题讨论】:
-
西加西。不一定是您可能认为的原因。当任何挂起的进程尚未恢复或暂停时,innerValue 不会更新。您暗示上次分配的事件延迟。将 innerValue 放入敏感度列表也是一个错误,它会导致 innerValue 在连续的增量周期中不断更新(如果实施,直到达到限制)。赋值是一个组合循环。为什么不设置 innerValue 以匹配从 initValue 分配的 if 语句中最后一个分配中的右手表达式?或者在进程中声明innerValue为变量。
-
您的过程没有对可以在大多数技术(ASIC 或 FPGA)中实现的数字硬件进行建模。我可以建议仔细阅读几个小时前针对非常相似的问题Match Simulation and Post-Synthesis Behavior in VHDL 写的答案吗?
标签: vhdl sigasi-studio