我有一个并发循环,它有两个错误。这是文件中唯一的代码: 我收到以下错误。我很感激你的帮助。我该如何解决这个问题?
单元过滤器(4)中的信号输出1连接到以下多个驱动程序:
单元滤波器(4)中的信号标志连接到以下多个驱动器:
创建的最小完整且可验证的示例
library ieee;
use ieee.std_logic_1164.all;
-- use IEEE.STD_LOGIC_ARITH.ALL;
-- use IEEE.std_logic_unsigned.ALL ;
entity ex_case is
port ( output: out std_ulogic_vector(3 downto 0) );
end entity ex_case;
-- signal flag1: boolean := '0'; -- this declaration does not belong here
architecture a1 of ex_case is
signal flag1: std_ulogic := '0'; -- was erroneously type boolean
begin
loop1:
for j in 0 to 3 generate -- for loop outputting data
flag1 <= '0'; -- reset the flag, same as output_ready
loop2:
for i in 0 to 3 generate
output(j) <= '1' when i >= j and flag1 = '0' else
'0' when flag1 = '0';
flag1 <= '1' when i >= j and flag1 = '0'; -- output when valid data is available
end generate loop2;
end generate loop1;
end architecture a1;
注意:flag1和output的类型都更改为未解析的类型,以允许显示两个算法错误。