process(row_t,col,he)
begin
he<=col&row_t;
case he is
when "0111101111"=>bcd_8_t<="00000001"; --01
when "1011101111"=>bcd_8_t<="00000010"; --02
when "1101101111"=>bcd_8_T<="00000011"; --03
when "1110101111"=>bcd_8_T<="00000100"; --04
when "1111001111"=>bcd_8_T<="00000101"; --05
end case;
end process;
这段程序用if语句写的话,编译就会报错,为什么呢?
process(row_t,col,he)
begin
he<=col&row_t;
if he= "0111101111" then bcd_8_t<="00000001"; --01
elsif he= "1011101111" then bcd_8_t<="00000010"; --02
elsif he= "1101101111" then bcd_8_T<="00000011"; --03
elsif he= "1110101111" then bcd_8_T<="00000100"; --04
elsif he= "1111001111" then bcd_8_T<="00000101"; --05
end if;
end process;