app1.2.htm

来自「介绍asci设计的一本书」· HTM 代码 · 共 2,636 行 · 第 1/5 页

HTM
2,636
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">

<HTML>

<HEAD>

<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">



<TITLE> A.2&nbsp;	VHDL Syntax</TITLE></HEAD><!--#include file="top.html"--><!--#include file="header.html"-->



<DIV>

<P>[&nbsp;<A HREF="APP1.htm">Chapter&nbsp;start</A>&nbsp;]&nbsp;[&nbsp;<A HREF="APP1.1.htm">Previous&nbsp;page</A>&nbsp;]&nbsp;[&nbsp;<A HREF="APP1.3.htm">Next&nbsp;page</A>&nbsp;]</P><!--#include file="AmazonAsic.html"--><HR></DIV>

<H1 CLASS="zAppHeading1">

<A NAME="pgfId=239">

 </A>

A.2&nbsp;	<A NAME="32688">

 </A>

VHDL Syntax</H1>

<P CLASS="zAppBodyAfterHead">

<A NAME="pgfId=80391">

 </A>

In the rules that follow an <A NAME="marker=80390">

 </A>

underline (<SPAN CLASS="BodyComputerUndrln">

like this</SPAN>

) indicates syntax that is present in VHDL-93, but not in VHDL-87. A <A NAME="marker=80392">

 </A>

strikethrough (<SPAN CLASS="BodyComputerStrike">

like this</SPAN>

) indicates syntax that is present in VHDL-87, but not in VHDL-93; this occurs only in the rule for <SPAN CLASS="BodyComputer">

file_declaration</SPAN>

 (rule <A HREF="APP1.2.htm#25989" CLASS="XRef">

38</A>

). This means that any VHDL-87 code that contains keywords <SPAN CLASS="BodyComputerKeyword">

in</SPAN>

 or <SPAN CLASS="BodyComputerKeyword">

out</SPAN>

 in a file declaration will not compile in a VHDL-93 environment. Except for this one exception, VHDL-93 is a superset of VHDL-87. </P>

<P CLASS="zAppBody">

<A NAME="pgfId=76994">

 </A>

The VHDL productions are in alphabetical order. The highest-level production is the definition for <SPAN CLASS="BodyComputer">

design_file</SPAN>

; this is where you start to traverse the tree starting at the top level. The following parts (indicated by the use of uppercase in the BNF) are the lowest-level constructions: <SPAN CLASS="BodyComputer">

UPPER_CASE_LETTER</SPAN>

 (<SPAN CLASS="BodyComputer">

A&#8211;Z</SPAN>

 plus accented uppercase letters), <SPAN CLASS="BodyComputer">

LOWER_CASE_LETTER</SPAN>

 (<SPAN CLASS="BodyComputer">

a&#8211;z</SPAN>

 and accented lowercase letters, <SPAN CLASS="BodyComputer">

&eacute;</SPAN>

, and so on), <SPAN CLASS="BodyComputer">

LETTER</SPAN>

 (either uppercase or lowercase letters, <SPAN CLASS="BodyComputer">

a&#8211;Z</SPAN>

, and all accented letters), <SPAN CLASS="BodyComputer">

DIGIT</SPAN>

 (<SPAN CLASS="BodyComputer">

0&#8211;9</SPAN>

), <SPAN CLASS="BodyComputer">

SPACE_CHARACTER</SPAN>

 (<SPAN CLASS="BodyComputer">

' '</SPAN>

 and <A NAME="marker=77020">

 </A>

nonbreaking space), <SPAN CLASS="BodyComputer">

UNDERLINE</SPAN>

 (<SPAN CLASS="BodyComputer">

'_'</SPAN>

), <SPAN CLASS="BodyComputer">

SPECIAL_CHARACTER</SPAN>

 (<SPAN CLASS="BodyComputer">

&quot; # &amp; ' () * + , - . / : ; &lt; = &gt; [ ] _ |</SPAN>

), and <SPAN CLASS="BodyComputer">

OTHER_SPECIAL_CHARACTER</SPAN>

 (all remaining characters such as <SPAN CLASS="BodyComputer">

! $ % @ ?</SPAN>

 and so on, but not including <A NAME="marker=77014">

 </A>

format effectors). Format effectors are the ISO (and ASCII) characters called <A NAME="marker=77009">

 </A>

horizontal tabulation, <A NAME="marker=77010">

 </A>

vertical tabulation, <A NAME="marker=77011">

 </A>

carriage return, <A NAME="marker=77012">

 </A>

line feed, and <A NAME="marker=77013">

 </A>

form feed.</P>

<P CLASS="zAppBody">

<A NAME="pgfId=76993">

 </A>

