- 1、本文档共23页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[信息与通信]VHDL参考资料
VHDL快速参考手册PRIMARY DESIGN UNIT MODEL STRUCTURE
Each?VHDL design unit comprises an entity declaration and one or more architectures. Each architecture defines a different implementation or model of a given design unit. The entity definition defines the inputs to, and outputs from the module, and any generic parameters used by the different implementations of the module.
Entity Declaration Format
??? entity? name? is
??????? port( port definition list );-- input/output signal ports
??????? generic( generic list);?? -- optional generic list
??? end name;
Port declaration format:port_name: mode data_type;
Themodeof a port defines the directions of the singals on that pirt, and is one of: in, out, buffer, or inout.
Port Modes:
An in port
can be read but not updated within the module, carrying information into the module. (An in port cannot appear on the left hand side of a signal assignment.)
An out port
can be updated but not read within the module, carrying information out of the module. (An out port cannot appear on the right hand side of a signal assigment.)
A buffer port
likewise carries information out of a module, but can be both updated and read within the module.
An inout port
is bidirectional and can be both read and updated, with multiple update sources possible.
? NOTE: A buffer is strictly an output port, i.e. can only be driven from within the module, while inout is truly bidirectional with drivers both within and external to the module.
Example
?? entity counter is
??????? port (Incr, Load, Clock: in???? bit;
????????????? Carry:???????????? out??? bit;
????????????? Data_Out:????????? buffer bit_vector(7 downto 0);
????????????? Data_In:?????????? in???? bit_vector(7 downto 0));
?? end counter;
Generics allow static information to be communicated to a block from its environment for all architectures of a design unit. These include timing information (setup, hold, delay times), part sizes, and other parameters.
Example
??? entity and_gate is
?
文档评论(0)