我想單獨設置一個std_logic_vector的位,以便輕鬆設置單個位或一組位的註釋。以下是我有:VHDL std_logic_vector索引與「downto」
signal DataOut : std_logic_vector(7 downto 0);
...
DataOut <= ( 5=>'1', -- Instruction defined
4=>'1', -- Data length control bit, high=8bit bus mode selected
3=>'1', -- Display Line Number ctrl bit, high & N3 option pin to VDD=3 lines display
2=>'0', -- Double height font type control byte, not selected
1 downto 0=>"01", -- Select Instruction table1
others=>'0' -- for bits 6,7
);
不過,我有一個問題與「DOWNTO」的聲明,我得到採用Xilinx ISE以下錯誤:
Type std_ulogic does not match with a string litteral
任何解決方案,以避免使用等效
1=>'0',
0=>'1',
並允許我逐塊設置?
是,它是一種解決方案,但與'1 =>'0'相同, 0 =>'1','。如果你只是想初始化矢量,例如,這是更好,但還不完美... – feronjb 2013-03-11 11:55:02
將位1..0設置爲零,可以使用「,... 1 downto 0 =>'0',...」(與「其他」相同)。 – baldyHDL 2013-03-11 12:50:44