Keywords are shown in <SPAN CLASS="Bold">

bold</SPAN>

<A NAME="marker=73363">

 </A>

. Notice that the terms <SPAN CLASS="Emphasis">

label, literal,</SPAN>

 and <SPAN CLASS="Emphasis">

range</SPAN>

 are keywords (<SPAN CLASS="BodyComputerKeyword">

label</SPAN>

, <SPAN CLASS="BodyComputerKeyword">

literal</SPAN>

, <SPAN CLASS="BodyComputerKeyword">

range</SPAN>

) and are also used as the name of a part (<SPAN CLASS="BodyComputer">

label</SPAN>

, <SPAN CLASS="BodyComputer">

literal</SPAN>

, <SPAN CLASS="BodyComputer">

range</SPAN>

), as they are in the LRM. Construct names that commence with <SPAN CLASS="Emphasis">

italics</SPAN>

<A NAME="marker=41458">

 </A>

, such as <SPAN CLASS="BodyComputerEmphasis">

time</SPAN>

<SPAN CLASS="BodyComputer">

_expression</SPAN>

, are intended to make the syntax definitions easier to read. The italic part of the construct is treated as a comment. You look up the definition for <SPAN CLASS="BodyComputerEmphasis">

time</SPAN>

<SPAN CLASS="BodyComputer">

_expression</SPAN>

 under <SPAN CLASS="BodyComputer">

'e'</SPAN>

 for expression, not <SPAN CLASS="BodyComputer">

't'</SPAN>

 for time. There are no formal definitions of the italic modifiers; if you are not sure exactly what is meant, you must look up the semantics in the body of the LRM.</P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=55190">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63002" CLASS="Index">

actual_part</A>

</SPAN>

<A NAME="10708">

 </A>

 ::= [93LRM 4.3.2.2] [1]</P>

<P CLASS="zAppComputer">

<A NAME="pgfId=55191">

 </A>

	<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=55192">

 </A>

	| <SPAN CLASS="ComputerEmphasis">

signal_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 | <SPAN CLASS="ComputerEmphasis">

variable_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 <SPAN CLASS="ComputerUnderline">

| </SPAN>

<SPAN CLASS="ComputerEmphasisUndrln">

file_</SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 </SPAN>

| <SPAN CLASS="ComputerKeyword">

open</SPAN>

 </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=259">

 </A>

	| <SPAN CLASS="ComputerEmphasis">

function_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 (<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 | <SPAN CLASS="ComputerEmphasis">

signal_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 | <SPAN CLASS="ComputerEmphasis">

variable_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 <SPAN CLASS="ComputerUnderline">

|</SPAN>

<SPAN CLASS="ComputerEmphasisUndrln">

file_</SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 | <SPAN CLASS="ComputerKeyword">

open</SPAN>

) </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=12417">

 </A>

	<SPAN CLASS="ComputerUnderline">

| </SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=947" CLASS="Index">

type_mark</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 ( </SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 | </SPAN>

<SPAN CLASS="ComputerEmphasisUndrln">

signal_</SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 | </SPAN>

<SPAN CLASS="ComputerEmphasisUndrln">

variable_</SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 | </SPAN>

<SPAN CLASS="ComputerEmphasisUndrln">

file_</SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 | </SPAN>

<SPAN CLASS="ComputerKywrdUndrln">

open</SPAN>

<SPAN CLASS="ComputerUnderline">

) </SPAN>

</P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=13538">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63021" CLASS="Index">

aggregate</A>

</SPAN>

<A NAME="10278">

 </A>

 ::= [93LRM 7.3.2] [2]</P>

<P CLASS="zAppComputer">

<A NAME="pgfId=13539">

 </A>

	( [ <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=401" CLASS="Index">

choice</A>

</SPAN>

 { | <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=401" CLASS="Index">

choice</A>

</SPAN>

 } =&gt; ] <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 {, [ <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=401" CLASS="Index">

choice</A>

</SPAN>

 { | <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=401" CLASS="Index">

choice</A>

</SPAN>

 } =&gt; ] <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 } ) </P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=267">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63049" CLASS="Index">

alias_declaration</A>

</SPAN>

<A NAME="27805">

 </A>

 ::= [93LRM 4.3.3] [3]</P>

<P CLASS="zAppComputer">

<A NAME="pgfId=1705">

 </A>

	<SPAN CLASS="ComputerKeyword">

alias</SPAN>

 <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=61295" CLASS="Index">

identifier</A>

</SPAN>

 <SPAN CLASS="ComputerUnderline">

| ' </SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=45677" CLASS="Index">

graphic_character</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 ' | &quot; { </SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=45677" CLASS="Index">

