首页 文章

使用时的VHDL语法错误

提问于
浏览
0

我有以下代码:

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语法错误;期望“(”,“或”,“或” . “错误(10500):LCD_FSM.vhd(57)处的VHDL语法错误接近文本”when“;期待”(“,”或“,或” . “

我该如何解决?

1 回答

  • 0

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

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

相关问题