使用时的VHDL语法错误

时间:2017-01-04 12:47:55

标签: vhdl quartus

我有以下代码:

DATA_LCD <= DATA_ROM when SW(1)='0' or char_code<97 or char_code>122 else
                 std_logic_vector(char_code-32); -- no modification in this code
                     DATA_ROM when SW(2)='0' else
                     std_logic_vector(char_code+1);

但是当我尝试编译它时会出现以下错误:

  

错误(10500):LCD_FSM.vhd(57)处的VHDL语法错误接近文本&#34; =&#34 ;;期待&#34;(&#34;,或&#34;&#39;&#34;,或&#34;。&#34;

     

错误(10500):LCD_FSM.vhd(57)的VHDL语法错误接近文本&#34;当&#34 ;;期待&#34;(&#34;,或&#34;&#39;&#34;,或&#34;。&#34;

我该如何解决?

1 个答案:

答案 0 :(得分:0)

Brian是对的,第3行是一个新的(格式错误的)陈述。 你忘了把另一个DATA_LCD&lt; =放在它的开头。

DATA_LCD <= DATA_ROM when SW(2)='0' else std_logic_vector(char_code+1);