Transcription of 3. VHDL 문법기초 한동일 - dasan.sejong.ac.kr
1 vhdl vhdl 3. vhdl vhdl . vhdl vhdl . vhdl . vhdl .. (literal) .. (type) . (type) .. 2/73 . vhdl vhdl (reserved word) (identifier) (identifier) (literal) () (comment) (operator) (type)3/73 vhdl vhdl (graphic code) (g p) ISO/IEC 8859-1: 1987, Information Processing - 8-bit Single-Byte Coded Graphic Character Sets -- Part 1: Latin Alphabet No. 1. (format effector) (horizontal tab)() (vertical tab) (carriage return) (line feed) (line feed) (form feed) -- /* */ (2008 )4/73().
2 191 191 5/73 6/73 vhdl vhdl vhdl 7 vhdl vhdl 8 vhdl (separotor) (delimiter) (reserved word) (reserved word) (identifier) (literal) (literal) (comment)9/73. (t) (separator) (space), (format effector), (End of line) 10/73. (d li it ) (delimiter) (single delimiter) (compound delimiter) &'(AmpersandApostrophe, tickLftth , minus signDot, point, periodSl h di idlid>`|Greater-than signGrave accentVti lli (b )()*+Left parenthesisRight parenthesisAsterisk, multiplyPlus sign/:;<Slash, divide, solidusColonSemicolonLessthan sign|[]?)
3 Vertical line(bar)Left square bracketRight square bracketQuestion mark11/73+,Plus signComma<=Less-than signEquals sign?@Question markCommencial at. (d li it ) (delimiter) =>:=>=ArrowVariable assignmentGreater than or equal**/=<=Double star, exponentiationInequality, not equalLess than or equal, signal assignment<>?=?<?BoxMatching equalityMatching less than M t hitth???/=?<=?Condition conversionMatching inequalityMatching less than or equalMthit thl?> <<Matching greater than Double less than?>=>>Matching greater than or equalDouble greater than12/73 (dd) (reserved word) 115 (2008 ) 13/73 : 10762008.
4 1076-2008 absaccessafteraliasallandarchitecturearr ayassertassumeassume_guaranteeattributeb eginblockbodybufferbuscasecomponentconfi gurationdf ldidlconstantcontextcoverdefaultdisconne ctdowntoelseelsifendentityexitfairnessfi leforforcefunctiongenerategenericgroupgu ardedifgggpgimpureininertialinoutislabel librarylinkageliteralloopmapmodnandnewll fnextnornotnullofonopenorothersoutpackag eparameterportpostponedprocedureprocessp ropertyprotectedpurerangerecordpppp yppgregisterrejectreleaseremreportrestri ct_guaranteerestrictreturnrolrorselectse quenceseverityisignalsharedslasllsrasrls trongsubtypethentotransporttypeunaffecte dunitsuntilusevariablevmodevpropvunitwai t14/73ppwhenwhilewithxnorxor (id tifi ) (identifier) , ( ) ) (basic identifier) (basic identifier) (extended identifier)15/73.
5 BNF BNF identifier ::= basic_identifier | extended_identifierbasic_identifier ::= letter { [ underline ] letter_or_digit}{__g}letter_or_digit ::= letter | digit__g|gletter ::= upper_case_letter | lower_case_letterextended_identifier ::= \ graphic_character { graphic_character } \16/73 COUNT, A, DCT, FrameCount X9, ADD1, Pentium4, P4C1 RSTFCtADD A B RST_n, Frame_Count, ADD_A_B 9X 9X : _carry_out : ADD A B : ADD__A_B : DCT_ : \ELSE\\200$\\ADD A B\\DCT\\74LS32\17/73 \ELSE\, \200$\, \ADD__A_B\, \DCT_\, \74LS32\. (lit l) (literal) constantHTOTAL_WIDTH : integer := 512;constantMAX_BIN : string := B"1111_1111_1111";constantMAX_HEX : BIT_VECTOR := X"FFF";typeVOLTAGE_RANGE is range.
6 512 B"1111_1111_1111" X"FFF" -15 018/73 (lit l) (literal) decimal literalabstract literalbased literalreal literalliteralcharacter literalstring literalinteger literalstring literalbit string literal19/73g (bt tlit l) (abstract literal) (real literal) (integer literal) (decimal literal) (b d li l) (based literal) 0 20/73 . BNF BNF decimal_literal ::= integer [ . integer ] [ exponent ]integer ::= digit { [ underline ] digit }exponent ::= E [ + ] integer | E integer 15, 0, 1E6, 123_456_789 , , +6, , constantHALF PERIOD : time :=50E3ns ;21/73constant HALF_PERIOD : time :=.
7 BNF BNF based_literal ::= base # based_integer [ . based_integer ] # [ exponent ]base ::= integerbased_integer ::= extended_digit { [ underline ] extended_digit }extended_digit ::= digit | letterexponent ::= E [ + ] integer | E - integer 2 ~ 16 2 2#1111_1110#, 2# #E11 16 22/73 16#FE#, 16# #E+2. (h t lit l) BNF (character literal) BNF character_literal ::= 'graphic_character' 191 a A @ 1 a, A, @, , , 1 a ab 23/73 a, ab. (ti lit l) BNF (string literal) BNF string_literal ::= "{graphic_character}" & a , , -- 1 ifld/li tt 24/73.
8 (bit t i lit l) BNF (bit string literal) BNF bit_string_literal ::= [ integer ] base_specifier "[bit_value]"bit_value ::= graphic_character { [ underline ] graphic_character }base_specifier ::= B | O | X | UB | UO | UX | SB | SO | SX | D 2, 8, 16 0~9, A~F, U , X , 0 , 1 , Z , W , L , H , - ( ) Integer : base specifier B : , O : 8 , X : 16 25/73 U : std_ulogic, S : std_logic, D : . bit string literallengthequivalent valuebit string literallengthequivalent valueB""B"1111 1111"08empty bit string"11111111"B"1111_1111"X"FF"O"77"88 6"11111111"B"1111_1111"B"111_111"X"77"B" XXXX_10HL"X"F-"888B"0111_0111""XXXX10HL" B"1111----"12X"F-"12SX"XXA0"81212_B"0000 _1111_---- B"XXXX_1010_0000" 26/73 (t) (comment) vhdl vhdl (single-line comment) (delimited comment) -- -- -- (vertical tab), (carriage return)27/73 (line feed)
9 , (form feed). /* */ /* */ /* -- vhdl , vhdl ---- The first two hyphens start the ;--End of processend; --End of processr_image := 255; /* Comments /* do not nest */-- 28/73-- .. vhdl vhdl SABllfi S <= A xorB; -- calculate sum of two input , , , S : <= : A : xor : B: B : ; : -- : 29/73 (operator) (operator) (t) ? (operator) ? (expression) 8 , operator classoperatorsprecedencecondition?
10 ?lowconditionlogicalrelationalshift??and | or | nand | nor | xor | xnor= | /= | < | <= | > | >= | ?= | ?/= | ?< | ?<= | ?> | ?>=sll|srl|sla|sra|rol|rorlowshiftadding signmultiplyingsll| srl| sla| sra| rol| ror+ | - | &+ | -* | / | mod | rem30/73py gmiscellaneous|||** | abs | nothigh. (operator) (operator) ( ditit ) (condition operator) (unary operator) IEEE Standard 1076-2008 function "??" (anonymous: BIT) return BOOLEAN; bit boolean 1 TRUE 0 FALSE 31/73 (operator) (operator) (l i lt ) (logical operator) bit, boolean (standard ) nand, nor 32/73 (logical operator) (logical operator) signala, b, c, b1, b2, b3, b4, b5, b6, b7, b8 : boolean;-- b5 <= a nandb nandc; -- b6 <= a norb norc; -- b7 <= a andb orc ; -- -- b1 <= a andb andc andd ;b2 <= a orb orc;b3 <= a xorb xorc xord;b4 <= a xnorb xnorc;b5 <= (a nandb) nandc;33/73b7 <= a and(b orc).