配置聲明(Configuration Declaration)
配置是一種如何將多層級的設(shè)計聯(lián)結(jié)到一起的概念。
A configuration is a construct that defines how the design hierarchy is linked together.
語法(Syntax)
configuration configuration_name of entity_name is [ configuration_declarations ] for architecture_name [ configuration_item ] end for;end [ configuration ] [ configuration_name ];configuration_item = for instance_label : component_name [ use_item [ generic_map ] [ port_map ]; ] [ configuration_item ] end for;use_item = entity [ library_name. ] entity_name [ ( architecture_name ) ] | configuration [ library_name. ] configuration_nameconfiguration 配置名 of 實體名 is [ 配置聲明 ] for 結(jié)構(gòu)體名 [ 結(jié)構(gòu)體項 ] end for;end [ configuration ] [ 配置名 ];結(jié)構(gòu)體項 = for 實例標簽 : 元件名 [ 使用項 [ 類屬映射 ] [ 端口映射 ]; ] [ 配置項 ] end for;使用項 = entity [ 庫名. ] 實體名 [ ( 結(jié)構(gòu)體名 ) ] | configuration [ 庫名. ] 配置名 說明(Description)一個配置聲明定義了在加工階段如何將多層級的設(shè)計聯(lián)合起來,通過列出使用的實體和結(jié)構(gòu)體中的每個元件的例化信息。
A configuration declaration defines how the design hierarchy is linked together during elaboration, by listing the entities and architectures used in place of each component instantiation within an architecture.
一個簡單的配置僅包含一個結(jié)構(gòu)體的引用。多層級的配置允許嵌套多個配置。這種機制允許在層級底層對元件例化和設(shè)計實體進行綁定。
A simple configuration contains reference to only one architecture body. Hierarchical configurations allow to nest configurations. This mechanism allows binding component instantiations with the design entities down the hierarchy.
當元件中定義的端口數(shù)和類屬不等于實體中定義的副本是,可以使用標識符來確定端口和類屬的映射。這也是類屬映射和端口映射的目的。
When the ports and generics in the component declaration are not equal to their counterparts in the entity declaration, one can use an explicit notification on how the ports and generics in the entity should be bound to ports and generics of the component instance. The generic map and port map are used for this purpose.
例程(Example)
-- an architecture of a microPRocessor architecture Structure of MicroProcessor is component ALU port (...); end component; component MUX port (...); end component; component LATCH port (...); end component; begin A1: ALU port map(...); M1: MUX port map(...); M2: MUX port map(...); M3: MUX port map(...); L1: LTACH port map(...); L2: LATCH port map(...); end Structure; -- a configuration of the microprocessorlibrary TTL, work; use TTL.all;use work.all; configuration Cfg4 of MicroProcessor is for Structure for A1: ALU use configuration TTL.SN74LS181; end for; for M1, M2, M3: MUX use entity Multiplex4(behavior); end for; for all: LATCH use entity Work.Latch; end for; end for; end configuration Cfg4;注釋(Note)盡管配置非常使用,但許多綜合器并不支持。所以,最好寫個腳本來正確地綜合結(jié)構(gòu)體。Although configurations are relevant and useful for selecting which entities and achitectures make up the design hierarchy, many synthesis tools do not support them. You better write a script to synthsize the correct architectures.實體,和他的結(jié)構(gòu)體和配置必須在同一個庫中。The entity, it's architectures and configurations must be compiled in the same library.
新聞熱點
疑難解答