vhdl - VHDL 3 位加法器。实体声明错误
问题描述
我对 VHDL 很陌生,我有一段代码无法找出错误。消息是:
Error (10500): VHDL syntax error at 3badder.vhd(6) near text "3"; expecting an identifier
我的代码:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity 3badder is
port( a : in std_logic;
b : in std_logic;
c : in std_logic;
sum : out std_logic;
carry : out std_logic);
end 3badder;
解决方案
名称不能以数字开头,将名称从“3badder”更改为“badder3”。
编辑:
看看一些 VHDL 参考。快速搜索后发现的一个:
https://www.ics.uci.edu/~jmoorkan/vhdlref/Synario%20VHDL%20Manual.pdf
“在 VHDL 中,名称……必须以字母开头……”(2-9)
推荐阅读
- c# - Selenium 无头不阅读菜单
- segue - 有没有办法从分段控件中设置多个 segue?
- azure - 如何使用 PowerShell 创建客户端密码?
- c# - csc 如何知道在哪里寻找标准库 DLL?
- javascript - 在行单击时反应材料 UI 数据网格
- python - Seaborn:不同的函数返回不同的对象类型,例如 FacetGrid 和 AxesSubplot。为什么和有什么区别?
- javascript - Object.getPrototypeOf 和原型
- amazon-web-services - 放置 S3 策略时出错:MalformedPolicy:策略语法无效
- python - 将 Python 模块上传为 AWS Lambda 层
- accelerometer - 为 IMU 加速证明创建算法