0
我试图模拟一个简单的寄存器和移位功能。这里的代码我使用:使用VHDL中的向量
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).
和想法是什么,我做错了什么? 在此先感谢!
感谢你快速回复! – Engine