graphic_character</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 } &quot;</SPAN>

 </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=12332">

 </A>

	<SPAN CLASS="ComputerUnderline">

[</SPAN>

 : <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=45797" CLASS="Index">

subtype_indication</A>

</SPAN>

 <SPAN CLASS="ComputerUnderline">

]</SPAN>

 <SPAN CLASS="ComputerKeyword">

is</SPAN>

 <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 <SPAN CLASS="ComputerUnderline">

[ </SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14863" CLASS="Index">

signature</A>

</SPAN>

<SPAN CLASS="ComputerUnderline">

 ]</SPAN>

 ; </P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=271">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63089" CLASS="Index">

architecture_body</A>

</SPAN>

<A NAME="42128">

 </A>

<A NAME="25011">

 </A>

 ::= [93LRM 1.2] [4]</P>

<P CLASS="zAppComputer">

<A NAME="pgfId=281">

 </A>

	<SPAN CLASS="ComputerKeyword">

architecture</SPAN>

 <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=61295" CLASS="Index">

identifier</A>

</SPAN>

 <SPAN CLASS="ComputerKeyword">

of</SPAN>

 <SPAN CLASS="ComputerEmphasis">

entity_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=14342" CLASS="Index">

name</A>

</SPAN>

 <SPAN CLASS="ComputerKeyword">

is</SPAN>

 </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=283">

 </A>

		{ <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=359" CLASS="Index">

block_declarative_item</A>

</SPAN>

 } </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=285">

 </A>

	<SPAN CLASS="ComputerKeyword">

begin</SPAN>

 </P>

<P CLASS="zAppComputer">

<A NAME="pgfId=287">

 </A>

		{ <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=463" CLASS="Index">

concurrent_statement</A>

</SPAN>

 } </P>

<P CLASS="zAppComputerLast">

<A NAME="pgfId=289">

 </A>

	<SPAN CLASS="ComputerKeyword">

end</SPAN>

 <SPAN CLASS="ComputerUnderline">

[ </SPAN>

<SPAN CLASS="ComputerKywrdUndrln">

architecture</SPAN>

<SPAN CLASS="ComputerUnderline">

 ]</SPAN>

 [<SPAN CLASS="ComputerEmphasis">

architecture_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=61295" CLASS="Index">

identifier</A>

</SPAN>

 ]; </P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=293">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63168" CLASS="Index">

assertion</A>

</SPAN>

<A NAME="13842">

 </A>

 ::= [93LRM 8.2] [5]</P>

<P CLASS="zAppComputer">

<A NAME="pgfId=295">

 </A>

	<SPAN CLASS="ComputerKeyword">

assert</SPAN>

 <SPAN CLASS="ComputerEmphasis">

boolean_</SPAN>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 [ <SPAN CLASS="ComputerKeyword">

report</SPAN>

 <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 ] [ <SPAN CLASS="ComputerKeyword">

severity</SPAN>

 <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18431" CLASS="Index">

expression</A>

</SPAN>

 ] </P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=299">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63190" CLASS="Index">

association_list</A>

</SPAN>

<A NAME="11129">

 </A>

 ::= [93LRM 4.3.2.2] [6]</P>

<P CLASS="zAppComputer">

<A NAME="pgfId=301">

 </A>

	[ <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18274" CLASS="Index">

formal_part</A>

</SPAN>

 =&gt; ] <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=55190" CLASS="Index">

actual_part</A>

</SPAN>

 {, [ <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=18274" CLASS="Index">

formal_part</A>

</SPAN>

 =&gt; ] <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=55190" CLASS="Index">

actual_part</A>

</SPAN>

 } </P>

<P CLASS="zAppComputerOneLNmbr">

<A NAME="pgfId=45631">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63224" CLASS="Index">

attribute_declaration</A>

</SPAN>

<A NAME="12660">

 </A>

 ::= [93LRM 4.4] <SPAN CLASS="ComputerKeyword">

attribute</SPAN>

 <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=61295" CLASS="Index">

identifier</A>

</SPAN>

 : <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=947" CLASS="Index">

type_mark</A>

</SPAN>

 ; [7]</P>

<P CLASS="zAppComputerNmbr">

<A NAME="pgfId=45633">

 </A>

<SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=63252" CLASS="Index">

attribute_name</A>

</SPAN>

<A NAME="15646">

 </A>

 ::= [93LRM 6.6] <SPAN CLASS="HyperText">

<A HREF="APP1.2.htm#pgfId=767" CLASS="Index">

prefix</A>

</SPAN>

 <SPAN CLASS="ComputerUnderline">

[ </SPAN>

<SPAN CLASS="HyperTextUnderline">

<A HREF="APP1.2.htm#pgfId=14863" CLASS="Index">

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?