我需要count_x
通过 avalon 内存映射接口向 HPS 获取 32 位数据。第一个和第二个案例工作正常。我将数据发送到 HPS。但在第三种情况下WHEN '2' => avs_s0_readdata <= count_x(31 downto 0);
,它显示一个错误,因为''2'' is not declared,这是什么意思?Vhdl 在 Altera quartus 16.1 中完成,HPS 系统在 Qsys 中完成。
architecture behavior of encorder is
signal count : STD_LOGIC_VECTOR(31 DOWNTO 0);
signal count_x : STD_LOGIC_VECTOR(31 DOWNTO 0);
signal count_y : STD_LOGIC_VECTOR(31 DOWNTO 0):= x"00000000";
begin
PROCESS(avs_s0_read)
BEGIN
IF avs_s0_read = '1' THEN
CASE(avs_s0_address) IS
WHEN '2' => avs_s0_readdata <= count_x(31 downto 0);
WHEN others => avs_s0_readdata <= x"00000000";
END CASE;
ELSE
avs_s0_readdata <= x"00000000";
END IF;
END PROCESS;`