目前,我尝试开发我的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
.
什么是正确的,现在?
2 回答
你或许是这个意思吗?
为了简短,你的
在经典的数字硬件中没有意义,因为在这种情况下你的
else
意味着:clock
或reset
(或两者)已更改,并且reset
不等于'1'
,并且这不是
clock
的上升沿 .所以,它可以是:
reset
的下降沿,或clock
的下降沿,而reset
等于'0'
.可能不是你想要的 . 如果它是您的意图,您应该尝试找到另一种目标技术 . 传统的数字硬件无法实现这一点,因为ASIC标准单元库或FPGA中没有多时钟,多边沿寄存器 .