接口在SV LRM動態陣列2012他們說的SV
interface_instantiation ::= interface_identifier [ parameter_value_assignment ] hierarchical_instance { , hierarchical_instance } ;
當搜索hierarchical_instance的含義,你可以找到
hierarchical_instance ::= name_of_instance ([ list_of_port_connections ]) name_of_instance ::= instance_identifier { unpacked_dimension }
最後,可以發現,
unpacked_dimension ::= [ constant_range ] | [ constant_expression ]
我想閱讀它,以便您不能擁有動態數組你的SV代碼中的接口,對吧?但是,模擬都與VCS和奎斯塔下面的代碼行的時候,它的工作沒有任何警告/錯誤:
virtual protocol_if ifs[];
爲什麼它的工作原理?你能向我澄清一下嗎?
這是因爲使用的是** **虛擬接口,它是**實際接口**的指針/句柄。如果使用實際的接口實例,它可能不起作用。使用實際接口時,可能會出現此錯誤:'在模塊實例數組中使用可變大小的維度。請在模塊實例數組中使用固定尺寸。 – sharvil111
我可以做同樣的解釋。無論如何,我想在LRM中找到確切的解釋。可能我找不到它,但是我需要在各行之間閱讀。 – user7218867