標識符(Identifiers)
標識符為保留字和用戶定義的參數名。別名是已存在項的別名。組是項的集合。 Identifiers are used as reserved Words and as names defined by the designer. An alias is an alternative name for an existing named item. Group is a collection of items.
命名(Name)
VHDL的項通過其名字來區分。 Any VHDL item is identified by its name.
語法(Syntax)
identifier -- simple name/extended_identifier/"Operator"attribute_namename.name. ... -- selected namename(range) -- slice namename(exPRession, ...) -- indexed name說明(Description)
當聲明了一個有名字的標識符,就可以引用這個標識符。然而并不總是使用標識符來引用一個項或者其一部分。 Any declaration that introduces a named item defines an identifier which enables reference to such an item by using this identifier. However, it is not always possible to refer to an item or part of it by using just its identifier. 更多情況下是通過名字來引用項。名字中也包含目標的訪問類型,復合類型的元素,復合目標的一部分或者在聲明中有標識符的單位屬性。名字有以下幾種形式: More general form of reference to items is by a name. Names can also indicate objects of the access type, elements of the composite type, parts of the composite object or unit attributes which have an identifier in their declaration. The name can have any of the following forms:
簡單名——簡單名僅有標識符,在聲明中把他分配給給定單元simple name – The simple name consists only of the identifier, which is assigned to a given unit in its declaration運算符——運算符符號是字符串字面符號,它表示為該運算符符號聲明的函數operator symbol – The operator symbol is a string literal, which indicates the function declared for such an operator symbol屬性名——標識符及其屬性的組合attribute name – The combination of the identifier and its attribute選取名——選取名通常用來從庫或包中選取一個項selected name – A selected name is commonly used to pick an item out of a library or package片名——片名用來選取一維數組的一部分slice name – A slice name is used to pick out a part of an one-dimensional array索引名——索引名從一個數組中選取一個獨立項indexed name – An indexed name is used to pick an individual item out of an array一個名包含字母、數字和下劃線。當使用擴展標識符時,第一個字符不能是字母,最后一個字符是下劃線,或者標識符有兩個相鄰的下劃線。 A name consists of letters, digits and underscores. The extended_identifier has to be used when the first character is not a letter, the last character is an underscore, or when the identifier has two adjacent underscores.
例程(Examples)
ABC_66 -- simple name/4A*@_/ -- extended identifier"+" -- operator Clk'Event -- attribute nameIEEE.std_logic_1164."nor" -- selected name SignalSlice(12 to 15) -- slice nameDataSignal(5) -- indexed name注釋(Note)
VHDL的保留字不能被用于其他項的命名。None of the VHDL reserved words may be used as a name for other items.新聞熱點
疑難解答