我遇到麻烦的代码将控制字分成几段,以便它们可以被各自的电路使用。
当我尝试编译此代码时,每个别名行都会出现两个10500错误:
“附近的文本为“别名”;应为“end”或“(”或标识符或并发语句”
“接近文字"is";期望“;”或“通用”。
我尝试添加“结束”;和别名声明后的“end alias”,但仍返回相同的错误。
我还尝试在声明的各个部分添加“信号”,但这仍然导致相同的错误。
最初,我已经在此块之前将std_logic_vector转换为bit_vector,并且别名输出是位类型而不是std_logic,但我以类型转换为问题将其更改为std_logic。
--Splits control word into specific sections.
Architecture split of t11214 is
Begin
Alias enable_input: std_logic is instruction(1);
Alias enable_output: std_logic is instruction(2);
Alias select_accumulator: std_logic is instruction(3);
Alias select_operand: std_logic_vector(1 to 2) is instruction(4 to 5);
Alias select_prcmp: std_logic_vector(1 to 2) is instruction(6 to 7);
Alias select_prenot: std_logic_vector(1 to 2) is instruction(8 to 9);
Alias select_function: std_logic_vector(1 to 2) is instruction(10 to 11);
Alias select_rng: std_logic is instruction(12);
Alias shift: std_logic_vector(1 to 4) is instruction(13 to 16);
End architecture split;
最佳答案
Alias
是声明的一部分,因此,在Begin
的之前,它必须为,例如:Architecture split of t11214 is
...
Alias enable_input: std_logic is instruction(1);
...
Begin
...
End architecture split;
https://stackoverflow.com/questions/26748645/
相关文章:
scala - 使用getOrElse连接两个映射时,类型不匹配编译器错误
compiler-errors - 编译示例Scalapack应用程序时出现问题
intellij-idea - IntelliJ : “java connot find symbo
compiler-errors - 无法解决错误,VHDL,语法错误,但我看不到
android - 关于主要 Activity : 'illegal start of expres
haskell - 用所有字母字符Haskell替换字符串中的所有字符的函数