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