带有 Sigasi 编辑器的 VHDL 中不完整的敏感度列表

Incomplete sensitivity list in VHDL with Sigasi editor

目前,我尝试发展我的 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放在敏感列表中,因为它完全依赖于clockreset

现在什么是正确的?

简而言之,您的

else
  innerValue <= ... 
end if;

在经典数字硬件中没有意义,因为在这种情况下,您的 else 表示:

  • clockreset(或两者)已更改,并且
  • reset不等于'1',且
  • 这不是 clock 的上升沿。

所以,可以是:

  • reset 的下降沿,或
  • clock 的下降沿,而 reset 等于 '0'

可能不是您想要的。如果它是你想要的,你应该尝试找到另一种目标技术。经典数字硬件无法实现这一点,因为在 ASIC 标准单元库或 FPGA 中没有多时钟、多边缘、寄存器。

你是不是这个意思?

elsif rising_edge(clock) then
  if set = '1' then
    innerValue <= initValue;
  else
    innerValue <= innerValue(WIDTH - 2 downto 0) & innerValue(WIDTH - 1);
  end if;
end if;