【发布时间】:2026-01-25 03:30:01
【问题描述】:
我正在尝试模拟一个简单的寄存器和移位功能。这里是我使用的代码:
entity shift is port (
CLK : in bit );
end shift ;
architecture BEHAV of shift is
signal REG: bit_vector(9 downto 0) ;
signal WORD: bit:='1';
begin
SYS :process (CLK)
begin
if CLK'event and CLK='1' then
REG <= REG(9 downto 0) & WORD; -- line cause the error
end if;
end process SYS;
end BEHAV ;
我使用了一个模拟时钟的 do 文件,但我得到一个错误,上面写着:
# ** Fatal: (vsim-3420) Array lengths do not match. Left is 10 (9 downto 0). Right is 11 (0 to 10).
并知道我在这里做错了什么? 提前致谢 !
【问题讨论】:
标签: vhdl