dv-flow-mgr 0.0.1.13551739897a1__tar.gz → 0.0.1.13577785562a1__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.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/PKG-INFO +1 -1
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Steps.md +6 -2
- dv_flow_mgr-0.0.1.13577785562a1/fwperiph_dma.pss +127 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/pyproject.toml +1 -1
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/eval_jq.py +3 -2
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/expr_eval.py +5 -2
- dv_flow_mgr-0.0.1.13577785562a1/src/dv_flow/mgr/param.py +20 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/param_ref_eval.py +0 -3
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_node.py +33 -16
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow_mgr.egg-info/PKG-INFO +1 -1
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow_mgr.egg-info/SOURCES.txt +2 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_pytask_smoke.py +99 -1
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/.github/workflows/ci.yml +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/.gitignore +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/.vscode/settings.json +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/LICENSE +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/README.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/KeyArchitecture.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Makefile +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Notes.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Roadmap.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/RundirLayout.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Stages.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Tasks.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/TypesAndDefs.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/Usecases.md +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/conf.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/index.rst +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/intro.rst +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/quickstart.rst +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/docs/reference.rst +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/ivpm.yaml +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/setup.cfg +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/__init__.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/__main__.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/cmds/cmd_run.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/expr_parser.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/fileset.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/fragment_def.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/out +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/package.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/package_def.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/package_import_spec.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/param_def.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/parsetab.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/pkg_rgy.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/share/flow.json +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/fileset.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/flow.dv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/message.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/task_null.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_ctor.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_data.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_def.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_exec_data.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_graph_builder.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_graph_runner.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_graph_runner_local.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_impl_data.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_memento.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_output.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_params_ctor.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_runner.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/type.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/type_def.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/util.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow_mgr.egg-info/dependency_links.txt +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow_mgr.egg-info/entry_points.txt +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow_mgr.egg-info/requires.txt +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow_mgr.egg-info/top_level.txt +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/examples/example1/example1.flow +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/system/test_depends.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/system/test_pkg_discovery.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/system/test_stdlib.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/__init__.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1/files1/file1_1.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1/files1/file1_2.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1/files2/file2_1.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1/files2/file2_2.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1/flow.dv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1 copy/files1/file1_1.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1 copy/files1/file1_2.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1 copy/files2/file2_1.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1 copy/files2/file2_2.sv +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/fileset/test1 copy/test1.dfs +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/proj1/proj1.dfs +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/proj2/proj2.dfs +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/proj3/proj3.dfs +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_data_merge.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_expr_eval.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_expr_parser.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_fileset.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_parse.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_pyclass.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_smoke copy.sav +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_smoke.py +0 -0
- {dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_stdlib.py +0 -0
@@ -105,10 +105,14 @@ runner.run(simImg)
|
|
105
105
|
factory.addTaskType(MyTask.ctor)
|
106
106
|
|
107
107
|
# Proper values
|
108
|
-
|
108
|
+
* Show that can pass individual values
|
109
109
|
- Need to test append/prepend/path-append/path-prepend
|
110
|
-
|
110
|
+
* Need to process and expand expressions
|
111
111
|
-
|
112
112
|
|
113
|
+
with:
|
114
|
+
args: <value>
|
115
|
+
# List-of
|
116
|
+
- append-list:
|
113
117
|
|
114
118
|
|
@@ -0,0 +1,127 @@
|
|
1
|
+
|
2
|
+
struct wb_if { }
|
3
|
+
struct clk_rst_if { }
|
4
|
+
|
5
|
+
// Need to mark hierarchies as 'verilog'
|
6
|
+
// This allows
|
7
|
+
component fwperiph_dma : vlog_blackbox_c {
|
8
|
+
// All contain refs
|
9
|
+
// Upper must connect during init_down
|
10
|
+
export_c<wb_if> reg_if;
|
11
|
+
port_c<wb_if> mem_if;
|
12
|
+
port_c<wb_if> clk_rst_if;
|
13
|
+
|
14
|
+
exec init_down {
|
15
|
+
module_type = "fwperiph_dma #(%s,%s)" % hh;
|
16
|
+
|
17
|
+
// Append port bindings?
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
component wb_initiator_bfm_c {
|
22
|
+
|
23
|
+
// Port: consumer - requires something to implement the API
|
24
|
+
// Export: provider - is, or provides, an implementation
|
25
|
+
port_c<
|
26
|
+
}
|
27
|
+
|
28
|
+
// Effectively want to partition such that PSS model is valid,
|
29
|
+
// and we can extract a region to generate as SV
|
30
|
+
|
31
|
+
// Want to create a full testbench env from PSS input
|
32
|
+
// - Still have to pull the
|
33
|
+
|
34
|
+
// Hierarchy mirrors the design and surrounding environment
|
35
|
+
component pss_top {
|
36
|
+
wb_initiator_bfm_c reg_if;
|
37
|
+
fwperiph_dma_c dut;
|
38
|
+
|
39
|
+
exec init_down {
|
40
|
+
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
// port/export are orthogonal to interface/mirror
|
45
|
+
|
46
|
+
// Wire ports have two components
|
47
|
+
// Always use 'export', since we are providing
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
For wire ports, outside world must be able to determine internal binding (?)
|
52
|
+
- No, not really. Assume netlister will create temp wires with names like container
|
53
|
+
- dma_u_adr_i
|
54
|
+
- ...
|
55
|
+
|
56
|
+
Port must have a reference to an export
|
57
|
+
Directionality may be arbitrary...
|
58
|
+
|
59
|
+
port: initiator
|
60
|
+
export: target
|
61
|
+
|
62
|
+
Need to elaborate component tree in order to connect up bound port/export
|
63
|
+
|
64
|
+
Goal is to be able to:
|
65
|
+
- Instance the dut
|
66
|
+
- Isolate stimulus
|
67
|
+
- Synthesize stimulus
|
68
|
+
|
69
|
+
|
70
|
+
Create reactive tests
|
71
|
+
- Must be able to identify reactive portion
|
72
|
+
- "constraints" surrounding reactive data must be sufficiently open
|
73
|
+
- Must be able to "lower" reactive subset of the description
|
74
|
+
|
75
|
+
"Scope of reactivity"
|
76
|
+
- Loop:
|
77
|
+
repeat (<variable>) {
|
78
|
+
// body must also be autonomous?
|
79
|
+
// body is fixed or autonomous
|
80
|
+
}
|
81
|
+
|
82
|
+
Action traversal cannot cross partition boundaries?
|
83
|
+
- Specifically, must convert to reads/writes
|
84
|
+
- Maybe automate
|
85
|
+
|
86
|
+
Capture required Emu / DfX content as part of UTP
|
87
|
+
- Platform required
|
88
|
+
- Target-specific requirements
|
89
|
+
- Known dependencies (eg content for related blocks)
|
90
|
+
- Stub requirements (which interfaces must be accessed)
|
91
|
+
=> Goal: produce reusable content with minimal additional effort
|
92
|
+
|
93
|
+
Pitch: multiple teams developing cross-platform test content from a natural-language spec
|
94
|
+
- IP team needs to deliver to firmware
|
95
|
+
- Emu team often re-engineers init content, builds SL content on top
|
96
|
+
- Likewise, DfX team often re-engineers ; may be delayed due to dependency
|
97
|
+
-> Want to reduce or eliminate redundant work
|
98
|
+
-> Want consistency in what is used -- verifcation
|
99
|
+
->
|
100
|
+
Pitch: capture initialization in machine-readable format
|
101
|
+
-> Derive natural-language description and diagrams
|
102
|
+
-> Derive platform-appropriate content
|
103
|
+
-> Save time
|
104
|
+
|
105
|
+
Formal capture of init sequences
|
106
|
+
- Capture in PSS
|
107
|
+
- Derive user documentation (AI for summarization + comments)
|
108
|
+
|
109
|
+
struct wishbone_s : protocol_s {
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
struct wishbone_rtl_abstraction_s <ADDR_WIDTH=32, DATA_WIDTH=32> : abstraction_s<wishbone_s> {
|
114
|
+
@port(init_dir=Output, targ_dir=Input)
|
115
|
+
bit[DATA_WIDTH] wr_data;
|
116
|
+
|
117
|
+
@port(init_dir=Output, targ_dir=Input)
|
118
|
+
bit[DATA_WIDTH] rd_data;
|
119
|
+
}
|
120
|
+
|
121
|
+
// bus type
|
122
|
+
// abstraction
|
123
|
+
// initiator, target, initiator_mirror,
|
124
|
+
|
125
|
+
component wb_initiator_c {
|
126
|
+
|
127
|
+
}
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/eval_jq.py
RENAMED
@@ -8,8 +8,9 @@ def eval_jq(input, args):
|
|
8
8
|
filt = jq.compile(args[0])
|
9
9
|
|
10
10
|
if type(input) == str:
|
11
|
-
ret = filt.input_text(input).
|
11
|
+
ret = filt.input_text(input).text()
|
12
12
|
else:
|
13
|
-
ret = filt.input_value(input).
|
13
|
+
ret = filt.input_value(input).text()
|
14
|
+
|
14
15
|
|
15
16
|
return ret
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/expr_eval.py
RENAMED
@@ -19,8 +19,11 @@ class ExprEval(ExprVisitor):
|
|
19
19
|
return val
|
20
20
|
|
21
21
|
def _toString(self, val):
|
22
|
-
|
23
|
-
|
22
|
+
rval = val
|
23
|
+
if type(val) != str:
|
24
|
+
obj = self._toObject(val)
|
25
|
+
rval = json.dumps(obj)
|
26
|
+
return rval
|
24
27
|
# if isinstance(val, list):
|
25
28
|
# val = '[' + ",".join(self._toString(v) for v in val) + ']'
|
26
29
|
# elif hasattr(val, "model_dump_json"):
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
from pydantic import BaseModel
|
3
|
+
import pydantic.dataclasses as pdc
|
4
|
+
from typing import Any, List, Union
|
5
|
+
|
6
|
+
class ParamMeta(type):
|
7
|
+
def __getitem__(self, T):
|
8
|
+
ret = Union[T, Param]
|
9
|
+
return ret
|
10
|
+
|
11
|
+
class ParamT(metaclass=ParamMeta):
|
12
|
+
pass
|
13
|
+
|
14
|
+
class Param(BaseModel):
|
15
|
+
append : Union[Any,List] = pdc.Field(default=None)
|
16
|
+
prepend : Union[Any,List] = pdc.Field(default=None)
|
17
|
+
append_path : Union[Any,List] = pdc.Field(default=None, alias="append-path")
|
18
|
+
prepend_path : Union[Any,List] = pdc.Field(default=None, alias="prepend-path")
|
19
|
+
|
20
|
+
|
@@ -26,12 +26,9 @@ class ParamRefEval(object):
|
|
26
26
|
raise Exception("unterminated variable ref")
|
27
27
|
|
28
28
|
ref = val[idx+3:eidx].strip()
|
29
|
-
print("ref: %s" % ref)
|
30
29
|
|
31
30
|
expr_ast = self.parser.parse(ref)
|
32
|
-
print("expr_ast: %s" % str(expr_ast))
|
33
31
|
exp_val = self.expr_eval.eval(expr_ast)
|
34
|
-
print("exp_val: %s" % str(exp_val))
|
35
32
|
|
36
33
|
# Replacing [idx..eidx+2] with len(exp_val)
|
37
34
|
val = val[:idx] + exp_val + val[eidx+2:]
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_node.py
RENAMED
@@ -6,6 +6,7 @@ from typing import Any, Callable, ClassVar, Dict, List
|
|
6
6
|
from .task_data import TaskDataInput, TaskDataOutput, TaskDataResult
|
7
7
|
from .task_params_ctor import TaskParamsCtor
|
8
8
|
from .param_ref_eval import ParamRefEval
|
9
|
+
from .param import Param
|
9
10
|
|
10
11
|
@dc.dataclass
|
11
12
|
class TaskNode(object):
|
@@ -45,16 +46,19 @@ class TaskNode(object):
|
|
45
46
|
|
46
47
|
eval.setVar("in", in_params)
|
47
48
|
|
48
|
-
# for attr in dir(self.params):
|
49
|
-
# if not attr.startswith("_"):
|
50
|
-
# print("Attr: %s" % attr)
|
51
49
|
for name,field in self.params.model_fields.items():
|
52
50
|
value = getattr(self.params, name)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
51
|
+
if type(value) == str:
|
52
|
+
if value.find("${{") != -1:
|
53
|
+
new_val = eval.eval(value)
|
54
|
+
setattr(self.params, name, new_val)
|
55
|
+
elif isinstance(value, list):
|
56
|
+
for i,elem in enumerate(value):
|
57
|
+
if elem.find("${{") != -1:
|
58
|
+
new_val = eval.eval(elem)
|
59
|
+
value[i] = new_val
|
60
|
+
else:
|
61
|
+
raise Exception("Unhandled param type: %s" % str(value))
|
58
62
|
|
59
63
|
input = TaskDataInput(
|
60
64
|
changed=changed,
|
@@ -83,12 +87,6 @@ class TaskNode(object):
|
|
83
87
|
def __hash__(self):
|
84
88
|
return id(self)
|
85
89
|
|
86
|
-
@staticmethod
|
87
|
-
def task(paramT):
|
88
|
-
def wrapper(T):
|
89
|
-
ctor = TaskNodeCtorWrapper(T.__name__, T, paramT)
|
90
|
-
return ctor
|
91
|
-
return wrapper
|
92
90
|
|
93
91
|
@dc.dataclass
|
94
92
|
class TaskNodeCtor(object):
|
@@ -99,7 +97,6 @@ class TaskNodeCtor(object):
|
|
99
97
|
"""
|
100
98
|
name : str
|
101
99
|
|
102
|
-
|
103
100
|
def mkTaskNode(self, srcdir, params, name=None) -> TaskNode:
|
104
101
|
raise NotImplementedError("mkTaskNode in type %s" % str(type(self)))
|
105
102
|
|
@@ -140,5 +137,25 @@ class TaskNodeCtorWrapper(TaskNodeCtor):
|
|
140
137
|
str(type(obj)),
|
141
138
|
key))
|
142
139
|
else:
|
143
|
-
|
140
|
+
if isinstance(value, Param):
|
141
|
+
if value.append is not None:
|
142
|
+
ex_value = getattr(obj, key, [])
|
143
|
+
ex_value.extend(value.append)
|
144
|
+
setattr(obj, key, ex_value)
|
145
|
+
elif value.prepend is not None:
|
146
|
+
ex_value = getattr(obj, key, [])
|
147
|
+
value = value.copy()
|
148
|
+
value.extend(ex_value)
|
149
|
+
setattr(obj, key, value)
|
150
|
+
pass
|
151
|
+
else:
|
152
|
+
raise Exception("Unhandled value spec: %s" % str(value))
|
153
|
+
else:
|
154
|
+
setattr(obj, key, value)
|
144
155
|
return obj
|
156
|
+
|
157
|
+
def task(paramT):
|
158
|
+
def wrapper(T):
|
159
|
+
ctor = TaskNodeCtorWrapper(T.__name__, T, paramT)
|
160
|
+
return ctor
|
161
|
+
return wrapper
|
@@ -1,6 +1,7 @@
|
|
1
1
|
.gitignore
|
2
2
|
LICENSE
|
3
3
|
README.md
|
4
|
+
fwperiph_dma.pss
|
4
5
|
ivpm.yaml
|
5
6
|
pyproject.toml
|
6
7
|
.github/workflows/ci.yml
|
@@ -31,6 +32,7 @@ src/dv_flow/mgr/out
|
|
31
32
|
src/dv_flow/mgr/package.py
|
32
33
|
src/dv_flow/mgr/package_def.py
|
33
34
|
src/dv_flow/mgr/package_import_spec.py
|
35
|
+
src/dv_flow/mgr/param.py
|
34
36
|
src/dv_flow/mgr/param_def.py
|
35
37
|
src/dv_flow/mgr/param_ref_eval.py
|
36
38
|
src/dv_flow/mgr/parsetab.py
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_pytask_smoke.py
RENAMED
@@ -1,10 +1,14 @@
|
|
1
1
|
import asyncio
|
2
2
|
import pytest
|
3
|
+
from typing import List, Union
|
3
4
|
import dataclasses as dc
|
5
|
+
import pydantic.dataclasses as pdc
|
4
6
|
from pydantic import BaseModel
|
7
|
+
from dv_flow.mgr.param import Param, ParamT
|
5
8
|
from dv_flow.mgr.task import Task
|
6
9
|
from dv_flow.mgr.task_data import TaskDataResult, TaskMarker, TaskParameterSet
|
7
10
|
from dv_flow.mgr.task_node import task as t_decorator
|
11
|
+
from dv_flow.mgr.task_node import task
|
8
12
|
from dv_flow.mgr.task_runner import SingleTaskRunner, TaskSetRunner
|
9
13
|
|
10
14
|
|
@@ -138,4 +142,98 @@ def test_smoke_4(tmpdir):
|
|
138
142
|
|
139
143
|
assert len(called) == 3
|
140
144
|
assert called[-1][0] == "MyTask3"
|
141
|
-
assert called[-1][1] == "[1, 2]"
|
145
|
+
assert called[-1][1] == "[1, 2]"
|
146
|
+
|
147
|
+
def test_smoke_5(tmpdir):
|
148
|
+
|
149
|
+
class Params(BaseModel):
|
150
|
+
p1 : ParamT[List[str]] = pdc.Field(default_factory=list)
|
151
|
+
|
152
|
+
class TaskData(TaskParameterSet):
|
153
|
+
files : ParamT[List[str]] = pdc.Field(default_factory=list)
|
154
|
+
|
155
|
+
called = []
|
156
|
+
|
157
|
+
@task(Params)
|
158
|
+
async def MyTask1(runner, input):
|
159
|
+
nonlocal called
|
160
|
+
called.append(("MyTask1", input.params.p1))
|
161
|
+
return TaskDataResult(
|
162
|
+
output=[TaskData(files=["f1", "f2", "f3"])]
|
163
|
+
)
|
164
|
+
|
165
|
+
@task(Params)
|
166
|
+
async def MyTask2(runner, input):
|
167
|
+
nonlocal called
|
168
|
+
called.append(("MyTask2", input.params.p1))
|
169
|
+
return TaskDataResult(
|
170
|
+
output=[TaskData(files=["f4", "f5", "f6"])]
|
171
|
+
)
|
172
|
+
|
173
|
+
@task(Params)
|
174
|
+
async def MyTask3(runner, input):
|
175
|
+
nonlocal called
|
176
|
+
called.append(("MyTask3", input.params.p1))
|
177
|
+
return TaskDataResult()
|
178
|
+
|
179
|
+
task1 = MyTask1("srcdir", p1="1")
|
180
|
+
task2 = MyTask2("srcdir", p1="2")
|
181
|
+
task3 = MyTask3("srcdir",
|
182
|
+
p1="${{ in | jq('[.[] .files]') | jq('flatten') }}",
|
183
|
+
# p1="${{ in | jq('.[] .files') }}",
|
184
|
+
needs=[task1, task2])
|
185
|
+
runner = TaskSetRunner("rundir")
|
186
|
+
|
187
|
+
result = asyncio.run(runner.run(task3))
|
188
|
+
|
189
|
+
assert len(called) == 3
|
190
|
+
assert called[-1][0] == "MyTask3"
|
191
|
+
assert called[-1][1] == '["f1", "f2", "f3", "f4", "f5", "f6"]'
|
192
|
+
|
193
|
+
def test_smoke_6(tmpdir):
|
194
|
+
|
195
|
+
class Params(BaseModel):
|
196
|
+
p1 : ParamT[List[str]] = pdc.Field(default=["1","2"])
|
197
|
+
|
198
|
+
class TaskData(TaskParameterSet):
|
199
|
+
files : ParamT[List[str]] = pdc.Field(default_factory=list)
|
200
|
+
|
201
|
+
called = []
|
202
|
+
|
203
|
+
@task(Params)
|
204
|
+
async def MyTask1(runner, input):
|
205
|
+
nonlocal called
|
206
|
+
called.append(("MyTask1", input.params.p1))
|
207
|
+
return TaskDataResult(
|
208
|
+
output=[TaskData(files=["f1", "f2", "f3"])]
|
209
|
+
)
|
210
|
+
|
211
|
+
@task(Params)
|
212
|
+
async def MyTask2(runner, input):
|
213
|
+
nonlocal called
|
214
|
+
called.append(("MyTask2", input.params.p1))
|
215
|
+
return TaskDataResult(
|
216
|
+
output=[TaskData(files=["f4", "f5", "f6"])]
|
217
|
+
)
|
218
|
+
|
219
|
+
@task(Params)
|
220
|
+
async def MyTask3(runner, input):
|
221
|
+
nonlocal called
|
222
|
+
called.append(("MyTask3", input.params.p1))
|
223
|
+
return TaskDataResult()
|
224
|
+
|
225
|
+
task1 = MyTask1("srcdir", p1="3")
|
226
|
+
task2 = MyTask2("srcdir", p1=Param(append=["4"]))
|
227
|
+
task3 = MyTask3("srcdir",
|
228
|
+
p1="${{ in | jq('[.[] .files]') | jq('flatten') }}",
|
229
|
+
# p1="${{ in | jq('.[] .files') }}",
|
230
|
+
needs=[task1, task2])
|
231
|
+
runner = TaskSetRunner("rundir")
|
232
|
+
|
233
|
+
result = asyncio.run(runner.run(task3))
|
234
|
+
|
235
|
+
assert len(called) == 3
|
236
|
+
assert called[1][0] == "MyTask2"
|
237
|
+
assert called[1][1] == ["1", "2", "4"]
|
238
|
+
assert called[-1][0] == "MyTask3"
|
239
|
+
assert called[-1][1] == '["f1", "f2", "f3", "f4", "f5", "f6"]'
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/.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
|
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.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/__init__.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/__main__.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/cmds/cmd_run.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/expr_parser.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/fileset.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/fragment_def.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/package.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/package_def.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/param_def.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/parsetab.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/pkg_rgy.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/share/flow.json
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/fileset.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/flow.dv
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/message.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/std/task_null.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_ctor.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_data.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_def.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_memento.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_output.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/task_runner.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/src/dv_flow/mgr/type_def.py
RENAMED
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.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/system/test_depends.py
RENAMED
File without changes
|
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/system/test_stdlib.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
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/proj1/proj1.dfs
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/proj2/proj2.dfs
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/data/proj3/proj3.dfs
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_data_merge.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_expr_eval.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_expr_parser.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_fileset.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_parse.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_pyclass.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_smoke copy.sav
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_smoke.py
RENAMED
File without changes
|
{dv_flow_mgr-0.0.1.13551739897a1 → dv_flow_mgr-0.0.1.13577785562a1}/tests/unit/test_stdlib.py
RENAMED
File without changes
|