我想单独设置一个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