compiler-errors - 针对别名声明的错误10500

标签 compiler-errors syntax-error vhdl hdl

我遇到麻烦的代码将控制字分成几段,以便它们可以被各自的电路使用。

当我尝试编译此代码时,每个别名行都会出现两个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;

关于compiler-errors - 针对别名声明的错误10500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26748645/

相关文章:

VBA for Dummies 示例,显示给出语法错误的消息框

vhdl - 在 VHDL 中,数据类型转换与位数组操作的成本有多高?

vhdl - 如何在 VHDL 中实例化通用设计的参数化版本?

counter - "Warning C0007 : Architecture has unbound instances"问题!

c++ - "error: invalid conversion from ' int' 到 'int (*)[8]' [-fpermissive] 的含义是什么?

java - 无法在 Java 中调用通用对象的方法

c++ - 预编译 WebRTC 库中的语法错误

Swift 泛型复杂的继承

oracle - 尝试使用DBMS_DDL.ALTER_COMPILE时出现ORA-20000错误

php - 解析错误 : syntax error, 意外 '[',期待 ')'