Flow-Spec Reference¶
This section provides detailed reference documentation for the DV Flow specification format (flow.yaml YAML files).
File Root Elements¶
Each flow.yaml file either defines a package or a package fragment. Each package is defined by the content in its root flow.yaml file and that in any fragment files that are specified in the root package file or its fragments.
package:
name: proj1
# ...
fragments:
- src/rtl/flow.yaml
- src/verif
Each package fragment element specifies either a directory or a file. If a file is specified, then that file is loaded. It is expected that the content will be a DV-Flow package fragment. If a directory is specified, then a top-down search is performed for flow.yaml files in the subdirectory tree.
The structure of a package fragment file is nearly identical to a package definition. For example:
fragment:
tasks:
- name: rtl
type: std.FileSet
params:
include: "*.sv"
Remember that all fragments referenced by a given package contribute to the same package namespace. It would be illegal for another flow file to also define a task named rtl.
The schema definitions below are generated from
dv.flow.schema.json. They are grouped by role: package structure, tasks,
parameters and types, and enumerations.
Package Structure¶
Package Definition¶
PackageDef¶
type |
object |
|||
properties |
||||
|
Name |
|||
Name of the package |
||||
type |
string |
|||
|
Desc |
|||
Short description of the package |
||||
type |
string |
|||
default |
null |
|||
|
Type |
|||
List of data types defined by this package |
||||
type |
array |
|||
items |
#/defs/PackageSpec |
|||
|
Tasks |
|||
List of tasks defined in the package |
||||
type |
array |
|||
items |
||||
|
Imports |
|||
List of packages to import. Can be package names (strings) or import specifications with configuration |
||||
type |
array |
|||
items |
anyOf |
type |
string |
|
|
Overrides |
|||
Parameter and package overrides. Maps override targets to replacement values |
||||
type |
object |
|||
additionalProperties |
type |
string |
||
|
Fragments |
|||
List of fragment file paths to include in this package |
||||
type |
array |
|||
items |
type |
string |
||
|
Types |
|||
List of data type definitions for this package |
||||
type |
array |
|||
items |
||||
|
Uses |
|||
Name of a base package to inherit from. This package extends the base package’s tasks and types |
||||
type |
string |
|||
default |
null |
|||
|
With |
|||
Package parameters |
||||
type |
object |
|||
additionalProperties |
anyOf |
type |
string |
|
type |
array |
|||
items |
||||
|
Configs |
|||
List of package configurations |
||||
type |
array |
|||
items |
||||
|
Tags |
|||
Tags as type references with optional parameter overrides |
||||
type |
array |
|||
items |
anyOf |
type |
string |
|
type |
object |
|||
additionalProperties |
True |
|||
|
Package Map |
|||
One or more package-map files (name -> flow file) consulted when resolving imports by name |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
array |
|||
items |
type |
string |
||
type |
null |
|||
Fragment Definition¶
FragmentDef¶
type |
object |
|||
properties |
||||
|
Tasks |
|||
List of tasks defined in this fragment |
||||
type |
array |
|||
items |
||||
|
Imports |
|||
List of packages to import. Can be package names (strings) or import specifications |
||||
type |
array |
|||
items |
anyOf |
type |
string |
|
|
Fragments |
|||
List of nested fragment file paths to include |
||||
type |
array |
|||
items |
type |
string |
||
|
Types |
|||
List of data type definitions for this fragment |
||||
type |
array |
|||
items |
||||
Configuration Definition¶
ConfigDef¶
type |
object |
|||
properties |
||||
|
Name |
|||
Name of the configuration |
||||
type |
string |
|||
|
With |
|||
Configuration parameters map |
||||
type |
array |
|||
items |
||||
|
Uses |
|||
Name of the configuration to use as a base |
||||
type |
string |
|||
default |
null |
|||
|
Overrides |
|||
List of package overrides |
||||
type |
array |
|||
items |
||||
|
Extensions |
|||
List of extensions to apply |
||||
type |
array |
|||
items |
||||
|
Imports |
|||
List of packages to import for this config |
||||
type |
array |
|||
items |
anyOf |
type |
string |
|
|
Fragments |
|||
List of fragments to apply for this config |
||||
type |
array |
|||
items |
type |
string |
||
|
Tasks |
|||
List of tasks defined/overridden by this config |
||||
type |
array |
|||
items |
||||
|
Types |
|||
List of types defined/overridden by this config |
||||
type |
array |
|||
items |
||||
Import Definition¶
PackageImportSpec¶
type |
object |
|
properties |
||
|
From |
|
Package identifier or file path to import |
||
type |
string |
|
default |
null |
|
|
As |
|
Alias name for the imported package |
||
type |
string |
|
default |
null |
|
|
Config |
|
Configuration name to apply when importing |
||
type |
string |
|
default |
null |
|
|
With |
|
Parameter overrides to apply to the imported package |
||
type |
object |
|
additionalProperties |
True |
|
Override Definition¶
OverrideDef¶
Override definition |
|||
type |
object |
||
properties |
|||
|
Override |
||
Task or package to override |
|||
anyOf |
type |
string |
|
type |
null |
||
|
With |
||
Override to use |
|||
type |
string |
||
Extend Definition¶
ExtendDef¶
Extension definition |
|||
type |
object |
||
properties |
|||
|
Task |
||
Name of the task to extend |
|||
type |
string |
||
|
With |
||
Parameter extensions to apply to the task |
|||
type |
array |
||
items |
|||
|
Uses |
||
Name of the extension to use as a base |
|||
type |
string |
||
default |
null |
||
|
Needs |
||
List of tasks to depend on |
|||
type |
array |
||
items |
type |
string |
|
Tasks¶
Task Definition¶
TaskDef¶
Holds definition information (ie the YAML view) for a task |
||||
type |
object |
|||
properties |
||||
|
Task Name |
|||
The name of the task |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
null |
|||
|
Root Task Name |
|||
The name of the task (marked as root scope) |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
null |
|||
|
Export Task Name |
|||
The name of the task (marked as export scope) |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
null |
|||
|
Local Task Name |
|||
The name of the task (marked as local scope) |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
null |
|||
|
Overide Name |
|||
The name of the task to override |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
null |
|||
|
Base type |
|||
Task from which this task is derived |
||||
type |
string |
|||
default |
null |
|||
|
Task visibility scope |
|||
Visibility scope: ‘root’ (executable), ‘export’ (visible outside package), ‘local’ (fragment-only) |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
array |
|||
items |
type |
string |
||
type |
null |
|||
|
Body |
|||
Sub-tasks |
||||
type |
array |
|||
items |
||||
|
Task enable condition |
|||
Condition that must be true for this task to run |
||||
default |
null |
|||
anyOf |
type |
string |
||
type |
boolean |
|||
|
Pytask |
|||
Python-based implementation (deprecated) |
||||
type |
string |
|||
default |
null |
|||
|
Run |
|||
Shell-based implementation |
||||
type |
string |
|||
default |
null |
|||
|
Shell |
|||
Shell to use for shell-based implementation |
||||
type |
string |
|||
default |
bash |
|||
|
default |
null |
||
|
Task description |
|||
Short description of the task’s purpose |
||||
type |
string |
|||
default |
||||
|
Task documentation |
|||
Full documentation of the task |
||||
type |
string |
|||
default |
||||
|
Needs |
|||
List of tasks that this task depends on |
||||
type |
array |
|||
items |
type |
string |
||
|
Feeds |
|||
List of tasks that depend on this task (inverse of needs) |
||||
type |
array |
|||
items |
type |
string |
||
|
With |
|||
Parameters for the task |
||||
type |
object |
|||
additionalProperties |
anyOf |
type |
string |
|
type |
array |
|||
items |
||||
type |
integer |
|||
type |
boolean |
|||
type |
object |
|||
additionalProperties |
True |
|||
|
Specifies handling of this tasks’s run directory |
|||
default |
unique |
|||
|
Passthrough |
|||
Specifies whether this task should pass its inputs to its output |
||||
default |
null |
|||
anyOf |
||||
type |
array |
|||
items |
||||
type |
null |
|||
|
Consumes |
|||
Specifies matching patterns for parameter sets that this task consumes |
||||
default |
null |
|||
anyOf |
||||
type |
array |
|||
items |
||||
type |
null |
|||
|
Uptodate |
|||
Up-to-date check: false=always run, string=Python method, None=use default check |
||||
default |
null |
|||
anyOf |
type |
boolean |
||
type |
string |
|||
type |
null |
|||
|
Cache |
|||
Cache configuration. True=enabled with defaults, False=disabled, CacheDef=custom config |
||||
default |
null |
|||
anyOf |
||||
type |
boolean |
|||
type |
null |
|||
|
Tags |
|||
Tags as type references with optional parameter overrides |
||||
type |
array |
|||
items |
anyOf |
type |
string |
|
type |
object |
|||
additionalProperties |
True |
|||
additionalProperties |
False |
|||
Strategy Definition¶
StrategyDef¶
type |
object |
|||
properties |
||||
|
Chain |
|||
Enable chain strategy: run body tasks sequentially with each consuming output of previous task |
||||
default |
null |
|||
anyOf |
type |
boolean |
||
type |
null |
|||
|
Enable generate strategy: dynamically create tasks by running a shell command that outputs task definitions |
|||
default |
null |
|||
anyOf |
||||
type |
null |
|||
|
Matrix |
|||
Matrix of parameter values to explore. Creates one task instance per combination of values |
||||
default |
null |
|||
anyOf |
type |
object |
||
additionalProperties |
type |
array |
||
items |
||||
type |
null |
|||
|
Body |
|||
Body tasks for strategy execution. Used with chain and matrix strategies |
||||
type |
array |
|||
items |
||||
Generate Specification¶
GenerateSpec¶
type |
object |
||
properties |
|||
|
Shell |
||
Shell to use for running the generate command. Defaults to ‘bash’ |
|||
default |
null |
||
anyOf |
type |
string |
|
type |
null |
||
|
Run |
||
Shell command to execute. Must output valid YAML task definitions to stdout |
|||
type |
string |
||
Cache Definition¶
CacheDef¶
Cache configuration for a task |
|||
type |
object |
||
properties |
|||
|
Enabled |
||
Whether caching is enabled for this task |
|||
type |
boolean |
||
default |
True |
||
|
Hash |
||
Extra hash expressions to include in cache key |
|||
type |
array |
||
items |
type |
string |
|
|
Compression type for cached artifacts |
||
default |
no |
||
additionalProperties |
False |
||
Parameters and Types¶
Parameter Definition¶
ParamDef¶
type |
object |
||
properties |
|||
|
Doc |
||
Full documentation for this parameter |
|||
type |
string |
||
default |
null |
||
|
Desc |
||
Short description of this parameter |
|||
type |
string |
||
default |
null |
||
|
Type |
||
Parameter type (e.g., ‘str’, ‘int’, ‘bool’, ‘list’, ‘map’, or a complex type definition) |
|||
default |
null |
||
anyOf |
type |
string |
|
|
Value |
||
Default value for this parameter |
|||
default |
null |
||
anyOf |
type |
null |
|
|
Append |
||
Value to append to list-type parameters |
|||
default |
null |
||
anyOf |
type |
null |
|
|
Prepend |
||
Value to prepend to list-type parameters |
|||
default |
null |
||
anyOf |
type |
null |
|
|
Path-Append |
||
Path to append to path-type parameters (OS-specific separator) |
|||
default |
null |
||
anyOf |
type |
null |
|
|
Path-Prepend |
||
Path to prepend to path-type parameters (OS-specific separator) |
|||
default |
null |
||
anyOf |
type |
null |
|
Type Definition¶
TypeDef¶
type |
object |
|||
properties |
||||
|
Name |
|||
Name of the data type |
||||
type |
string |
|||
|
Uses |
|||
Base type to inherit from. Supports type extension/specialization |
||||
type |
string |
|||
default |
null |
|||
|
Doc |
|||
Documentation for this type definition |
||||
type |
string |
|||
default |
null |
|||
|
With |
|||
Parameters for this type. Can be simple values or full parameter definitions |
||||
type |
object |
|||
additionalProperties |
anyOf |
type |
string |
|
|
Tags |
|||
Tags as type references with optional parameter overrides |
||||
type |
array |
|||
items |
anyOf |
type |
string |
|
type |
object |
|||
additionalProperties |
True |
|||
Complex Type¶
ComplexType¶
List Type¶
ListType¶
type |
object |
||
properties |
|||
|
Item |
||
anyOf |
type |
string |
|
Map Type¶
MapType¶
type |
object |
||
properties |
|||
|
Key |
||
anyOf |
type |
string |
|
|
Val |
||
anyOf |
type |
string |
|
Enumerations¶
Consumes Mode¶
ConsumesE¶
type |
string |
enum |
none, all |
Passthrough Mode¶
PassthroughE¶
type |
string |
enum |
none, all, unused |
Run-Directory Mode¶
RundirE¶
type |
string |
enum |
unique, inherit |
Compression Type¶
CompressionType¶
Compression types for cache artifacts |
|
type |
string |
enum |
no, yes, gzip, bzip2 |