【发布时间】:2019-06-29 16:23:20
【问题描述】:
我正在尝试使用具有以下特征的 VHDL 创建相位累加器。
输入:
- D(输入信号)
- 重置
- CE
- 时钟
输出:
- Q(输出信号 - 反馈)
源代码:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Phase_accu is
port (
D : in std_logic_vector(3 downto 0);
CE : in std_logic;
CLK : in std_logic;
RESET : in std_logic;
Q : out std_logic_vector(15 downto 0)
);
end Phase_accu;
architecture Behavioral of Phase_accu is
begin
process(D, CE, CLK, RESET)
begin
if RESET = '1' then
Q <= "0000000000000000";
elsif rising_edge(CLK) then
if CE = '1' then
Q <= ("000000000000" & D) + Q;
end if;
end if;
end process;
end Behavioral;
我在尝试将 2 个反馈信号合并在一起时遇到错误...
Q <= ("000000000000" & D) + Q;
无法读取输出“Q”。
【问题讨论】:
-
删除代码第一行
library之前多余的use并使用 VHDL 版本 -2008 分析和详细说明您的代码(在 -2008 中可以评估模式输出端口)。请提供minimal reproducible example,包括完整的错误消息并标识您的工具正在执行的操作,不能保证问题可以按原样重现。
标签: vhdl feedback accumulator phase