dv-flow-mgr 0.0.1.12703462647a1__tar.gz → 0.0.1.12761553329a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/PKG-INFO +1 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/Roadmap.md +20 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/conf.py +2 -1
- dv_flow_mgr-0.0.1.12761553329a1/docs/index.rst +32 -0
- dv_flow_mgr-0.0.1.12761553329a1/docs/intro.rst +185 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/ivpm.yaml +5 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/pyproject.toml +1 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/fragment_def.py +2 -2
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/session.py +2 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task.py +21 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task_data.py +21 -4
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task_def.py +3 -3
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vcs_task_sim_image.py +1 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vcs_task_sim_run.py +1 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vl_task_sim_image.py +27 -3
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vlt_task_sim_run.py +1 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/std/task_fileset.py +2 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr.egg-info/PKG-INFO +1 -1
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr.egg-info/SOURCES.txt +1 -0
- dv_flow_mgr-0.0.1.12703462647a1/docs/index.rst +0 -20
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/.github/workflows/ci.yml +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/.gitignore +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/.vscode/settings.json +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/LICENSE +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/README.md +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/Makefile +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/Notes.md +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/Stages.md +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/TypesAndDefs.md +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/quickstart.rst +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/docs/reference.rst +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/setup.cfg +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/__init__.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/__main__.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/cmds/cmd_run.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/fileset.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/flow.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/package.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/package_def.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/package_import_spec.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/parameters.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/share/flow.json +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task_memento.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/mti_pkg.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/mti_task_sim_image.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/mti_task_sim_run.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/pkg_hdl_sim.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/task_sim_image.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vcs_pkg.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vlt_pkg.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/hdl/sim/vlt_task_sim_image.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/std/fileset.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/std/pkg_std.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/std/std.dfs +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/tasklib/std/task_null.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr.egg-info/dependency_links.txt +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr.egg-info/entry_points.txt +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr.egg-info/requires.txt +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr.egg-info/top_level.txt +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/examples/example1/example1.flow +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1/files1/file1_1.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1/files1/file1_2.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1/files2/file2_1.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1/files2/file2_2.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1/test1.dfs +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1 copy/files1/file1_1.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1 copy/files1/file1_2.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1 copy/files2/file2_1.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1 copy/files2/file2_2.sv +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/fileset/test1 copy/test1.dfs +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/proj1/proj1.dfs +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/proj2/proj2.dfs +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/proj3/proj3.dfs +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/test_fileset.py +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/test_smoke copy.sav +0 -0
- {dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/test_smoke.py +0 -0
@@ -18,6 +18,12 @@ are evaluated.
|
|
18
18
|
- Package "uses" (type/inheritance)
|
19
19
|
- Task "with"-data definition (tasks can add their own parameters)
|
20
20
|
- Task Groups / Sub-DAG
|
21
|
+
- Coarse/fine-grained dependency management
|
22
|
+
- Mark task dependency as having a "coarse" requirement. Causes
|
23
|
+
the task to be run if it hasn't been run already. Doesn't perform
|
24
|
+
exhaustive analysis.
|
25
|
+
- Maybe allow subtree dependency analysis? Single analysis point to
|
26
|
+
determine up-to-date status on a whole collection of source
|
21
27
|
|
22
28
|
## 3.0.0
|
23
29
|
- JQ-based data extraction
|
@@ -73,3 +79,17 @@ are evaluated.
|
|
73
79
|
## 5.0.0
|
74
80
|
- Need some form of site settings
|
75
81
|
|
82
|
+
|
83
|
+
# Core Principles
|
84
|
+
- Relevant DAG can be constructed statically
|
85
|
+
- Tasks are not inferred based on dataflow content
|
86
|
+
- Tasks may be created based on statically-available data
|
87
|
+
- Dataflow is dynamically typed (union of content)
|
88
|
+
- Tasks pass-through filesets that are not relevant for them
|
89
|
+
- Enables injecting new data when convenient, even if it won't be used until later
|
90
|
+
- Can have 'filter' tasks if there is a need to clean-up
|
91
|
+
- Dependency analysis is not delegated
|
92
|
+
- Allows static DAG construction
|
93
|
+
- Extensible -- by users and organizations
|
94
|
+
- Implementation independent (not tied to a specific implementation language)
|
95
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.. DV Flow Manager documentation master file, created by
|
2
|
+
sphinx-quickstart on Tue Jan 7 02:06:13 2025.
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
4
|
+
contain the root `toctree` directive.
|
5
|
+
|
6
|
+
DV Flow Manager
|
7
|
+
===============
|
8
|
+
|
9
|
+
DV Flow Manager provides a "make for silicon engineering": a specification
|
10
|
+
for capturing design and verification (DV) tasks and dataflow in a way that
|
11
|
+
enables concurrent execution and efficient avoidance of redundant work.
|
12
|
+
|
13
|
+
.. mermaid::
|
14
|
+
|
15
|
+
flowchart TD
|
16
|
+
A[IP Fileset] --> B[Testbench]
|
17
|
+
C[VIP Fileset] --> D[Precompile]
|
18
|
+
D --> B
|
19
|
+
B --> E[SimImage]
|
20
|
+
E --> F[Test1]
|
21
|
+
E --> G[Test2]
|
22
|
+
E --> H[Test3]
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
.. toctree::
|
27
|
+
:maxdepth: 2
|
28
|
+
:caption: Contents:
|
29
|
+
|
30
|
+
quickstart
|
31
|
+
intro
|
32
|
+
reference
|
@@ -0,0 +1,185 @@
|
|
1
|
+
############
|
2
|
+
Introduction
|
3
|
+
############
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
Many software languages have co-evolved with a build system. For example, C/C++
|
9
|
+
has Make and CMake. Java has ANT, Maven, and Gradle. All of these build systems
|
10
|
+
provide features that cater to specific ways that a given language is processed,
|
11
|
+
and provide built-in notions to make setting up simple cases as easy as possible.
|
12
|
+
|
13
|
+
One simple example is Make and a single-file C program. Take the code below:
|
14
|
+
|
15
|
+
.. code-block:: C
|
16
|
+
|
17
|
+
#include <stdio.h>
|
18
|
+
|
19
|
+
int main() {
|
20
|
+
printf("Hello, world!\n");
|
21
|
+
return 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
|
25
|
+
Make provides enough built-in features that are C/C++-specific that we can create
|
26
|
+
an executable from this source file (assume it's named hello.c) simply by running:
|
27
|
+
|
28
|
+
.. code-block:: bash
|
29
|
+
|
30
|
+
make hello
|
31
|
+
|
32
|
+
Make knows about C files, it knows about the existance of a C compiler, and it knows
|
33
|
+
that an executable can be created from a C file of the same name.
|
34
|
+
|
35
|
+
Meanwhile, in Silicon Engineering Land...
|
36
|
+
=========================================
|
37
|
+
|
38
|
+
Much like software languages, the languages, tools, and flows used in silicon engineering
|
39
|
+
have their own unique characteristics. For example, in a silicon-design environment, many
|
40
|
+
flows are run over the same source files -- possibly with different configurations.
|
41
|
+
|
42
|
+
* We compile our design with a UVM testbench to run dynamic (simulation-based) verification
|
43
|
+
* We compile our design with different testbenches to run formal verification
|
44
|
+
* We likely use slightly different subset when targeting synthesis
|
45
|
+
|
46
|
+
In addition, we also need to be flexible when it comes to tooling. Over time, we'll likely
|
47
|
+
use different tools from different providers, and want our projects to adapt as easily as
|
48
|
+
possible to a change of tool. It's also likely that we will either want to add new tools
|
49
|
+
to our environment over time, or adapt our environment to take advantage of new
|
50
|
+
productivity-enhancing tool features.
|
51
|
+
|
52
|
+
DV Flow Manager is designed to be the 'make' for silicon engineering. There are three
|
53
|
+
aspects to the tool:
|
54
|
+
|
55
|
+
* **Flow Specification** - Processing steps for a given project are captured in a hierarchy
|
56
|
+
of YAML files. The flow-specification schema is designed to be tool-independent, such
|
57
|
+
that multiple tools can be implemented that comprehend a flow specification.
|
58
|
+
* **Task Library** - Processing steps are implemented as `tasks`. A library of common tasks
|
59
|
+
is defined to cover common cases, such as creating a simulation image. External libraries
|
60
|
+
of tasks are supported, such that tools can bundle a task library along with the tool installation.
|
61
|
+
* **Tools** - The Python implementation of DV Flow Manager is one example of a tool. Other tools
|
62
|
+
may be added in the future to provide visualization, simplify development, etc.
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
Key Concepts
|
67
|
+
============
|
68
|
+
|
69
|
+
DV Flow Manager has three key concepts:
|
70
|
+
* **Package** - A packages is parameterizd namespace that contain tasks.
|
71
|
+
* **Task** - A task is a processing step in a flow. Tasks represent a data-processing step, which
|
72
|
+
might be as simple as building a list of files, or might be a complex as creating a hardened macro
|
73
|
+
from multiple source collections.
|
74
|
+
* **Dataflow Dependencies** - Tasks are related by dataflow dependencies. In order for a task to
|
75
|
+
execute, the data from all of its dependencies must be available. Each task also produces a
|
76
|
+
dataflow object that can be consumed by other tasks.
|
77
|
+
|
78
|
+
Let's look at an example to better-understand these concepts.
|
79
|
+
|
80
|
+
.. code-block:: YAML
|
81
|
+
|
82
|
+
package:
|
83
|
+
name: my_ip
|
84
|
+
|
85
|
+
imports:
|
86
|
+
- name: hdl.sim.vlt
|
87
|
+
as: hdl.sim
|
88
|
+
|
89
|
+
tasks:
|
90
|
+
- name: rtl
|
91
|
+
uses: std.Fileset
|
92
|
+
with:
|
93
|
+
base: "rtl"
|
94
|
+
include: "*.sv"
|
95
|
+
|
96
|
+
- name: tb
|
97
|
+
uses: std.Fileset
|
98
|
+
needs: [rtl]
|
99
|
+
with:
|
100
|
+
base: "tb"
|
101
|
+
include: "*.sv"
|
102
|
+
|
103
|
+
- name: sim
|
104
|
+
uses: hdl.sim.SimImage
|
105
|
+
needs: [rtl, tb]
|
106
|
+
|
107
|
+
-name: test1
|
108
|
+
uses: hdl.sim.RunSim
|
109
|
+
needs: [sim]
|
110
|
+
|
111
|
+
The code above specifies two collections of source code --
|
112
|
+
one for the design and one for the testbench. This source
|
113
|
+
code is compiled into as simulation image using the
|
114
|
+
pre-defined task named `hdl.sim.SimImage`. After,
|
115
|
+
we execute the simulation image.
|
116
|
+
|
117
|
+
|
118
|
+
.. mermaid::
|
119
|
+
|
120
|
+
flowchart TD
|
121
|
+
A[rtl] --> B[tb]
|
122
|
+
B[tb] --> E[sim]
|
123
|
+
E --> F[test1]
|
124
|
+
|
125
|
+
The task graph for this flow is shown above. Each step depends on the
|
126
|
+
prior step, so there is no opportunity for concurrent execution.
|
127
|
+
|
128
|
+
Now, let's say that we want to run a series of tests. We can add
|
129
|
+
a new task per tests, where we customize the activity that is run
|
130
|
+
by passing arguments to the simulation.
|
131
|
+
|
132
|
+
.. code-block:: YAML
|
133
|
+
|
134
|
+
# ...
|
135
|
+
-name: test1
|
136
|
+
uses: hdl.sim.RunSim
|
137
|
+
needs: [sim]
|
138
|
+
-name: test2
|
139
|
+
uses: hdl.sim.RunSim
|
140
|
+
needs: [sim]
|
141
|
+
-name: test3
|
142
|
+
uses: hdl.sim.RunSim
|
143
|
+
needs: [sim]
|
144
|
+
|
145
|
+
.. mermaid::
|
146
|
+
|
147
|
+
flowchart TD
|
148
|
+
A[rtl] --> B[tb]
|
149
|
+
B[tb] --> E[sim]
|
150
|
+
E --> F[test1]
|
151
|
+
E --> G[test2]
|
152
|
+
E --> H[test3]
|
153
|
+
|
154
|
+
Our task graph now looks like the above. Our build tasks are sequential,
|
155
|
+
while our test tasks only depend on the simulation image being
|
156
|
+
up-to-date, and and can execute concurrently.
|
157
|
+
|
158
|
+
## Dataflow
|
159
|
+
|
160
|
+
What ties all the tasks above together is dependency-based dataflow.
|
161
|
+
|
162
|
+
.. code-block:: YAML
|
163
|
+
|
164
|
+
- name: tb
|
165
|
+
uses: std.Fileset
|
166
|
+
needs: [rtl]
|
167
|
+
with:
|
168
|
+
base: "tb"
|
169
|
+
include: "*.sv"
|
170
|
+
|
171
|
+
- name: sim
|
172
|
+
uses: hdl.sim.SimImage
|
173
|
+
needs: [rtl, tb]
|
174
|
+
|
175
|
+
When the `sim` task places dependencies on the `rtl` and `tb`
|
176
|
+
tasks, it receives the output from those tasks as input. In
|
177
|
+
this case, that means that the simulation-image compilation
|
178
|
+
task has a list of all of the source files that it needs to
|
179
|
+
compile. The `sim` task also produces an output, which contains
|
180
|
+
a reference to the directory where the simulation image resides.
|
181
|
+
The `test` tasks use this input to locate the simulation image.
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
@@ -21,11 +21,16 @@ package:
|
|
21
21
|
src: pypi
|
22
22
|
- name: svdep
|
23
23
|
url: https://github.com/fvutils/svdep.git
|
24
|
+
anonymous: True
|
25
|
+
- name: ply
|
26
|
+
src: pypi
|
24
27
|
- name: pyyaml
|
25
28
|
src: pypi
|
26
29
|
- name: Sphinx
|
27
30
|
src: pypi
|
28
31
|
- name: sphinx-jsonschema
|
29
32
|
src: pypi
|
33
|
+
- name: sphinxcontrib-mermaid
|
34
|
+
src: pypi
|
30
35
|
|
31
36
|
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/fragment_def.py
RENAMED
@@ -22,14 +22,14 @@
|
|
22
22
|
import pydantic.dataclasses as dc
|
23
23
|
import json
|
24
24
|
from pydantic import BaseModel
|
25
|
-
from typing import Any, Dict, List
|
25
|
+
from typing import Any, Dict, List, Union
|
26
26
|
from .package import Package
|
27
27
|
from .package_import_spec import PackageImportSpec
|
28
28
|
from .task_def import TaskDef
|
29
29
|
|
30
30
|
class FragmentDef(BaseModel):
|
31
31
|
tasks : List[TaskDef] = dc.Field(default_factory=list)
|
32
|
-
imports : List[
|
32
|
+
imports : List[Union[str,PackageImportSpec]] = dc.Field(default_factory=list, alias="imports")
|
33
33
|
fragments: List[str] = dc.Field(default_factory=list)
|
34
34
|
|
35
35
|
basedir : str = None
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/session.py
RENAMED
@@ -196,7 +196,7 @@ class Session(object):
|
|
196
196
|
for file in os.listdir(dir):
|
197
197
|
if os.path.isdir(os.path.join(dir, file)):
|
198
198
|
self._load_fragment_dir(pkg, os.path.join(dir, file), file_s)
|
199
|
-
elif os.path.isfile(os.path.join(dir, file)):
|
199
|
+
elif os.path.isfile(os.path.join(dir, file)) and file == "flow.yaml":
|
200
200
|
self._load_fragment_file(pkg, os.path.join(dir, file), file_s)
|
201
201
|
|
202
202
|
def _load_fragment_file(self, pkg : PackageDef, file : str, file_s : List[str]):
|
@@ -207,6 +207,7 @@ class Session(object):
|
|
207
207
|
|
208
208
|
with open(file, "r") as fp:
|
209
209
|
doc = yaml.load(fp, Loader=yaml.FullLoader)
|
210
|
+
print("doc: %s" % str(doc), flush=True)
|
210
211
|
if "fragment" in doc.keys():
|
211
212
|
# Merge the package definition
|
212
213
|
frag = FragmentDef(**(doc["fragment"]))
|
@@ -152,15 +152,35 @@ class Task(object):
|
|
152
152
|
awaitables = [dep.waitOutput() for dep in self.depends]
|
153
153
|
deps_o = await asyncio.gather(*awaitables)
|
154
154
|
|
155
|
+
# Merge filesets. A fileset with the same
|
155
156
|
print("deps_o: %s" % str(deps_o))
|
156
157
|
|
158
|
+
# First, merge the dep maps of all the inputs
|
159
|
+
deps_m = self.depends[0].output.deps.copy()
|
160
|
+
for deps in map(lambda d: d.deps, self.depends[1:]):
|
161
|
+
for k,v in deps.items():
|
162
|
+
if k in deps_m:
|
163
|
+
deps_m[k].add(v)
|
164
|
+
else:
|
165
|
+
deps_m[k] = set(v)
|
166
|
+
|
167
|
+
print("deps_m: %s" % str(deps_m))
|
168
|
+
|
157
169
|
# Merge the output of the dependencies into a single input data
|
158
170
|
# if len(self.depends) > 1:
|
159
171
|
# raise Exception("TODO: handle >1 inputs")
|
160
172
|
|
173
|
+
# Now that we have a clean input object, we need
|
174
|
+
# to build the dep map
|
175
|
+
|
161
176
|
input = self.depends[0].output.copy()
|
162
177
|
else:
|
163
178
|
input = TaskData()
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
# Mark the source of this data as being this task
|
183
|
+
input.src = self.name
|
164
184
|
|
165
185
|
if not os.path.isdir(self.rundir):
|
166
186
|
os.makedirs(self.rundir)
|
@@ -196,7 +216,7 @@ class Task(object):
|
|
196
216
|
|
197
217
|
def setOutput(self, output : TaskData):
|
198
218
|
self.output_set = True
|
199
|
-
output.
|
219
|
+
output.src = self.name
|
200
220
|
self.output = output
|
201
221
|
self.output_ev.set()
|
202
222
|
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task_data.py
RENAMED
@@ -19,15 +19,31 @@
|
|
19
19
|
#* Author:
|
20
20
|
#*
|
21
21
|
#****************************************************************************
|
22
|
+
import enum
|
22
23
|
import pydantic.dataclasses as dc
|
23
24
|
from pydantic import BaseModel
|
24
25
|
from typing import Any, Dict, Set, List, Tuple
|
25
26
|
from .fileset import FileSet
|
26
27
|
|
28
|
+
class TaskDataParamOpE(enum.Enum):
|
29
|
+
Set = enum.auto()
|
30
|
+
Append = enum.auto()
|
31
|
+
Prepend = enum.auto()
|
32
|
+
PathAppend = enum.auto()
|
33
|
+
PathPrepend = enum.auto()
|
34
|
+
|
35
|
+
class TaskDataParamOp(BaseModel):
|
36
|
+
op : TaskDataParamOpE
|
37
|
+
value : Any
|
38
|
+
|
39
|
+
class TaskDataParam(BaseModel):
|
40
|
+
value : Any
|
41
|
+
ops : List[TaskDataParamOp] = dc.Field(default_factory=list)
|
42
|
+
|
27
43
|
class TaskData(BaseModel):
|
28
|
-
|
44
|
+
src : str = None
|
29
45
|
params : Dict[str,Any] = dc.Field(default_factory=dict)
|
30
|
-
deps :
|
46
|
+
deps : Dict[str,Set[str]] = dc.Field(default_factory=dict)
|
31
47
|
changed : bool = False
|
32
48
|
|
33
49
|
def hasParam(self, name: str) -> bool:
|
@@ -40,11 +56,12 @@ class TaskData(BaseModel):
|
|
40
56
|
self.params[name] = value
|
41
57
|
|
42
58
|
def addFileSet(self, fs : FileSet):
|
59
|
+
fs.src = self.src
|
43
60
|
if "filesets" not in self.params:
|
44
61
|
self.params["filesets"] = []
|
45
62
|
self.params["filesets"].append(fs)
|
46
63
|
|
47
|
-
def getFileSets(self, type
|
64
|
+
def getFileSets(self, type=None) -> List[FileSet]:
|
48
65
|
ret = []
|
49
66
|
|
50
67
|
if "filesets" in self.params:
|
@@ -56,7 +73,7 @@ class TaskData(BaseModel):
|
|
56
73
|
|
57
74
|
def copy(self) -> 'TaskData':
|
58
75
|
ret = TaskData()
|
59
|
-
ret.
|
76
|
+
ret.src = self.src
|
60
77
|
ret.params = self.params.copy()
|
61
78
|
for d in self.deps:
|
62
79
|
ret.deps.append(d.clone())
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task_def.py
RENAMED
@@ -21,7 +21,7 @@
|
|
21
21
|
#****************************************************************************
|
22
22
|
import pydantic.dataclasses as dc
|
23
23
|
from pydantic import BaseModel
|
24
|
-
from typing import Any, Dict, List, Tuple
|
24
|
+
from typing import Any, Dict, List, Union, Tuple
|
25
25
|
from .task import Task
|
26
26
|
|
27
27
|
@dc.dataclass
|
@@ -32,8 +32,8 @@ class TaskSpec(object):
|
|
32
32
|
class TaskDef(BaseModel):
|
33
33
|
"""Holds definition information (ie the YAML view) for a task"""
|
34
34
|
name : str
|
35
|
-
type :
|
36
|
-
depends : List[
|
35
|
+
type : Union[str,TaskSpec] = dc.Field(default_factory=list)
|
36
|
+
depends : List[Union[str,TaskSpec]] = dc.Field(default_factory=list, alias="needs")
|
37
37
|
params: Dict[str,Any] = dc.Field(default_factory=dict, alias="with")
|
38
38
|
|
39
39
|
def copy(self) -> 'TaskDef':
|
@@ -15,7 +15,7 @@ from svdep import FileCollection, TaskCheckUpToDate, TaskBuildFileCollection
|
|
15
15
|
class TaskVcsSimImage(VlTaskSimImage):
|
16
16
|
|
17
17
|
def getRefTime(self):
|
18
|
-
if os.path.
|
18
|
+
if os.path.isfile(os.path.join(self.rundir, 'simv')):
|
19
19
|
return os.path.getmtime(os.path.join(self.rundir, 'simv'))
|
20
20
|
else:
|
21
21
|
raise Exception
|
@@ -3,6 +3,7 @@ import fnmatch
|
|
3
3
|
import dataclasses
|
4
4
|
import shutil
|
5
5
|
import pydantic.dataclasses as dc
|
6
|
+
from toposort import toposort
|
6
7
|
from ....fileset import FileSet
|
7
8
|
from ....package import TaskCtor
|
8
9
|
from ....task import Task, TaskParams, TaskCtorT
|
@@ -31,9 +32,8 @@ class VlTaskSimImage(Task):
|
|
31
32
|
incdirs = []
|
32
33
|
memento = ex_memento
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
files.append(os.path.join(vl_filesets[0].basedir, file))
|
35
|
+
|
36
|
+
self._gatherSvSources(files, incdirs, input)
|
37
37
|
|
38
38
|
if not in_changed:
|
39
39
|
try:
|
@@ -61,6 +61,30 @@ class VlTaskSimImage(Task):
|
|
61
61
|
|
62
62
|
self.setMemento(memento)
|
63
63
|
return output
|
64
|
+
|
65
|
+
def _gatherSvSources(self, files, incdirs, input):
|
66
|
+
# input must represent dependencies for all tasks related to filesets
|
67
|
+
# references must support transitivity
|
68
|
+
|
69
|
+
vl_filesets = input.getFileSets(("verilogSource", "systemVerilogSource"))
|
70
|
+
fs_tasks = [fs.src for fs in vl_filesets]
|
71
|
+
|
72
|
+
# Want dependencies just for the filesets
|
73
|
+
# - key is the task associated with a filelist
|
74
|
+
# - deps is the dep-set of the on the incoming
|
75
|
+
#
|
76
|
+
# -> Send output set of dependencies
|
77
|
+
# - Task -> deps map
|
78
|
+
# "task" : ["dep1", "dep2", ...],
|
79
|
+
# "task2" :
|
80
|
+
# - All tasks are represented in the map
|
81
|
+
# -> Assume projects will often flatten before exporting
|
82
|
+
|
83
|
+
# Sort the deps
|
84
|
+
order = list(toposort(input.deps))
|
85
|
+
|
86
|
+
print("order: %s" % str(order))
|
87
|
+
|
64
88
|
|
65
89
|
|
66
90
|
class VlTaskSimImageParams(TaskParams):
|
@@ -12,8 +12,9 @@ from typing import List, Tuple
|
|
12
12
|
class TaskFileSet(Task):
|
13
13
|
|
14
14
|
async def run(self, input : TaskData) -> TaskData:
|
15
|
-
print("run: %s: base=%s type=%s include=%s" % (
|
15
|
+
print("TaskFileSet run: %s: basedir=%s, base=%s type=%s include=%s" % (
|
16
16
|
self.name,
|
17
|
+
self.basedir,
|
17
18
|
self.params.base, self.params.type, str(self.params.include)
|
18
19
|
))
|
19
20
|
|
@@ -1,20 +0,0 @@
|
|
1
|
-
.. DV Flow Manager documentation master file, created by
|
2
|
-
sphinx-quickstart on Tue Jan 7 02:06:13 2025.
|
3
|
-
You can adapt this file completely to your liking, but it should at least
|
4
|
-
contain the root `toctree` directive.
|
5
|
-
|
6
|
-
DV Flow Manager
|
7
|
-
===============
|
8
|
-
|
9
|
-
DV Flow Manager helps users capture the tasks and dataflow in their
|
10
|
-
design and verification (DV) flows. You can think of DV Flow Manager as a
|
11
|
-
sort of "make for silicon engineering".
|
12
|
-
|
13
|
-
|
14
|
-
.. toctree::
|
15
|
-
:maxdepth: 2
|
16
|
-
:caption: Contents:
|
17
|
-
|
18
|
-
quickstart
|
19
|
-
reference
|
20
|
-
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/.github/workflows/ci.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/__init__.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/__main__.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/cmds/cmd_run.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/fileset.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/package.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/package_def.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/parameters.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/share/flow.json
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/src/dv_flow_mgr/task_memento.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/proj1/proj1.dfs
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/proj2/proj2.dfs
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/data/proj3/proj3.dfs
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/test_fileset.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/test_smoke copy.sav
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.12703462647a1 → dv_flow_mgr-0.0.1.12761553329a1}/tests/unit/test_smoke.py
RENAMED
File without changes
|