siliconcompiler 0.29.4__py3-none-any.whl → 0.31.0__py3-none-any.whl
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.
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/sc.py +1 -1
- siliconcompiler/apps/sc_install.py +35 -3
- siliconcompiler/apps/sc_remote.py +1 -3
- siliconcompiler/core.py +38 -12
- siliconcompiler/flowgraph.py +11 -23
- siliconcompiler/package.py +1 -1
- siliconcompiler/remote/schema.py +9 -8
- siliconcompiler/report/report.py +4 -3
- siliconcompiler/scheduler/__init__.py +109 -104
- siliconcompiler/scheduler/docker_runner.py +1 -1
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +478 -411
- siliconcompiler/schema/schema_obj.py +32 -18
- siliconcompiler/schema/utils.py +19 -0
- siliconcompiler/sphinx_ext/schemagen.py +3 -1
- siliconcompiler/templates/replay/replay.sh.j2 +92 -0
- siliconcompiler/tools/__init__.py +3 -1
- siliconcompiler/tools/_common/__init__.py +8 -2
- siliconcompiler/tools/_common/asic.py +1 -1
- siliconcompiler/tools/bluespec/__init__.py +35 -0
- siliconcompiler/tools/bluespec/convert.py +44 -5
- siliconcompiler/tools/graphviz/__init__.py +12 -0
- siliconcompiler/tools/graphviz/screenshot.py +48 -0
- siliconcompiler/tools/graphviz/show.py +20 -0
- siliconcompiler/tools/klayout/export.py +5 -0
- siliconcompiler/tools/klayout/klayout.py +18 -1
- siliconcompiler/tools/klayout/klayout_export.py +4 -1
- siliconcompiler/tools/klayout/klayout_operations.py +5 -2
- siliconcompiler/tools/klayout/klayout_utils.py +23 -0
- siliconcompiler/tools/klayout/operations.py +5 -0
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/_apr.py +20 -3
- siliconcompiler/tools/openroad/antenna_repair.py +2 -1
- siliconcompiler/tools/openroad/clock_tree_synthesis.py +2 -1
- siliconcompiler/tools/openroad/detailed_placement.py +2 -1
- siliconcompiler/tools/openroad/detailed_route.py +8 -0
- siliconcompiler/tools/openroad/fillercell_insertion.py +2 -1
- siliconcompiler/tools/openroad/global_placement.py +2 -1
- siliconcompiler/tools/openroad/macro_placement.py +9 -0
- siliconcompiler/tools/openroad/pin_placement.py +2 -1
- siliconcompiler/tools/openroad/power_grid.py +6 -0
- siliconcompiler/tools/openroad/repair_design.py +2 -1
- siliconcompiler/tools/openroad/repair_timing.py +2 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +6 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +10 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +17 -5
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +14 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +54 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +55 -17
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +25 -3
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -0
- siliconcompiler/tools/yosys/__init__.py +7 -0
- siliconcompiler/tools/yosys/sc_syn.tcl +33 -24
- siliconcompiler/tools/yosys/syn_asic.py +27 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +27 -0
- siliconcompiler/toolscripts/_tools.json +16 -4
- siliconcompiler/toolscripts/rhel8/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/rhel8/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +22 -0
- siliconcompiler/utils/__init__.py +44 -5
- siliconcompiler/utils/showtools.py +7 -0
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/METADATA +8 -8
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/RECORD +83 -70
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/WHEEL +1 -1
- siliconcompiler/tools/bluespec/bluespec.py +0 -40
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/top_level.txt +0 -0
|
@@ -70,10 +70,17 @@ if { [sc_cfg_tool_task_check_in_list drv_violations var reports] } {
|
|
|
70
70
|
tee -file reports/timing/drv_violators.rpt \
|
|
71
71
|
"report_check_types -max_slew -max_capacitance -max_fanout -violators"
|
|
72
72
|
report_erc_metrics
|
|
73
|
+
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
puts "$PREFIX floating nets"
|
|
76
|
+
tee -file reports/floating_nets.rpt \
|
|
77
|
+
"report_floating_nets -verbose"
|
|
78
|
+
if { [sc_check_version 19048] } {
|
|
79
|
+
puts "$PREFIX overdriven nets"
|
|
80
|
+
tee -file reports/overdriven_nets.rpt \
|
|
81
|
+
"report_overdriven_nets -verbose"
|
|
82
|
+
tee -file reports/overdriven_nets_with_parallel.rpt \
|
|
83
|
+
"report_overdriven_nets -include_parallel_driven -verbose"
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
utl::metric_int "timing__clocks" [llength [all_clocks]]
|
|
@@ -93,6 +100,17 @@ if { [sc_cfg_tool_task_check_in_list fmax var reports] } {
|
|
|
93
100
|
puts "$clk_name fmax = [format %.2f [expr { $fmax / 1e6 }]] MHz"
|
|
94
101
|
set fmax_metric [expr { max($fmax_metric, $fmax) }]
|
|
95
102
|
}
|
|
103
|
+
if { $fmax_metric == 0 } {
|
|
104
|
+
# attempt to compute based on combinatorial path
|
|
105
|
+
set max_path [find_timing_paths -unconstrained -path_delay max]
|
|
106
|
+
set max_path_delay [$max_path data_arrival_time]
|
|
107
|
+
set min_path [find_timing_paths -unconstrained -path_delay min]
|
|
108
|
+
set min_path_delay [$min_path data_arrival_time]
|
|
109
|
+
set path_delay [expr { $max_path_delay - min(0, $min_path_delay) }]
|
|
110
|
+
if { $path_delay > 0 } {
|
|
111
|
+
set fmax_metric [expr { 1.0 / $path_delay }]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
96
114
|
if { $fmax_metric > 0 } {
|
|
97
115
|
utl::metric_float "timing__fmax" $fmax_metric
|
|
98
116
|
}
|
|
@@ -162,6 +180,10 @@ foreach markerdb [[ord::get_db_block] getMarkerCategories] {
|
|
|
162
180
|
continue
|
|
163
181
|
}
|
|
164
182
|
|
|
183
|
+
if { [lsearch -exact $sc_starting_markers [$markerdb getName]] != -1 } {
|
|
184
|
+
continue
|
|
185
|
+
}
|
|
186
|
+
|
|
165
187
|
$markerdb writeTR "reports/markers/${sc_design}.[$markerdb getName].rpt"
|
|
166
188
|
$markerdb writeJSON "reports/markers/${sc_design}.[$markerdb getName].json"
|
|
167
189
|
}
|
|
@@ -210,6 +210,24 @@ proc sc_image_placement_density { } {
|
|
|
210
210
|
"placement density"
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
proc sc_image_module_view { } {
|
|
214
|
+
if { ![sc_has_placed_instances] } {
|
|
215
|
+
return
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if { [llength [[ord::get_db_block] getModInsts]] < 1 } {
|
|
219
|
+
return
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
global sc_design
|
|
223
|
+
sc_image_setup_default
|
|
224
|
+
|
|
225
|
+
gui::set_display_controls "Misc/Module view" visible true
|
|
226
|
+
gui::set_display_controls "Nets/*" visible false
|
|
227
|
+
|
|
228
|
+
sc_save_image "module view" reports/images/${sc_design}.modules.png
|
|
229
|
+
}
|
|
230
|
+
|
|
213
231
|
proc sc_image_clocks { } {
|
|
214
232
|
if { ![sc_has_placed_instances] } {
|
|
215
233
|
return
|
|
@@ -333,12 +351,18 @@ proc sc_image_markers { } {
|
|
|
333
351
|
global sc_design
|
|
334
352
|
sc_image_setup_default
|
|
335
353
|
|
|
354
|
+
global sc_starting_markers
|
|
355
|
+
|
|
336
356
|
file mkdir reports/images/markers
|
|
337
357
|
foreach markerdb [[ord::get_db_block] getMarkerCategories] {
|
|
338
358
|
if { [$markerdb getMarkerCount] == 0 } {
|
|
339
359
|
continue
|
|
340
360
|
}
|
|
341
361
|
|
|
362
|
+
if { [lsearch -exact $sc_starting_markers [$markerdb getName]] != -1 } {
|
|
363
|
+
continue
|
|
364
|
+
}
|
|
365
|
+
|
|
342
366
|
gui::select_marker_category $markerdb
|
|
343
367
|
|
|
344
368
|
sc_save_image \
|
|
@@ -359,6 +383,10 @@ sc_image_everything
|
|
|
359
383
|
sc_image_placement
|
|
360
384
|
sc_image_routing
|
|
361
385
|
|
|
386
|
+
if { [sc_cfg_tool_task_check_in_list module_view var reports] } {
|
|
387
|
+
sc_image_module_view
|
|
388
|
+
}
|
|
389
|
+
|
|
362
390
|
# Markers
|
|
363
391
|
sc_image_markers
|
|
364
392
|
|
|
@@ -98,6 +98,13 @@ def syn_setup(chip):
|
|
|
98
98
|
chip.set('tool', tool, 'task', task, 'output', design + '.vg', step=step, index=index)
|
|
99
99
|
chip.add('tool', tool, 'task', task, 'output', design + '.netlist.json', step=step, index=index)
|
|
100
100
|
|
|
101
|
+
chip.set('tool', tool, 'task', task, 'var', 'use_slang', False,
|
|
102
|
+
step=step, index=index,
|
|
103
|
+
clobber=False)
|
|
104
|
+
chip.set('tool', tool, 'task', task, 'var', 'use_slang',
|
|
105
|
+
'true/false, if true will attempt to use the slang frontend',
|
|
106
|
+
field='help')
|
|
107
|
+
|
|
101
108
|
|
|
102
109
|
##################################################
|
|
103
110
|
def syn_post_process(chip):
|
|
@@ -39,32 +39,41 @@ source "$sc_refdir/procs.tcl"
|
|
|
39
39
|
# TODO: the original OpenFPGA synth script used read_verilog with -nolatches. Is
|
|
40
40
|
# that a flag we might want here?
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
set input_verilog "inputs/$sc_design.v"
|
|
43
|
+
if { [file exists $input_verilog] } {
|
|
44
|
+
if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugin slang] } {
|
|
45
|
+
# This needs some reordering of loaded to ensure blackboxes are handled
|
|
46
|
+
# before this
|
|
47
|
+
set slang_params []
|
|
48
|
+
if { [sc_cfg_exists option param] } {
|
|
49
|
+
dict for {key value} [sc_cfg_get option param] {
|
|
50
|
+
if { ![string is integer $value] } {
|
|
51
|
+
set value [concat \"$value\"]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
lappend slang_params -G "${key}=${value}"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
yosys read_slang \
|
|
58
|
+
-D SYNTHESIS \
|
|
59
|
+
--keep-hierarchy \
|
|
60
|
+
--top $sc_design \
|
|
61
|
+
{*}$slang_params \
|
|
62
|
+
$input_verilog
|
|
63
|
+
} else {
|
|
64
|
+
# Use -noblackbox to correctly interpret empty modules as empty,
|
|
65
|
+
# actual black boxes are read in later
|
|
66
|
+
# https://github.com/YosysHQ/yosys/issues/1468
|
|
67
|
+
yosys read_verilog -noblackbox -sv $input_verilog
|
|
68
|
+
|
|
69
|
+
########################################################
|
|
70
|
+
# Override top level parameters
|
|
71
|
+
########################################################
|
|
72
|
+
|
|
73
|
+
sc_apply_params
|
|
74
|
+
}
|
|
60
75
|
}
|
|
61
76
|
|
|
62
|
-
########################################################
|
|
63
|
-
# Override top level parameters
|
|
64
|
-
########################################################
|
|
65
|
-
|
|
66
|
-
sc_apply_params
|
|
67
|
-
|
|
68
77
|
########################################################
|
|
69
78
|
# Synthesis based on mode
|
|
70
79
|
########################################################
|
|
@@ -217,6 +217,33 @@ def setup_asic(chip):
|
|
|
217
217
|
chip.set('tool', tool, 'task', task, 'file', 'synth_extra_map',
|
|
218
218
|
'Files used in synthesis to perform additional techmapping', field='help')
|
|
219
219
|
|
|
220
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design', False,
|
|
221
|
+
step=step, index=index,
|
|
222
|
+
clobber=False)
|
|
223
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design',
|
|
224
|
+
'true/false, if true will attempt to lock the design with moosic',
|
|
225
|
+
field='help')
|
|
226
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
227
|
+
",".join(['tool', tool, 'task', task, 'var', 'lock_design']),
|
|
228
|
+
step=step, index=index)
|
|
229
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design_key',
|
|
230
|
+
'lock locking key',
|
|
231
|
+
field='help')
|
|
232
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design_port', 'moosic_key',
|
|
233
|
+
step=step, index=index,
|
|
234
|
+
clobber=False)
|
|
235
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design_port',
|
|
236
|
+
'lock locking port name',
|
|
237
|
+
field='help')
|
|
238
|
+
if chip.get('tool', tool, 'task', task, 'var', 'lock_design', step=step, index=index)[0] == \
|
|
239
|
+
'true':
|
|
240
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
241
|
+
",".join(['tool', tool, 'task', task, 'var', 'lock_design_key']),
|
|
242
|
+
step=step, index=index)
|
|
243
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
244
|
+
",".join(['tool', tool, 'task', task, 'var', 'lock_design_port']),
|
|
245
|
+
step=step, index=index)
|
|
246
|
+
|
|
220
247
|
|
|
221
248
|
################################
|
|
222
249
|
# mark cells dont use and format liberty files for yosys and abc
|
|
@@ -217,6 +217,33 @@ if { !$flatten_design && [lindex [sc_cfg_tool_task_get var auto_flatten] 0] == "
|
|
|
217
217
|
# Finish synthesis
|
|
218
218
|
yosys synth {*}$synth_args -top $sc_design -run fine:check
|
|
219
219
|
|
|
220
|
+
# Logic locking
|
|
221
|
+
if { [lindex [sc_cfg_tool_task_get var lock_design] 0] == "true" } {
|
|
222
|
+
if { [sc_load_plugin moosic] } {
|
|
223
|
+
# moosic cannot handle hierarchy
|
|
224
|
+
foreach module [get_modules "*"] {
|
|
225
|
+
yosys select -module $module
|
|
226
|
+
yosys setattr -mod -unset keep_hierarchy
|
|
227
|
+
yosys select -clear
|
|
228
|
+
}
|
|
229
|
+
yosys flatten
|
|
230
|
+
yosys opt -fast
|
|
231
|
+
|
|
232
|
+
set ll_port [lindex [sc_cfg_tool_task_get var lock_design_port] 0]
|
|
233
|
+
set ll_key [lindex [sc_cfg_tool_task_get var lock_design_key] 0]
|
|
234
|
+
set ll_bits [expr { 4 * [string length $ll_key] }]
|
|
235
|
+
yosys select -module $sc_design
|
|
236
|
+
yosys logic_locking \
|
|
237
|
+
-nb-locked $ll_bits \
|
|
238
|
+
-key $ll_key \
|
|
239
|
+
-port-name $ll_port
|
|
240
|
+
yosys tee -o reports/logic_locking.rpt {ll_show}
|
|
241
|
+
yosys select -clear
|
|
242
|
+
} else {
|
|
243
|
+
puts "ERROR: unable to load moosic"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
220
247
|
# https://github.com/hdl/bazel_rules_hdl/blob/4cca75f32a3869a57c0635bc7426a696a15ec143/synthesis/synth.tcl#L54C1-L58C26
|
|
221
248
|
# Remove $print cells. These cells represent Verilog $display() tasks.
|
|
222
249
|
# Some place and route tools cannot handle these in the output Verilog,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openroad": {
|
|
3
3
|
"git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
|
|
4
|
-
"git-commit": "
|
|
4
|
+
"git-commit": "6e6fccbbe0ffbe683a51de3ecac2a24958a53fa1",
|
|
5
5
|
"docker-cmds": [
|
|
6
6
|
"# Remove OR-Tools files",
|
|
7
7
|
"RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"sv2v": {
|
|
47
47
|
"git-url": "https://github.com/zachjs/sv2v.git",
|
|
48
|
-
"git-commit": "
|
|
48
|
+
"git-commit": "5d5723f65dd4501d17004736d7d048bea7ef2339",
|
|
49
49
|
"auto-update": true
|
|
50
50
|
},
|
|
51
51
|
"verilator": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"yosys": {
|
|
93
93
|
"git-url": "https://github.com/YosysHQ/yosys.git",
|
|
94
|
-
"git-commit": "v0.
|
|
94
|
+
"git-commit": "v0.50",
|
|
95
95
|
"version-prefix": "",
|
|
96
96
|
"auto-update": true
|
|
97
97
|
},
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"auto-update": false
|
|
129
129
|
},
|
|
130
130
|
"slang": {
|
|
131
|
-
"git-commit": "
|
|
131
|
+
"git-commit": "v8.0",
|
|
132
132
|
"git-url": "https://github.com/MikePopoloski/slang.git",
|
|
133
133
|
"auto-update": true
|
|
134
134
|
},
|
|
@@ -136,5 +136,17 @@
|
|
|
136
136
|
"git-commit": "v3.3.116",
|
|
137
137
|
"git-url": "https://github.com/gtkwave/gtkwave.git",
|
|
138
138
|
"auto-update": false
|
|
139
|
+
},
|
|
140
|
+
"yosys-slang": {
|
|
141
|
+
"git-url": "https://github.com/povik/yosys-slang.git",
|
|
142
|
+
"git-commit": "0adba99ea43331235506b9b154c78a401f4fe9b6",
|
|
143
|
+
"docker-depends": "yosys",
|
|
144
|
+
"auto-update": true
|
|
145
|
+
},
|
|
146
|
+
"yosys-moosic": {
|
|
147
|
+
"git-url": "https://github.com/gadfort/moosic-yosys-plugin.git",
|
|
148
|
+
"git-commit": "5dd1d8a60d0cc7228be856350bb90faad24dae9e",
|
|
149
|
+
"docker-depends": "yosys",
|
|
150
|
+
"auto-update": true
|
|
139
151
|
}
|
|
140
152
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -130,6 +130,12 @@ def get_default_iomap():
|
|
|
130
130
|
report_drc = ('lyrdb', 'ascii')
|
|
131
131
|
report_log = ('log',)
|
|
132
132
|
|
|
133
|
+
# Images
|
|
134
|
+
image_dot = ('dot', 'xdot')
|
|
135
|
+
image_png = ('png',)
|
|
136
|
+
image_jpg = ('jpg', 'jpeg')
|
|
137
|
+
image_bmp = ('bmp',)
|
|
138
|
+
|
|
133
139
|
# Build default map with fileset and type
|
|
134
140
|
default_iomap = {}
|
|
135
141
|
default_iomap.update({ext: ('hll', 'c') for ext in hll_c})
|
|
@@ -169,6 +175,11 @@ def get_default_iomap():
|
|
|
169
175
|
default_iomap.update({ext: ('report', 'drc') for ext in report_drc})
|
|
170
176
|
default_iomap.update({ext: ('report', 'log') for ext in report_log})
|
|
171
177
|
|
|
178
|
+
default_iomap.update({ext: ('image', 'dot') for ext in image_dot})
|
|
179
|
+
default_iomap.update({ext: ('image', 'png') for ext in image_png})
|
|
180
|
+
default_iomap.update({ext: ('image', 'jpeg') for ext in image_jpg})
|
|
181
|
+
default_iomap.update({ext: ('image', 'bitmap') for ext in image_bmp})
|
|
182
|
+
|
|
172
183
|
return default_iomap
|
|
173
184
|
|
|
174
185
|
|
|
@@ -321,17 +332,20 @@ def grep(chip, args, line):
|
|
|
321
332
|
|
|
322
333
|
|
|
323
334
|
#######################################
|
|
324
|
-
def _resolve_env_vars(chip, filepath):
|
|
335
|
+
def _resolve_env_vars(chip, filepath, step, index):
|
|
325
336
|
if not filepath:
|
|
326
337
|
return None
|
|
327
338
|
|
|
328
339
|
env_save = os.environ.copy()
|
|
329
|
-
|
|
330
|
-
|
|
340
|
+
|
|
341
|
+
os.environ.update(get_env_vars(chip, step, index))
|
|
331
342
|
resolved_path = os.path.expandvars(filepath)
|
|
343
|
+
|
|
332
344
|
os.environ.clear()
|
|
333
345
|
os.environ.update(env_save)
|
|
334
346
|
|
|
347
|
+
resolved_path = os.path.expanduser(resolved_path)
|
|
348
|
+
|
|
335
349
|
# variables that don't exist in environment get ignored by `expandvars`,
|
|
336
350
|
# but we can do our own error checking to ensure this doesn't result in
|
|
337
351
|
# silent bugs
|
|
@@ -342,8 +356,31 @@ def _resolve_env_vars(chip, filepath):
|
|
|
342
356
|
return resolved_path
|
|
343
357
|
|
|
344
358
|
|
|
359
|
+
#######################################
|
|
360
|
+
def get_env_vars(chip, step, index):
|
|
361
|
+
'''
|
|
362
|
+
Returns a dictionary of environmental variables from the manifest
|
|
363
|
+
'''
|
|
364
|
+
|
|
365
|
+
schema_env = {}
|
|
366
|
+
for env in chip.getkeys('option', 'env'):
|
|
367
|
+
schema_env[env] = chip.get('option', 'env', env)
|
|
368
|
+
|
|
369
|
+
flow = chip.get('option', 'flow')
|
|
370
|
+
if step is not None and index is not None and flow:
|
|
371
|
+
tool = chip.get('flowgraph', flow, step, str(index), 'tool')
|
|
372
|
+
task = chip.get('flowgraph', flow, step, str(index), 'task')
|
|
373
|
+
|
|
374
|
+
if chip.valid('tool', tool, 'task', task, 'env'):
|
|
375
|
+
for env in chip.getkeys('tool', tool, 'task', task, 'env'):
|
|
376
|
+
schema_env[env] = chip.get('tool', tool, 'task', task, 'env', env,
|
|
377
|
+
step=step, index=index)
|
|
378
|
+
|
|
379
|
+
return schema_env
|
|
380
|
+
|
|
381
|
+
|
|
345
382
|
###########################################################################
|
|
346
|
-
def find_sc_file(chip, filename, missing_ok=False, search_paths=None):
|
|
383
|
+
def find_sc_file(chip, filename, missing_ok=False, search_paths=None, step=None, index=None):
|
|
347
384
|
"""
|
|
348
385
|
Returns the absolute path for the filename provided.
|
|
349
386
|
|
|
@@ -359,6 +396,8 @@ def find_sc_file(chip, filename, missing_ok=False, search_paths=None):
|
|
|
359
396
|
found, rather than returning None.
|
|
360
397
|
search_paths (list): List of directories to search under instead of
|
|
361
398
|
the defaults.
|
|
399
|
+
step (str): Step name
|
|
400
|
+
index (str): Index
|
|
362
401
|
|
|
363
402
|
Returns:
|
|
364
403
|
Returns absolute path of 'filename' if found, otherwise returns
|
|
@@ -374,7 +413,7 @@ def find_sc_file(chip, filename, missing_ok=False, search_paths=None):
|
|
|
374
413
|
return None
|
|
375
414
|
|
|
376
415
|
# Replacing environment variables
|
|
377
|
-
filename = _resolve_env_vars(chip, filename)
|
|
416
|
+
filename = _resolve_env_vars(chip, filename, step, index)
|
|
378
417
|
|
|
379
418
|
# If we have an absolute path, pass-through here
|
|
380
419
|
if os.path.isabs(filename) and os.path.exists(filename):
|