Operator IntParamReference

Operator Library: Parameters

此運算子從設計中任意位置的模組參數產生 1:1 對應參數(在參數 Value 中)。您可以在參數 Reference 中指定引用的參數(路徑與名稱)。

引用的參數可以是以下三種型別之一:VA_SINT、VA_UINT 或 VA_ENUM。對應參數本身的型別一律為 Int64。對應參數會鏡射引用參數的所有 Property。

如果您要引用使用完整 64 位元的無號參數,則必須根據 Int64 型別對數值進行重新解讀。

您可以在設計階層中定義一個目標,引用的參數將在該目標中可見且可存取。目標由兩個參數定義:DisplayHierarchy 與 DisplayName。在 DisplayHierarchy 中,您可以定址參考運算子本身所在之相同處理程序內的階層方塊。在參數 DisplayName 中,您可設定目標參數的名稱。如果同時設定了 DisplayHierarchy 與 DisplayName,則由 DisplayName 定義的參數將可在 DisplayHierarchy 所定址的階層方塊中使用。如果 DisplayName 為空,則不會建立參數。如果設定了 DisplayName 但 DisplayHierarchy 為空,則由 DisplayName 定義的參數會新增至父階層(也就是參考運算子本身所在的階層方塊)。

這可讓您將設計的參數提供給您想要的任何階層層級(設計層級)使用。例如,您可以讓受保護階層方塊內的模組參數直接在受保護階層方塊本身的 Property 下進行參數化。

對應參數本身也可以被引用。因此,您可以引用參考運算子中參數 Value 的內容,或者引用您在參數 DisplayName 與 DisplayHierarchy 中定義的參數。當受保護階層方塊是由其他受保護階層方塊建構而成時,這點尤其重要。

[備註] 所有連接的參數會同時更新

如果其中一個連接的參數(引用參數、對應參數 Value 或目標參數)遭到變更,所有其他連接的參數中的數值也會隨之變更。

由於此運算子不會干擾設計的資料流結構,因此沒有輸入與輸出。

關於 Library Parameters 的一般介紹,請參閱 Library Parameters。

範例:

對應參數 ParamRef 現已在 Process0/Level0/Level1 中提供:

I/O Properties

Property Value
Operator Type 無(由於沒有輸入或輸出)

支援的 Link 格式

無

參數

Status
Type 靜態讀取(儘管 GUI 顯示為寫入)參數
Default 無
Range OK 或錯誤訊息

顯示錯誤狀態。如果參數 Activate 設定為 Yes,則會檢查其他模組參數。此參數會顯示此檢查的結果,也就是 OK 或錯誤訊息。

此參數不屬於最終 applet 的一部分。

DisplayName
Type 靜態寫入參數
Default 無
Range 任意字串

如果您想要在設計中的另一個位置(除了參考運算子執行個體本身之外),授予對引用參數(在參數 Reference 中定義)的存取權(進出皆可),您需要定義一個新的參數。請在此處指定此新參數的名稱。

如果此欄位為空,則不會建立新參數。

DisplayHierarchy
Type 靜態寫入參數
Default 無
Range 任意字串

在此指定您要附加在引數 DisplayName 中定義的新對應引數的階層方塊。

對於此引數,您可以使用自動完成功能與語法突顯。若要使用自動完成,請點選 Module Properties 對話方塊中此引數的 Parameter Values 欄位,然後按下鍵盤上的 TAB 鍵。關於自動完成功能的詳細說明,請參閱 'Autocompletion and Syntax Highlighting for Translator and Reference Operators'。

如果您定義了一個新引數 DisplayName,但將引數 DisplayHierarchy 留空:新引數將會新增至包含參考運算子實例的階層方塊中。(請注意,如果參考運算子實例位於最高(處理程序)層級,則無法這樣做。)

[備註] 設定顯示目標路徑的語法

如果您希望新引數顯示在設計的其他位置,您需要在引數 DisplayHierarchy 中指定包含該新引數的階層方塊路徑。

語法如下:

<Path> is the relative path from process level to the hierarchical level of the design where the <Hierarchical Box> is located that is to receive the new parameter. Thus, parameter DisplayHierarchy can only address hierarchical boxes within the same process. Use a slash as separator between different hierarchical levels.

<HierarchicalBox> is the name of the hierarchical box that is to receive the new map parameter.

範例: Level0/Level1

Value
Type 靜態、動態、寫入、讀取引數
Default 0
Range 有號整數(64 位元)、無號整數(64 位元)

用於存取參考引數(雙向)的對應引數。此引數具有與參考引數相同的 Property。

單位
Type 靜態寫入參數
Default -
Range Latin-1

在此輸入引數 Value 的單位。

描述
Type 靜態寫入參數
Default -
Range 任意文字

在此輸入引數 Value 的說明。

Reference
Type 靜態寫入參數
Default 無
Range 定義參考引數的任意字串:模組的相對路徑、模組名稱以及引數名稱

在此定義參考引數在設計中的位置。

對於此引數,您可以使用自動完成功能與語法突顯。若要使用自動完成,請點選 Module Properties 對話方塊中此引數的 Parameter Values 欄位,然後按下鍵盤上的 TAB 鍵。關於自動完成功能的詳細說明,請參閱 'Autocompletion and Syntax Highlighting for Translator and Reference Operators'。

[備註] 參考語法

語法如下:

<Path> is the relative path to the hierarchical level where the referenced module "Module" is located. Use a slash as separator between different hierarchical levels. Define the path as relative path from the hierarchical level the reference operator instance is located in.

<Module> is the name of the module (operator instance or hierarchical box) that contains the referenced parameter.

<ParamName> is the actual name of the referenced parameter.

If <Path> starts with a slash, the path is interpreted as absolute path starting from design level (e.g., /Process0/UUT/SetParam.Value)。

您也可以使用 ../ 來返回上一層。但是,請注意在設計可自由複製或可重新定位的模組時,請勿使用此選項。

Activate
Type 動態寫入參數
Default 否
Range {No,Yes}

Yes = 啟用對參考引數的雙向存取(透過對應引數 Value)。

No = 停用對參考引數的雙向存取,並停用引數 Status。引數 DisplayName 與 DisplayHierarchy 將無效。

使用範例

以下範例顯示了運算子 IntParamReference 的使用方式: