我正在尝试在 Vivado 上运行 VHDL 代码 [不支持检查时钟后的其他子句]

问题描述 投票:0回答:1

这是我第一次去所以如果这是一个简单的问题我很抱歉

process(m_start, flag_start, state_counter, count_7)
    begin
        if rising_edge(m_start) then flag_start <= '1';
        elsif (state_counter = H and count_7 = "111") then flag_start <= '0';
        end if;
end process;

我正在尝试制作一个 111 检测器,用于连续计数前 111 和两个 111,以及一个计数器,用于计算 111 的数量并在达到 7 时重置

这是状态图

enter image description here

确切的错误陈述是 “不支持时钟检查后的其他子句”

vhdl simulation clock vivado
1个回答
-1
投票

时钟进程必须始终具有以下格式之一:

process(reset, clock)
begin
    if reset='1' then
        your_signal <= '0'; -- or another reset value
    elsif rising_edge(clock) then
        your_signal <= ... 
        -- here you can add another if:
        if <condition> then
            ....
        elsif <condition> then
            ....
        end if;
    end if;
end process;

process(clock)
begin
    if rising_edge(clock) then
        your_signal <= ... 
    end if;
end process;

不允许通过附加的 elsif 扩展 if 结构

© www.soinside.com 2019 - 2024. All rights reserved.