Operator StringParamReference

Operator Library: Parameters

该算子根据设计中任意位置的模块参数生成 1:1 的映射参数(在参数 "Value" 中)。您可以在参数 "Reference" 中指定引用的参数(路径和名称)。

引用的参数可以是以下三种类型之一:VA_STRING、VA_FILENAME 或 VA_METADATA。映射参数始终为字符串。

您可以在设计层次结构中定义一个目标,以便在该目标中使引用的 参数可见且可访问。 该目标由两个参数定义:DisplayHierarchy 和 DisplayName。 在 DisplayHierarchy 中,您可以寻址引用算子本身所在的 同一进程内的分层框。 在参数 DisplayName 中,您可以设置目标参数的名称。 如果同时设置了 DisplayHierarchy 和 DisplayName,则由 DisplayName 定义的参数将在 由 DisplayHierarchy 寻址的分层框中可用。 如果 DisplayName 为空,则不会创建任何参数。 如果设置了 DisplayName,但 DisplayHierarchy 为空, 则由 DisplayName 定义的参数将被添加到父级层次结构中(即引用算子本身所在的 分层框)。

这允许您将设计的参数 置于所需的任意分层级别(设计层级)上可用。 例如,您可以使受保护分层框内的模块参数直接在受保护分层框自身的 Property 下进行参数化。

映射参数本身也可以被引用。 因此,您可以引用引用算子中参数 Value 的内容, 或者引用您在参数 DisplayName 和 DisplayHierarchy 中定义的参数。 这在由其他受保护的分层框构建受保护的分层框时 尤为重要。

[注意] 所有连接的参数会同时更新

如果其中一个连接的参数发生更改(引用参数、映射参数 Value 或目标参数),则所有其他连接参数中的值也会随之更改。

由于该算子不干扰设计的数据流结构,因此它没有输入和输出。

有关库参数的总体介绍,请参见 Library Parameters。

示例:

现在可以在 Process0/Level0/Level1 中使用映射参数 "CoeffFileParam":

I/O Property

Property 值
Operator Type 无(因为没有输入或输出)

支持的 Link Format

无

参数

状态
键入 静态读取(尽管 GUI 显示为写入)参数
默认 无
范围 OK 或错误消息

显示错误状态。如果参数 Activate 设置为 Yes, 则会检查其他模块参数。 此参数显示检查结果, 即 OK 或错误消息。

此参数不属于最终的 applet。

DisplayName
键入 静态写参数
默认 无
范围 任意字符串

如果您希望在设计中的另一个位置(除引用算子实例本身之外)对引用的参数(在参数 Reference 中定义)进行访问,则需要定义一个新参数。在此处指定此新参数的名称。如果此字段为空,则不会创建新参数。

DisplayHierarchy
键入 静态写参数
默认 无
范围 任意字符串

在此处指定要附加您在参数 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

值
键入 静态、动态、写入、读取参数
默认 0
范围 有符号整数(64 位),无符号整数(64 位)

用于访问引用参数以及自引用参数的 Map parameter。 该参数具有与引用参数相同的 Property。

Reference
键入 静态写参数
默认 无
范围 定义引用参数的任意字符串:模块的相对路径、模块名称和参数名称

在此处,您可以定义引用参数在设计中的位置。

对于此参数,您可以使用自动补全功能和语法高亮显示。要使用自动补全,请在 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/CoeffBuffer.CoefficientFile0)。

您还可以使用 ../ 返回上一级。 但是,请注意在设计可自由复制或可重定位的模块时不要使用此选项。

Activate
键入 动态写入参数
默认 无
范围 {No,Yes}

Yes = 激活对引用参数的访问以及来自引用参数的访问(通过 map 参数 Value)。

Status 参数已禁用。 参数 DisplayName 和 DisplayHierarchy 无效。

使用示例

以下示例展示了算子 StringParamReference 的使用方法: