組(Group)
組是已命名項目的集合。 A group is a named collection of items.
語法(Syntax)
group 組模板名 is( 類, ... ); -- 組模板聲明類 = entity | architecture | label | signal | function | group | type | {etc.} [ < > ] group 組名: 組模板名 ( name, ... ); -- 組聲明group group_template_name is( class, ... ); -- group template declarationclass = entity | architecture | label | signal | function | group | type | {etc.} [ < > ] group group_name: group_template_name ( name, ... ); -- group declaration說明(Description)
組將不同命名的項進行關聯,其目的沒有在語言內指明,并且對仿真沒有任何意義。組可以當成是向下游工具傳遞信息的工具。 Groups relate different named items for the purposes not specified by the language, and have no meaning for simulation. Groups can be used to pass information to downstream tools.
設置一個組需要兩個聲明(組模板聲明和組聲明)。 Setting up a group requires two declarations (a group template declaration and a group declaration).
組模板聲明定義了組的模式,由一些具有指定類的命名項連接而成。一個有范圍的類必須有零個或多個單元屬于該組,而且必須是類表中的最后一項。 The group template declaration defines pattern of a group connecting named items with the specified class. A class with range <> allows zero or more units belonging to this group, and must be the last item in this class list.
組聲明將具有指定特征的命名項連接到一起。 The group declaration connects named items having the specified characteristics.
用戶定義的屬性被按照每個命名項分別連接起來,所以每個獨立的命名項都有其各自的屬性。因此當用戶想把信息傳遞個一系列相關的命名項時,就可以定義一個組,然后為整個組指定其屬性。 The user-defined attributes are connected individually with each named item, so each separate named item can have its own attributes. In case when the user wants to assign information to several related named items, a group consisting of these units can be defined, and then specify attributes for the entire group.
組的屬性說明可其他屬性說明一樣。首先聲明所給類型的屬性,然后指定到指定的組。 The attribute specification of a group is realized in a similar way to other attribute specifications. First, the attribute of a given type is declared and it is specified for the given group in its declaration part which contains declaration of the particular group.
Example:
architecture Rtl of Ent1 is group Operations is (function, label <>); group Counters: Operations ("+", C1, C2);begin C1: X <= A + B; C2: Y <= C + D;end Rtl;Note:
組可能被分配網表Groups can be nested.新聞熱點
疑難解答