Requirements Table
Formally model requirements with input conditions
- 库:
Requirements Toolbox
描述
TheRequirements Tableblock models formal requirements. The block starts with evaluating conditions listed in the前提标签。如果满足条件,您可以检查其他模拟数据是否符合指定条件后条件column, or execute desired actions, such as block outputs or functions, in the行动column. For more information, see用一个Requirements Table Block to Create Formal Requirements。
您还可以通过定义模型的物理限制来限制要求Assumptions标签。看Add Assumptions to Requirements。
您只有在有需求Toolbox™。
端口
输入
Output
Parameters
主要的
Show port labels
— Display options for port labels
港口
(默认)|没有任何
|FromPortBlockName
|信号名称
选择如何在Requirements Tableblock icon.
没有任何
- 请勿显示端口标签。港口
- 显示输入和输出数据的名称。FromPortBlockName
- 显示输入和输出数据的名称。信号名称
- 如果命名连接到端口的信号,请显示信号名称。否则,显示数据的名称。
Programmatic Use
Parameter:ShowPortLabels |
类型:字符串标量或字符向量 |
价值:"none" |“港口” |“ fromportblockname” |“信号名称” |
Default:“港口” |
读/写许可
- 访问块目录的水平
ReadWrite
(默认)|只读
|NoReadOrWrite
Control user access to the contents of theRequirements Tableblock.
ReadWrite
- 启用打开和修改Requirements Tableblock contents.只读
- 启用开放Requirements Tableblock.NoReadOrWrite
– Disable opening or modifying of theRequirements Tableblock.
Note
当您尝试查看一个内容时Requirements Tableblock whose读/写许可parameter isNoReadOrWrite
,块没有响应。例如,双击Requirements Tableblock, Simulink®不打开表内容,也不显示消息。
Programmatic Use
Parameter:权限 |
类型:字符串标量或字符向量 |
价值:"ReadWrite" |“只读” |“ Noreadorwrite” |
Default:"ReadWrite" |
最小化代数循环发生
— Option to eliminate artificial algebraic loops
off (default) | on
尝试消除模拟过程中包含原子单元的人工代数循环。
off- 不要试图消除包括原子单元在内的人工代数环。
上- 尝试消除包括原子单元在内的人工代数环。
Programmatic Use
Parameter:微量浮游 |
类型:字符串标量或字符向量 |
价值:"off" |“上” |
Default:"off" |
时间表为
- 调度类型
采样时间
(默认)|Periodic Partition
|Aperiodic Partition
指定如何安排Requirements Tableblock.
采样时间
- 指定是否在Requirements Tableblock must run at the same rate or can run at different rates.Periodic Partition
- 安排Requirements Table带有定期分区的块条目。指定分区名称和与分区运行速率相对应的示例时间。Aperiodic Partition
- 安排Requirements Tableblock entries with an aperiodic partition. Specify a partition name.
Programmatic Use
Parameter:ScheduleAs |
类型:字符串标量或字符向量 |
价值:"SampleTime" |“离散部门” |"UnconstrainedPartition" |
Default:"SampleTime" |
样本时间(继承的-1)
- 指定时间间隔
-1
(默认)|[TS 0]
指定该块中的条目是必须以相同的速率运行还是可以以不同的速率运行。
如果条目在Requirements Tableblock can run at different rates, specify the sample time as inherited (
-1
).If entries must run at the same rate, specify the sample time,
TS
, corresponding to this rate.
Programmatic Use
Parameter:SystemSampleTime |
类型:字符串标量或字符向量 |
价值:“ -1” |“ [TS 0]” |
Default:“ -1” |
Code Generation
要启用这些参数,您必须有万博1manbetxSimulink Coder™或者Embedded Coder®。
功能包装
- 代码格式
汽车
(默认)|Inline
|不可修复的功能
|Reusable function
选择该块用于生成原子(非虚拟)单元代码的代码格式。
汽车
–万博1manbetxSimulink编码器和Embedded Coder choose the optimal code format based on the type and number of instances of theRequirements Tableblock in the model.Inline
–万博1manbetxSimulink编码器并嵌入编码器内联Requirements Tableblock unconditionally.不可修复的功能
–万博1manbetxSimulink编码器显式地在单独的文件中生成单独的函数。Reusable function
–万博1manbetxSimulink编码器嵌入式编码器生成一个具有参数的函数,该函数允许在模型包含块的多个实例时重复使用块代码。此选项还生成了一个具有参数的函数,该函数允许Requirements Table要在模型参考层次结构的生成代码中重复使用的块,该代码包括一个Requirements Tableblock across referenced models. In this case, the block must be in a library.
提示
什么时候you want to represent multiple instances of aRequirements Table屏蔽是一个可重复使用的功能,您可以将每个实例指定为
汽车
或ASReusable function
。最好使用一个或另一个,因为两者都使用两个可重复使用的功能,一个用于每个名称。这些选择的结果仅在不可能的情况下有所不同。选择汽车
不允许控制功能或文件名Requirements Table块代码。The
Reusable function
和汽车
选项都尝试确定多个实例是否Requirements Table存在块,如果可以重复使用代码。仅在无法重复使用时,选项有所不同:汽车
yields inlined code, or if circumstances prohibit inlining, the setting separates functions for eachRequirements Tableblock instance.Reusable function
每个功能都有一个单独的功能Requirements Tableblock instance in the model.
如果您选择
Reusable function
while your generated code is under source control, set文件名选项至Use subsystem name
,使用功能名称
, 或者User specified
。否则,当您修改模型时,代码文件的名称会更改,从而阻止了文件上的源控制。
Programmatic Use
Parameter:RTWSystemCode |
类型:字符串标量或字符向量 |
价值:"Auto" |"Inline" |“不可恢复的功能” |“可重复使用的功能” |
Default:"Auto" |
功能名称选项
- 如何命名生成的功能
汽车
(默认)|Use subsystem name
|User specified
选择如何万博1manbetxSimulink编码器名称其为块生成的函数。
如果您嵌入了编码器,则可以控制功能名称,并具有配置参数上的选项Code Generation>Identifiers窗格。
汽车
- 使用默认命名约定分配一个唯一的函数名称,
, 在哪里model
_block
()model
是模型的名称,block
是块的名称(或重复使用代码时相同的块的名称)。Use subsystem name
- 使用Requirements Table块名称为函数名称。默认情况下,函数名称使用命名约定
。model
_block
Note
当一个Requirements Table块在库中,功能包装参数设置为
Reusable function
, if you set theUse subsystem name
选项,代码生成器使用库块的名称作为函数名称和文件名。User specified
– Enable the功能名称场地。输入法律C或C ++函数名称,必须是唯一的。
有关更多信息,请参阅生成子系统代码作为单独的函数和文件(万博1manbetxSimulink编码器)。
依赖性
To enable this parameter, set功能包装至不可修复的功能
或者Reusable function
。
Programmatic Use
Parameter:RTWFcnNameOpts |
类型:字符串标量或字符向量 |
价值:"Auto" |“使用子系统名称” |"User specified" |
Default:"Auto" |
功能名称
- 块代码的功能名称
""
(默认)|function name
Name of the function for the block code.
如果要给该函数一个特定名称而不是使用自动化名称或块名称,请使用此参数。有关更多信息,请参阅生成子系统代码作为单独的函数和文件(万博1manbetxSimulink编码器)。
依赖性
To enable this parameter, set the功能名称选项参数为User specified
。
Programmatic Use
Parameter:RTWFcnName |
类型:字符串标量或字符向量 |
价值:"" |“ <功能名称>” |
Default:"" |
文件名选项
— How to name generated file
汽车
(默认)|Use subsystem name
|使用功能名称
|User specified
How万博1manbetxSimulink编码器为其为块生成的函数的单独文件命名。
汽车
– Depending on the configuration of the block and how many instances are in the model,汽车
产生不同的结果:If the code generator does不是generate a separate file for the block, the block code is generated within the code module generated from the block parent system. If the block parent is the model itself, the block code is generated within
或者model
。C
。model
.cpp如果您选择
Reusable function
为了功能包装parameter and your generated code is under source control, consider specifying a文件名选项除了汽车
。这样可以防止生成的文件名由于无关的模型修改而导致更改,这对于使用源控制来管理配置而言是有问题的。如果您选择
Reusable function
为了功能包装parameter and there are multiple instances of the block in a model reference hierarchy, in order to generate reusable code for the block,文件名选项必须设置为汽车
。
Use subsystem name
- 代码生成器使用块名作为文件名生成一个单独的文件。Note
什么时候文件名选项被设定为
Use subsystem name
,如果模型包含模型blocks, or if a model reference target is being generated for the model. In these situations, the file name for theRequirements Tableblock consists of the block name prefixed by the model name.使用功能名称
– The code generator uses the function name specified by功能名称选项作为文件名。User specified
- 此选项启用File name (no extension)text entry field. The code generator uses the name you enter as the file name. Enter a file name, but do not include the。C
或者.cpp
(或另一个)扩展。此文件名不必是唯一的。Note
同时Requirements Tableblock source file name need not be unique, you must avoid giving nonunique names that result in cyclic dependencies (for example,
sys_a.h
includessys_b.h
,sys_b.h
includessys_c.h
, andsys_c.h
includessys_a.h
).
依赖性
To enable this parameter, set功能包装至不可修复的功能
或者Reusable function
。
Programmatic Use
Parameter:rtwfilenameopts |
类型:字符串标量或字符向量 |
价值:"Auto" |“使用子系统名称” |“使用功能名称” |"User specified" |
Default:"Auto" |
File name (no extension)
- 生成文件的名称
""
(默认)|文件名
生成文件的名称。您指定的文件名不一定是唯一的。但是,避免给出导致循环依赖性的非唯一名称(例如,sys_a.h
includessys_b.h
,sys_b.h
includessys_c.h
, andsys_c.h
includessys_a.h
).
有关更多信息,请参阅生成子系统代码作为单独的函数和文件(万博1manbetxSimulink编码器)。
依赖性
To enable this parameter, set文件名选项至User specified
。
Programmatic Use
Parameter:RTWFILENAME |
类型:字符串标量或字符向量 |
价值:"" |“ <文件名>” |
Default:"" |
模型示例
扩展功能
C/C ++代码生成
使用Simulink®Coder™生成C和C ++代码。万博1manbetx
实际数据类型或功能支持取决于块实现。万博1manbetx
GPU代码生成
使用GPU CODER™为NVIDIA®GPU生成CUDA®代码。
实际数据类型或功能支持取决于块实现。万博1manbetx
HDL代码生成
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
实际数据类型或功能支持取决于块实现。万博1manbetx
Fixed-Point Conversion
使用定点Designer™设计和模拟定点系统。
实际数据类型或功能支持取决于块实现。万博1manbetx
版本History
matlab命令
You clicked a link that corresponds to this MATLAB command:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。万博1manbetx
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
You can also select a web site from the following list:
如何获得最佳网站性能
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(英语)
- United States(英语)