siliconcompiler 0.33.2__py3-none-any.whl → 0.34.1__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/__init__.py +2 -0
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/_common.py +1 -1
- siliconcompiler/apps/sc.py +1 -1
- siliconcompiler/apps/sc_issue.py +6 -4
- siliconcompiler/apps/sc_remote.py +3 -20
- siliconcompiler/apps/sc_show.py +2 -2
- siliconcompiler/apps/utils/replay.py +4 -4
- siliconcompiler/checklist.py +202 -1
- siliconcompiler/core.py +62 -293
- siliconcompiler/data/templates/email/general.j2 +3 -3
- siliconcompiler/data/templates/email/summary.j2 +1 -1
- siliconcompiler/data/templates/issue/README.txt +1 -1
- siliconcompiler/data/templates/report/sc_report.j2 +7 -7
- siliconcompiler/dependencyschema.py +392 -0
- siliconcompiler/design.py +758 -0
- siliconcompiler/flowgraph.py +79 -13
- siliconcompiler/optimizer/vizier.py +2 -2
- siliconcompiler/package/__init__.py +383 -223
- siliconcompiler/package/git.py +75 -77
- siliconcompiler/package/github.py +70 -97
- siliconcompiler/package/https.py +77 -93
- siliconcompiler/packageschema.py +260 -0
- siliconcompiler/pdk.py +5 -5
- siliconcompiler/remote/client.py +33 -15
- siliconcompiler/remote/server.py +2 -2
- siliconcompiler/report/dashboard/cli/__init__.py +6 -6
- siliconcompiler/report/dashboard/cli/board.py +4 -4
- siliconcompiler/report/dashboard/web/components/__init__.py +5 -5
- siliconcompiler/report/dashboard/web/components/flowgraph.py +4 -4
- siliconcompiler/report/dashboard/web/components/graph.py +2 -2
- siliconcompiler/report/dashboard/web/state.py +1 -1
- siliconcompiler/report/dashboard/web/utils/__init__.py +5 -5
- siliconcompiler/report/html_report.py +1 -1
- siliconcompiler/report/report.py +4 -4
- siliconcompiler/report/summary_table.py +2 -2
- siliconcompiler/report/utils.py +5 -5
- siliconcompiler/scheduler/__init__.py +3 -1382
- siliconcompiler/scheduler/docker.py +263 -0
- siliconcompiler/scheduler/run_node.py +10 -21
- siliconcompiler/scheduler/scheduler.py +311 -0
- siliconcompiler/scheduler/schedulernode.py +944 -0
- siliconcompiler/scheduler/send_messages.py +3 -3
- siliconcompiler/scheduler/slurm.py +149 -163
- siliconcompiler/scheduler/taskscheduler.py +45 -57
- siliconcompiler/schema/__init__.py +3 -3
- siliconcompiler/schema/baseschema.py +234 -11
- siliconcompiler/schema/editableschema.py +4 -0
- siliconcompiler/schema/journal.py +210 -0
- siliconcompiler/schema/namedschema.py +55 -2
- siliconcompiler/schema/parameter.py +14 -1
- siliconcompiler/schema/parametervalue.py +1 -34
- siliconcompiler/schema/schema_cfg.py +210 -349
- siliconcompiler/tool.py +412 -148
- siliconcompiler/tools/__init__.py +2 -0
- siliconcompiler/tools/builtin/_common.py +5 -5
- siliconcompiler/tools/builtin/concatenate.py +7 -7
- siliconcompiler/tools/builtin/minimum.py +4 -4
- siliconcompiler/tools/builtin/mux.py +4 -4
- siliconcompiler/tools/builtin/nop.py +4 -4
- siliconcompiler/tools/builtin/verify.py +8 -9
- siliconcompiler/tools/execute/exec_input.py +1 -1
- siliconcompiler/tools/genfasm/genfasm.py +1 -6
- siliconcompiler/tools/openroad/_apr.py +5 -1
- siliconcompiler/tools/openroad/antenna_repair.py +1 -1
- siliconcompiler/tools/openroad/macro_placement.py +1 -1
- siliconcompiler/tools/openroad/power_grid.py +1 -1
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +32 -25
- siliconcompiler/tools/opensta/timing.py +26 -3
- siliconcompiler/tools/slang/__init__.py +2 -2
- siliconcompiler/tools/surfer/__init__.py +0 -0
- siliconcompiler/tools/surfer/show.py +53 -0
- siliconcompiler/tools/surfer/surfer.py +30 -0
- siliconcompiler/tools/vpr/route.py +82 -0
- siliconcompiler/tools/vpr/vpr.py +23 -6
- siliconcompiler/tools/yosys/__init__.py +1 -1
- siliconcompiler/tools/yosys/scripts/procs.tcl +143 -0
- siliconcompiler/tools/yosys/{sc_synth_asic.tcl → scripts/sc_synth_asic.tcl} +4 -0
- siliconcompiler/tools/yosys/{sc_synth_fpga.tcl → scripts/sc_synth_fpga.tcl} +24 -77
- siliconcompiler/tools/yosys/syn_fpga.py +14 -0
- siliconcompiler/toolscripts/_tools.json +9 -13
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +0 -2
- siliconcompiler/toolscripts/ubuntu22/install-surfer.sh +33 -0
- siliconcompiler/toolscripts/ubuntu24/install-surfer.sh +33 -0
- siliconcompiler/utils/__init__.py +4 -24
- siliconcompiler/utils/flowgraph.py +29 -28
- siliconcompiler/utils/issue.py +23 -29
- siliconcompiler/utils/logging.py +37 -7
- siliconcompiler/utils/showtools.py +6 -1
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/METADATA +16 -25
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/RECORD +98 -91
- siliconcompiler/scheduler/docker_runner.py +0 -254
- siliconcompiler/schema/journalingschema.py +0 -242
- siliconcompiler/tools/yosys/procs.tcl +0 -71
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +0 -68
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +0 -68
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +0 -68
- /siliconcompiler/tools/yosys/{sc_lec.tcl → scripts/sc_lec.tcl} +0 -0
- /siliconcompiler/tools/yosys/{sc_screenshot.tcl → scripts/sc_screenshot.tcl} +0 -0
- /siliconcompiler/tools/yosys/{syn_strategies.tcl → scripts/syn_strategies.tcl} +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/top_level.txt +0 -0
siliconcompiler/tools/vpr/vpr.py
CHANGED
|
@@ -43,7 +43,7 @@ def setup_tool(chip, clobber=True):
|
|
|
43
43
|
|
|
44
44
|
chip.set('tool', 'vpr', 'exe', 'vpr', clobber=clobber)
|
|
45
45
|
chip.set('tool', 'vpr', 'vswitch', '--version')
|
|
46
|
-
chip.set('tool', 'vpr', 'version', '>=
|
|
46
|
+
chip.set('tool', 'vpr', 'version', '>=v8.0.0-12677', clobber=clobber)
|
|
47
47
|
|
|
48
48
|
step = chip.get('arg', 'step')
|
|
49
49
|
index = chip.get('arg', 'index')
|
|
@@ -184,6 +184,7 @@ def runtime_options(chip):
|
|
|
184
184
|
options.append("--sdc_file")
|
|
185
185
|
options.append(sdc_file)
|
|
186
186
|
|
|
187
|
+
if use_timing_analysis(chip):
|
|
187
188
|
report_type = chip.get('tool', tool, 'task', task, 'var', 'timing_report_type',
|
|
188
189
|
step=step, index=index)[0]
|
|
189
190
|
options.extend(['--timing_report_detail', report_type])
|
|
@@ -297,20 +298,36 @@ def parse_version(stdout):
|
|
|
297
298
|
# This is free open source code under MIT license.
|
|
298
299
|
#
|
|
299
300
|
#
|
|
300
|
-
return stdout.split()[6]
|
|
301
301
|
|
|
302
|
+
# Grab the revision. Which will be of the form:
|
|
303
|
+
# v8.0.0-7887-gc4156f225
|
|
304
|
+
revision = stdout.split()[8]
|
|
302
305
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
+
# VTR infrequently makes even minor releases, use the number of commits
|
|
307
|
+
# since the last release of VTR as another part of the release segment.
|
|
308
|
+
pieces = revision.split("-")
|
|
309
|
+
if len(pieces) == 3:
|
|
310
|
+
# Strip off the hash if it exists.
|
|
311
|
+
return "-".join(pieces[:-1])
|
|
306
312
|
else:
|
|
307
|
-
return
|
|
313
|
+
return revision
|
|
308
314
|
|
|
309
315
|
|
|
310
316
|
def auto_constraints():
|
|
311
317
|
return 'inputs/sc_constraints.xml'
|
|
312
318
|
|
|
313
319
|
|
|
320
|
+
def use_timing_analysis(chip):
|
|
321
|
+
'''
|
|
322
|
+
Return true if the given chip should use timing analysis in the VPR flow.
|
|
323
|
+
'''
|
|
324
|
+
step = chip.get('arg', 'step')
|
|
325
|
+
index = chip.get('arg', 'index')
|
|
326
|
+
return \
|
|
327
|
+
chip.valid('input', 'constraint', 'sdc') and \
|
|
328
|
+
chip.get('input', 'constraint', 'sdc', step=step, index=index)
|
|
329
|
+
|
|
330
|
+
|
|
314
331
|
def vpr_post_process(chip):
|
|
315
332
|
step = chip.get('arg', 'step')
|
|
316
333
|
index = chip.get('arg', 'index')
|
|
@@ -51,7 +51,7 @@ def setup(chip):
|
|
|
51
51
|
option.append('-C')
|
|
52
52
|
option.append('-c')
|
|
53
53
|
chip.set('tool', tool, 'task', task, 'option', option, step=step, index=index, clobber=False)
|
|
54
|
-
chip.set('tool', tool, 'task', task, 'refdir', os.path.join('tools', tool),
|
|
54
|
+
chip.set('tool', tool, 'task', task, 'refdir', os.path.join('tools', tool, 'scripts'),
|
|
55
55
|
step=step, index=index,
|
|
56
56
|
package='siliconcompiler', clobber=False)
|
|
57
57
|
chip.set('tool', tool, 'task', task, 'regex', 'warnings', "Warning:",
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# This file contains a set of procedures that are shared
|
|
2
|
+
# between syn_asic.tcl and syn_fpga.tcl
|
|
3
|
+
|
|
4
|
+
proc post_techmap { { opt_args "" } } {
|
|
5
|
+
# perform techmap in case previous techmaps introduced constructs
|
|
6
|
+
# that need techmapping
|
|
7
|
+
yosys techmap
|
|
8
|
+
# Quick optimization
|
|
9
|
+
yosys opt {*}$opt_args -purge
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
proc sc_map_memory { lib_file techmap_file do_rom } {
|
|
13
|
+
set design_mod 0
|
|
14
|
+
|
|
15
|
+
if { $lib_file != "" } {
|
|
16
|
+
yosys memory_libmap -lib $lib_file
|
|
17
|
+
set design_mod 1
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if { $do_rom } {
|
|
21
|
+
yosys memory_map -rom-only
|
|
22
|
+
set design_mod 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if { $techmap_file != "" } {
|
|
26
|
+
yosys techmap -map $techmap_file
|
|
27
|
+
set design_mod 1
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return $design_mod
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
proc sc_apply_params { } {
|
|
34
|
+
global sc_design
|
|
35
|
+
|
|
36
|
+
yosys chparam -list $sc_design
|
|
37
|
+
if { [sc_cfg_exists option param] } {
|
|
38
|
+
yosys echo off
|
|
39
|
+
set module_params [yosys tee -q -s result.string chparam -list $sc_design]
|
|
40
|
+
yosys echo on
|
|
41
|
+
|
|
42
|
+
dict for {key value} [sc_cfg_get option param] {
|
|
43
|
+
if { ![string is integer $value] } {
|
|
44
|
+
set value [concat \"$value\"]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if { [string first $key $module_params] != -1 } {
|
|
48
|
+
yosys chparam -set $key $value $sc_design
|
|
49
|
+
} else {
|
|
50
|
+
puts "Warning: $key is not a defined parameter in $sc_design"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
proc sc_get_scratchpad { name } {
|
|
57
|
+
yosys echo off
|
|
58
|
+
set value [yosys tee -q -s result.string scratchpad -get $name]
|
|
59
|
+
yosys echo on
|
|
60
|
+
|
|
61
|
+
return $value
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
proc sc_load_plugin { name } {
|
|
65
|
+
catch { yosys tee -q -s sc.load.test plugin -i $name }
|
|
66
|
+
set load_test [sc_get_scratchpad sc.load.test]
|
|
67
|
+
if { [string first "ERROR" $load_test] == -1 } {
|
|
68
|
+
return 1
|
|
69
|
+
}
|
|
70
|
+
return 0
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
proc sc_fpga_legalize_flops { feature_set } {
|
|
74
|
+
set legalize_flop_types []
|
|
75
|
+
|
|
76
|
+
if {
|
|
77
|
+
[lsearch -exact $feature_set enable] >= 0 &&
|
|
78
|
+
[lsearch -exact $feature_set async_set] >= 0 &&
|
|
79
|
+
[lsearch -exact $feature_set async_reset] >= 0
|
|
80
|
+
} {
|
|
81
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
82
|
+
lappend legalize_flop_types \$_DFF_PN?_
|
|
83
|
+
lappend legalize_flop_types \$_DFFE_PP_
|
|
84
|
+
lappend legalize_flop_types \$_DFFE_PN?P_
|
|
85
|
+
lappend legalize_flop_types \$_DFFSR_PNN_
|
|
86
|
+
lappend legalize_flop_types \$_DFFSRE_PNNP_
|
|
87
|
+
} elseif {
|
|
88
|
+
[lsearch -exact $feature_set enable] >= 0 &&
|
|
89
|
+
[lsearch -exact $feature_set async_set] >= 0
|
|
90
|
+
} {
|
|
91
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
92
|
+
lappend legalize_flop_types \$_DFF_PN1_
|
|
93
|
+
lappend legalize_flop_types \$_DFFE_PP_
|
|
94
|
+
lappend legalize_flop_types \$_DFFE_PN1P_
|
|
95
|
+
} elseif {
|
|
96
|
+
[lsearch -exact $feature_set enable] >= 0 &&
|
|
97
|
+
[lsearch -exact $feature_set async_reset] >= 0
|
|
98
|
+
} {
|
|
99
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
100
|
+
lappend legalize_flop_types \$_DFF_PN0_
|
|
101
|
+
lappend legalize_flop_types \$_DFFE_PP_
|
|
102
|
+
lappend legalize_flop_types \$_DFFE_PN0P_
|
|
103
|
+
} elseif { [lsearch -exact $feature_set enable] >= 0 } {
|
|
104
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
105
|
+
lappend legalize_flop_types \$_DFF_P??_
|
|
106
|
+
lappend legalize_flop_types \$_DFFE_PP_
|
|
107
|
+
lappend legalize_flop_types \$_DFFE_P??P_
|
|
108
|
+
} elseif {
|
|
109
|
+
[lsearch -exact $feature_set async_set] >= 0 &&
|
|
110
|
+
[lsearch -exact $feature_set async_reset] >= 0
|
|
111
|
+
} {
|
|
112
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
113
|
+
lappend legalize_flop_types \$_DFF_PN?_
|
|
114
|
+
lappend legalize_flop_types \$_DFFSR_PNN_
|
|
115
|
+
} elseif { [lsearch -exact $feature_set async_set] >= 0 } {
|
|
116
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
117
|
+
lappend legalize_flop_types \$_DFF_PN1_
|
|
118
|
+
} elseif { [lsearch -exact $feature_set async_reset] >= 0 } {
|
|
119
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
120
|
+
lappend legalize_flop_types \$_DFF_PN0_
|
|
121
|
+
} else {
|
|
122
|
+
# Choose to legalize to async resets even though they
|
|
123
|
+
# won't tech map. Goal is to get the user to fix
|
|
124
|
+
# their code and put in synchronous resets
|
|
125
|
+
lappend legalize_flop_types \$_DFF_P_
|
|
126
|
+
lappend legalize_flop_types \$_DFF_P??_
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
set legalize_list []
|
|
130
|
+
foreach flop_type $legalize_flop_types {
|
|
131
|
+
lappend legalize_list -cell $flop_type 01
|
|
132
|
+
}
|
|
133
|
+
yosys log "Legalize list: $legalize_list"
|
|
134
|
+
yosys dfflegalize {*}$legalize_list
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
proc sc_fpga_get_dsp_options { sc_syn_dsp_options } {
|
|
138
|
+
set option_text [list]
|
|
139
|
+
foreach dsp_option $sc_syn_dsp_options {
|
|
140
|
+
lappend option_text -D $dsp_option
|
|
141
|
+
}
|
|
142
|
+
return $option_text
|
|
143
|
+
}
|
|
@@ -507,6 +507,10 @@ yosys abc {*}$abc_args {*}$abc_dont_use
|
|
|
507
507
|
########################################################
|
|
508
508
|
|
|
509
509
|
yosys clean -purge
|
|
510
|
+
|
|
511
|
+
# Recheck hierarchy to remove all unused modules
|
|
512
|
+
yosys hierarchy -top $sc_design
|
|
513
|
+
|
|
510
514
|
yosys setundef -zero
|
|
511
515
|
|
|
512
516
|
yosys splitnets
|
|
@@ -57,9 +57,12 @@ if { [file exists $input_verilog] } {
|
|
|
57
57
|
yosys read_slang \
|
|
58
58
|
-D SYNTHESIS \
|
|
59
59
|
--keep-hierarchy \
|
|
60
|
+
--ignore-assertions \
|
|
61
|
+
--allow-use-before-declare \
|
|
60
62
|
--top $sc_design \
|
|
61
63
|
{*}$slang_params \
|
|
62
64
|
$input_verilog
|
|
65
|
+
yosys setattr -unset init
|
|
63
66
|
} else {
|
|
64
67
|
# Use -noblackbox to correctly interpret empty modules as empty,
|
|
65
68
|
# actual black boxes are read in later
|
|
@@ -74,81 +77,6 @@ if { [file exists $input_verilog] } {
|
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
|
|
77
|
-
####################
|
|
78
|
-
# Helper functions
|
|
79
|
-
####################
|
|
80
|
-
proc legalize_flops { feature_set } {
|
|
81
|
-
set legalize_flop_types []
|
|
82
|
-
|
|
83
|
-
if {
|
|
84
|
-
[lsearch -exact $feature_set enable] >= 0 &&
|
|
85
|
-
[lsearch -exact $feature_set async_set] >= 0 &&
|
|
86
|
-
[lsearch -exact $feature_set async_reset] >= 0
|
|
87
|
-
} {
|
|
88
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
89
|
-
lappend legalize_flop_types \$_DFF_PN?_
|
|
90
|
-
lappend legalize_flop_types \$_DFFE_PP_
|
|
91
|
-
lappend legalize_flop_types \$_DFFE_PN?P_
|
|
92
|
-
lappend legalize_flop_types \$_DFFSR_PNN_
|
|
93
|
-
lappend legalize_flop_types \$_DFFSRE_PNNP_
|
|
94
|
-
} elseif {
|
|
95
|
-
[lsearch -exact $feature_set enable] >= 0 &&
|
|
96
|
-
[lsearch -exact $feature_set async_set] >= 0
|
|
97
|
-
} {
|
|
98
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
99
|
-
lappend legalize_flop_types \$_DFF_PN1_
|
|
100
|
-
lappend legalize_flop_types \$_DFFE_PP_
|
|
101
|
-
lappend legalize_flop_types \$_DFFE_PN1P_
|
|
102
|
-
} elseif {
|
|
103
|
-
[lsearch -exact $feature_set enable] >= 0 &&
|
|
104
|
-
[lsearch -exact $feature_set async_reset] >= 0
|
|
105
|
-
} {
|
|
106
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
107
|
-
lappend legalize_flop_types \$_DFF_PN0_
|
|
108
|
-
lappend legalize_flop_types \$_DFFE_PP_
|
|
109
|
-
lappend legalize_flop_types \$_DFFE_PN0P_
|
|
110
|
-
} elseif { [lsearch -exact $feature_set enable] >= 0 } {
|
|
111
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
112
|
-
lappend legalize_flop_types \$_DFF_P??_
|
|
113
|
-
lappend legalize_flop_types \$_DFFE_PP_
|
|
114
|
-
lappend legalize_flop_types \$_DFFE_P??P_
|
|
115
|
-
} elseif {
|
|
116
|
-
[lsearch -exact $feature_set async_set] >= 0 &&
|
|
117
|
-
[lsearch -exact $feature_set async_reset] >= 0
|
|
118
|
-
} {
|
|
119
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
120
|
-
lappend legalize_flop_types \$_DFF_PN?_
|
|
121
|
-
lappend legalize_flop_types \$_DFFSR_PNN_
|
|
122
|
-
} elseif { [lsearch -exact $feature_set async_set] >= 0 } {
|
|
123
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
124
|
-
lappend legalize_flop_types \$_DFF_PN1_
|
|
125
|
-
} elseif { [lsearch -exact $feature_set async_reset] >= 0 } {
|
|
126
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
127
|
-
lappend legalize_flop_types \$_DFF_PN0_
|
|
128
|
-
} else {
|
|
129
|
-
# Choose to legalize to async resets even though they
|
|
130
|
-
# won't tech map. Goal is to get the user to fix
|
|
131
|
-
# their code and put in synchronous resets
|
|
132
|
-
lappend legalize_flop_types \$_DFF_P_
|
|
133
|
-
lappend legalize_flop_types \$_DFF_P??_
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
set legalize_list []
|
|
137
|
-
foreach flop_type $legalize_flop_types {
|
|
138
|
-
lappend legalize_list -cell $flop_type 01
|
|
139
|
-
}
|
|
140
|
-
yosys log "Legalize list: $legalize_list"
|
|
141
|
-
yosys dfflegalize {*}$legalize_list
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
proc get_dsp_options { sc_syn_dsp_options } {
|
|
145
|
-
set option_text [list]
|
|
146
|
-
foreach dsp_option $sc_syn_dsp_options {
|
|
147
|
-
lappend option_text -D $dsp_option
|
|
148
|
-
}
|
|
149
|
-
return $option_text
|
|
150
|
-
}
|
|
151
|
-
|
|
152
80
|
set sc_partname [sc_cfg_get fpga partname]
|
|
153
81
|
set build_dir [sc_cfg_get option builddir]
|
|
154
82
|
set job_name [sc_cfg_get option jobname]
|
|
@@ -182,6 +110,25 @@ yosys hierarchy -top $sc_design
|
|
|
182
110
|
|
|
183
111
|
if { [string match {ice*} $sc_partname] } {
|
|
184
112
|
yosys synth_ice40 -top $sc_design -json "${sc_design}.netlist.json"
|
|
113
|
+
} elseif {
|
|
114
|
+
[sc_cfg_exists fpga $sc_partname file yosys_fpga_config] &&
|
|
115
|
+
[llength [sc_cfg_get fpga $sc_partname file yosys_fpga_config]] != 0 &&
|
|
116
|
+
[sc_load_plugin yosys-syn]
|
|
117
|
+
} {
|
|
118
|
+
set synth_fpga_args []
|
|
119
|
+
if { [lindex [sc_cfg_tool_task_get var synth_fpga_opt_mode] 0] != "none" } {
|
|
120
|
+
lappend synth_fpga_args \
|
|
121
|
+
-opt [lindex [sc_cfg_tool_task_get var synth_fpga_opt_mode] 0]
|
|
122
|
+
}
|
|
123
|
+
if { [lindex [sc_cfg_tool_task_get var synth_fpga_insert_buffers] 0] == "true" } {
|
|
124
|
+
lappend synth_fpga_args -insbuf
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
yosys synth_fpga \
|
|
128
|
+
-config [lindex [sc_cfg_get fpga $sc_partname file yosys_fpga_config] 0] \
|
|
129
|
+
-show_config \
|
|
130
|
+
-top $sc_design \
|
|
131
|
+
{*}$synth_fpga_args
|
|
185
132
|
} else {
|
|
186
133
|
# Pre-processing step: if DSPs instance are hard-coded into
|
|
187
134
|
# the user's design, we can use a blackbox flow for DSP mapping
|
|
@@ -252,7 +199,7 @@ if { [string match {ice*} $sc_partname] } {
|
|
|
252
199
|
[sc_cfg_get fpga $sc_partname file yosys_dsp_techmap]
|
|
253
200
|
|
|
254
201
|
yosys log "Run techmap flow for DSP Blocks"
|
|
255
|
-
set formatted_dsp_options [
|
|
202
|
+
set formatted_dsp_options [sc_fpga_get_dsp_options $sc_syn_dsp_options]
|
|
256
203
|
yosys techmap -map +/mul2dsp.v -map $sc_syn_dsp_library \
|
|
257
204
|
{*}$formatted_dsp_options
|
|
258
205
|
|
|
@@ -290,7 +237,7 @@ if { [string match {ice*} $sc_partname] } {
|
|
|
290
237
|
yosys demuxmap
|
|
291
238
|
yosys simplemap
|
|
292
239
|
|
|
293
|
-
|
|
240
|
+
sc_fpga_legalize_flops $sc_syn_feature_set
|
|
294
241
|
|
|
295
242
|
if { [sc_cfg_exists fpga $sc_partname file yosys_flop_techmap] } {
|
|
296
243
|
set sc_syn_flop_library \
|
|
@@ -43,6 +43,20 @@ def setup(chip):
|
|
|
43
43
|
'true/false, if true will attempt to use the slang frontend',
|
|
44
44
|
field='help')
|
|
45
45
|
|
|
46
|
+
chip.set('tool', tool, 'task', task, 'var', 'synth_fpga_opt_mode', 'none',
|
|
47
|
+
step=step, index=index,
|
|
48
|
+
clobber=False)
|
|
49
|
+
chip.set('tool', tool, 'task', task, 'var', 'synth_fpga_opt_mode',
|
|
50
|
+
'optimization mode for the synth_fpga command',
|
|
51
|
+
field='help')
|
|
52
|
+
|
|
53
|
+
chip.set('tool', tool, 'task', task, 'var', 'synth_fpga_insert_buffers', True,
|
|
54
|
+
step=step, index=index,
|
|
55
|
+
clobber=False)
|
|
56
|
+
chip.set('tool', tool, 'task', task, 'var', 'synth_fpga_insert_buffers',
|
|
57
|
+
'insert buffers as part of the synth_fpga command',
|
|
58
|
+
field='help')
|
|
59
|
+
|
|
46
60
|
# Setup FPGA params
|
|
47
61
|
part_name = chip.get('fpga', 'partname')
|
|
48
62
|
|
|
@@ -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": "cef8746bc887f3da67bd964ad9061ca7a8b8903a",
|
|
5
5
|
"docker-cmds": [
|
|
6
6
|
"# Remove OR-Tools files",
|
|
7
7
|
"RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"opensta": {
|
|
19
19
|
"git-url": "https://github.com/parallaxsw/OpenSTA.git",
|
|
20
|
-
"git-commit": "
|
|
20
|
+
"git-commit": "cda30445d652c6d41f68732675ddbf28b5efeeab",
|
|
21
21
|
"auto-update": true
|
|
22
22
|
},
|
|
23
23
|
"netgen": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"sv2v": {
|
|
57
57
|
"git-url": "https://github.com/zachjs/sv2v.git",
|
|
58
|
-
"git-commit": "
|
|
58
|
+
"git-commit": "80a2f0cf685f6d873b4ee37b76e6c18dc60e2555",
|
|
59
59
|
"auto-update": true
|
|
60
60
|
},
|
|
61
61
|
"verilator": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"vpr": {
|
|
78
78
|
"git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
|
|
79
|
-
"git-commit": "
|
|
79
|
+
"git-commit": "4bb340af8243b95efdea493d4cb58aed1099151f",
|
|
80
80
|
"auto-update": false
|
|
81
81
|
},
|
|
82
82
|
"icepack": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"yosys": {
|
|
103
103
|
"git-url": "https://github.com/YosysHQ/yosys.git",
|
|
104
|
-
"git-commit": "v0.
|
|
104
|
+
"git-commit": "v0.54",
|
|
105
105
|
"version-prefix": "",
|
|
106
106
|
"auto-update": true
|
|
107
107
|
},
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"yosys-slang": {
|
|
153
153
|
"git-url": "https://github.com/povik/yosys-slang.git",
|
|
154
|
-
"git-commit": "
|
|
154
|
+
"git-commit": "9d9ce7b767d2ea776e2dee0ef636a84512e6b229",
|
|
155
155
|
"docker-depends": "yosys",
|
|
156
156
|
"auto-update": true
|
|
157
157
|
},
|
|
@@ -161,13 +161,9 @@
|
|
|
161
161
|
"docker-depends": "yosys",
|
|
162
162
|
"auto-update": true
|
|
163
163
|
},
|
|
164
|
-
"
|
|
165
|
-
"git-url": "https://
|
|
166
|
-
"git-commit": "
|
|
167
|
-
"docker-depends": [
|
|
168
|
-
"yosys",
|
|
169
|
-
"vpr"
|
|
170
|
-
],
|
|
164
|
+
"surfer": {
|
|
165
|
+
"git-url": "https://gitlab.com/surfer-project/surfer.git",
|
|
166
|
+
"git-commit": "v0.3.0",
|
|
171
167
|
"auto-update": false
|
|
172
168
|
}
|
|
173
169
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -ex
|
|
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
|
+
sudo apt-get install -y build-essential curl git libssl-dev openssl pkg-config
|
|
12
|
+
|
|
13
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
14
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
15
|
+
SUDO_INSTALL=sudo
|
|
16
|
+
else
|
|
17
|
+
SUDO_INSTALL=""
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s - -y
|
|
21
|
+
export PATH="$HOME/.cargo/bin:$PATH"
|
|
22
|
+
|
|
23
|
+
git clone $(python3 ${src_path}/_tools.py --tool surfer --field git-url) surfer
|
|
24
|
+
cd surfer
|
|
25
|
+
git checkout $(python3 ${src_path}/_tools.py --tool surfer --field git-commit)
|
|
26
|
+
git submodule update --init
|
|
27
|
+
|
|
28
|
+
cargo fetch --locked
|
|
29
|
+
cargo build -j $(nproc) --frozen --release
|
|
30
|
+
|
|
31
|
+
if [ ! -z ${PREFIX} ]; then
|
|
32
|
+
$SUDO_INSTALL install -Dm00755 target/release/surfer -t ${PREFIX}/bin
|
|
33
|
+
fi
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -ex
|
|
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
|
+
sudo apt-get install -y build-essential curl git libssl-dev openssl pkg-config
|
|
12
|
+
|
|
13
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
14
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
15
|
+
SUDO_INSTALL=sudo
|
|
16
|
+
else
|
|
17
|
+
SUDO_INSTALL=""
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s - -y
|
|
21
|
+
export PATH="$HOME/.cargo/bin:$PATH"
|
|
22
|
+
|
|
23
|
+
git clone $(python3 ${src_path}/_tools.py --tool surfer --field git-url) surfer
|
|
24
|
+
cd surfer
|
|
25
|
+
git checkout $(python3 ${src_path}/_tools.py --tool surfer --field git-commit)
|
|
26
|
+
git submodule update --init
|
|
27
|
+
|
|
28
|
+
cargo fetch --locked
|
|
29
|
+
cargo build -j $(nproc) --frozen --release
|
|
30
|
+
|
|
31
|
+
if [ ! -z ${PREFIX} ]; then
|
|
32
|
+
$SUDO_INSTALL install -Dm00755 target/release/surfer -t ${PREFIX}/bin
|
|
33
|
+
fi
|
|
@@ -221,7 +221,8 @@ def default_email_credentials_file():
|
|
|
221
221
|
|
|
222
222
|
@contextlib.contextmanager
|
|
223
223
|
def sc_open(path, *args, **kwargs):
|
|
224
|
-
|
|
224
|
+
if 'errors' not in kwargs:
|
|
225
|
+
kwargs['errors'] = 'ignore'
|
|
225
226
|
fobj = open(path, *args, **kwargs)
|
|
226
227
|
try:
|
|
227
228
|
with contextlib.closing(fobj):
|
|
@@ -329,29 +330,6 @@ def grep(chip, args, line):
|
|
|
329
330
|
return line
|
|
330
331
|
|
|
331
332
|
|
|
332
|
-
#######################################
|
|
333
|
-
def get_env_vars(chip, step, index):
|
|
334
|
-
'''
|
|
335
|
-
Returns a dictionary of environmental variables from the manifest
|
|
336
|
-
'''
|
|
337
|
-
|
|
338
|
-
schema_env = {}
|
|
339
|
-
for env in chip.getkeys('option', 'env'):
|
|
340
|
-
schema_env[env] = chip.get('option', 'env', env)
|
|
341
|
-
|
|
342
|
-
flow = chip.get('option', 'flow')
|
|
343
|
-
if step is not None and index is not None and flow:
|
|
344
|
-
tool = chip.get('flowgraph', flow, step, str(index), 'tool')
|
|
345
|
-
task = chip.get('flowgraph', flow, step, str(index), 'task')
|
|
346
|
-
|
|
347
|
-
if chip.valid('tool', tool, 'task', task, 'env'):
|
|
348
|
-
for env in chip.getkeys('tool', tool, 'task', task, 'env'):
|
|
349
|
-
schema_env[env] = chip.get('tool', tool, 'task', task, 'env', env,
|
|
350
|
-
step=step, index=index)
|
|
351
|
-
|
|
352
|
-
return schema_env
|
|
353
|
-
|
|
354
|
-
|
|
355
333
|
def get_plugins(system, name=None):
|
|
356
334
|
'''
|
|
357
335
|
Search for python modules with a specific function
|
|
@@ -370,6 +348,8 @@ def get_plugins(system, name=None):
|
|
|
370
348
|
|
|
371
349
|
|
|
372
350
|
def truncate_text(text, width):
|
|
351
|
+
width = max(width, 5)
|
|
352
|
+
|
|
373
353
|
if len(text) <= width:
|
|
374
354
|
return text
|
|
375
355
|
|