【问题标题】:Incomplete sensitivity list in VHDL with Sigasi editor使用 Sigasi 编辑器的 VHDL 中不完整的灵敏度列表
【发布时间】: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 放在敏感列表中,因为它完全依赖于clockreset

什么是正确的,现在?

【问题讨论】:

  • 西加西。不一定是您可能认为的原因。当任何挂起的进程尚未恢复或暂停时,innerValue 不会更新。您暗示上次分配的事件延迟。将 innerValue 放入敏感度列表也是一个错误,它会导致 innerValue 在连续的增量周期中不断更新(如果实施,直到达到限制)。赋值是一个组合循环。为什么不设置 innerValue 以匹配从 initValue 分配的 if 语句中最后一个分配中的右手表达式?或者在进程中声明innerValue为变量。
  • 您的过程没有对可以在大多数技术(ASIC 或 FPGA)中实现的数字硬件进行建模。我可以建议仔细阅读几个小时前针对非常相似的问题Match Simulation and Post-Synthesis Behavior in VHDL 写的答案吗?

标签: vhdl sigasi-studio


【解决方案1】:

你也许是这个意思?

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;

【讨论】:

    【解决方案2】:

    简而言之,您的

    else
      innerValue <= ... 
    end if;
    

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

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

    所以,它可以是:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多