siliconcompiler 0.27.1__py3-none-any.whl → 0.28.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/_metadata.py +1 -1
- siliconcompiler/core.py +4 -1
- siliconcompiler/data/RobotoMono/__init__.py +0 -0
- siliconcompiler/data/__init__.py +0 -0
- siliconcompiler/flows/dvflow.py +51 -14
- siliconcompiler/flows/generate_openroad_rcx.py +1 -1
- siliconcompiler/libs/sg13g2_stdcell.py +8 -0
- siliconcompiler/pdks/ihp130.py +8 -0
- siliconcompiler/remote/server_schema/__init__.py +0 -0
- siliconcompiler/remote/server_schema/requests/__init__.py +0 -0
- siliconcompiler/remote/server_schema/responses/__init__.py +0 -0
- siliconcompiler/scheduler/__init__.py +6 -4
- siliconcompiler/scheduler/validation/__init__.py +0 -0
- siliconcompiler/schema/schema_cfg.py +351 -281
- siliconcompiler/schema/schema_obj.py +5 -3
- siliconcompiler/sphinx_ext/dynamicgen.py +35 -15
- siliconcompiler/sphinx_ext/schemagen.py +4 -1
- siliconcompiler/targets/ihp130_demo.py +68 -0
- siliconcompiler/templates/__init__.py +0 -0
- siliconcompiler/templates/email/__init__.py +0 -0
- siliconcompiler/templates/issue/__init__.py +0 -0
- siliconcompiler/templates/report/__init__.py +0 -0
- siliconcompiler/templates/slurm/__init__.py +0 -0
- siliconcompiler/templates/tcl/__init__.py +0 -0
- siliconcompiler/tools/_common/sdc/__init__.py +0 -0
- siliconcompiler/tools/_common/tcl/__init__.py +0 -0
- siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +1 -2
- siliconcompiler/tools/bambu/__init__.py +0 -0
- siliconcompiler/tools/bluespec/__init__.py +0 -0
- siliconcompiler/tools/builtin/__init__.py +0 -0
- siliconcompiler/tools/builtin/concatenate.py +16 -0
- siliconcompiler/tools/chisel/__init__.py +0 -0
- siliconcompiler/tools/execute/__init__.py +0 -0
- siliconcompiler/tools/genfasm/__init__.py +0 -0
- siliconcompiler/tools/ghdl/__init__.py +0 -0
- siliconcompiler/tools/icarus/__init__.py +0 -0
- siliconcompiler/tools/icepack/__init__.py +0 -0
- siliconcompiler/tools/klayout/__init__.py +0 -0
- siliconcompiler/tools/klayout/klayout.py +1 -0
- siliconcompiler/tools/magic/__init__.py +0 -0
- siliconcompiler/tools/magic/sc_drc.tcl +5 -5
- siliconcompiler/tools/magic/sc_extspice.tcl +3 -3
- siliconcompiler/tools/magic/sc_magic.tcl +2 -2
- siliconcompiler/tools/montage/__init__.py +0 -0
- siliconcompiler/tools/netgen/__init__.py +0 -0
- siliconcompiler/tools/netgen/sc_lvs.tcl +3 -3
- siliconcompiler/tools/nextpnr/__init__.py +0 -0
- siliconcompiler/tools/openroad/scripts/__init__.py +0 -0
- siliconcompiler/tools/openroad/scripts/sc_apr.tcl +36 -34
- siliconcompiler/tools/openroad/scripts/sc_cts.tcl +0 -1
- siliconcompiler/tools/openroad/scripts/sc_dfm.tcl +4 -2
- siliconcompiler/tools/openroad/scripts/sc_export.tcl +4 -2
- siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +27 -35
- siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +4 -2
- siliconcompiler/tools/openroad/scripts/sc_physyn.tcl +0 -1
- siliconcompiler/tools/openroad/scripts/sc_procs.tcl +38 -6
- siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +9 -9
- siliconcompiler/tools/openroad/scripts/sc_route.tcl +8 -4
- siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +5 -3
- siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +27 -25
- siliconcompiler/tools/openroad/templates/__init__.py +0 -0
- siliconcompiler/tools/opensta/scripts/__init__.py +0 -0
- siliconcompiler/tools/opensta/scripts/sc_procs.tcl +0 -1
- siliconcompiler/tools/surelog/templates/__init__.py +0 -0
- siliconcompiler/tools/sv2v/__init__.py +0 -0
- siliconcompiler/tools/template/__init__.py +0 -0
- siliconcompiler/tools/verilator/__init__.py +0 -0
- siliconcompiler/tools/verilator/compile.py +1 -4
- siliconcompiler/tools/verilator/verilator.py +1 -2
- siliconcompiler/tools/vivado/scripts/__init__.py +0 -0
- siliconcompiler/tools/vivado/scripts/sc_run.tcl +7 -8
- siliconcompiler/tools/vivado/vivado.py +1 -1
- siliconcompiler/tools/vpr/__init__.py +0 -0
- siliconcompiler/tools/vpr/place.py +20 -6
- siliconcompiler/tools/vpr/vpr.py +1 -1
- siliconcompiler/tools/xdm/__init__.py +28 -0
- siliconcompiler/tools/xdm/convert.py +71 -0
- siliconcompiler/tools/xyce/{xyce.py → __init__.py} +13 -9
- siliconcompiler/tools/xyce/simulate.py +70 -0
- siliconcompiler/tools/yosys/__init__.py +0 -0
- siliconcompiler/tools/yosys/sc_lec.tcl +7 -7
- siliconcompiler/tools/yosys/sc_syn.tcl +9 -9
- siliconcompiler/tools/yosys/syn_asic.tcl +21 -13
- siliconcompiler/tools/yosys/syn_fpga.tcl +20 -17
- siliconcompiler/tools/yosys/techmaps/__init__.py +0 -0
- siliconcompiler/tools/yosys/templates/__init__.py +0 -0
- siliconcompiler/use.py +2 -1
- {siliconcompiler-0.27.1.dist-info → siliconcompiler-0.28.1.dist-info}/METADATA +9 -8
- {siliconcompiler-0.27.1.dist-info → siliconcompiler-0.28.1.dist-info}/RECORD +93 -48
- {siliconcompiler-0.27.1.dist-info → siliconcompiler-0.28.1.dist-info}/WHEEL +1 -1
- siliconcompiler/tools/openfpgaloader/openfpgaloader.py +0 -39
- {siliconcompiler-0.27.1.dist-info → siliconcompiler-0.28.1.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.27.1.dist-info → siliconcompiler-0.28.1.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.27.1.dist-info → siliconcompiler-0.28.1.dist-info}/top_level.txt +0 -0
|
@@ -23,12 +23,14 @@ if { [sc_cfg_exists input asic floorplan] } {
|
|
|
23
23
|
read_def -floorplan_initialize $def
|
|
24
24
|
} else {
|
|
25
25
|
#NOTE: assuming a two tuple value as lower left, upper right
|
|
26
|
-
set sc_diearea
|
|
27
|
-
set sc_corearea
|
|
28
|
-
if {
|
|
29
|
-
|
|
26
|
+
set sc_diearea [sc_cfg_get constraint outline]
|
|
27
|
+
set sc_corearea [sc_cfg_get constraint corearea]
|
|
28
|
+
if {
|
|
29
|
+
$sc_diearea != "" &&
|
|
30
|
+
$sc_corearea != ""
|
|
31
|
+
} {
|
|
30
32
|
# Use die and core sizes
|
|
31
|
-
set sc_diesize
|
|
33
|
+
set sc_diesize "[lindex $sc_diearea 0] [lindex $sc_diearea 1]"
|
|
32
34
|
set sc_coresize "[lindex $sc_corearea 0] [lindex $sc_corearea 1]"
|
|
33
35
|
|
|
34
36
|
initialize_floorplan -die_area $sc_diesize \
|
|
@@ -61,8 +63,10 @@ if { [sc_cfg_exists library $sc_mainlib option file openroad_tracks] } {
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
set do_automatic_pins 1
|
|
64
|
-
if {
|
|
65
|
-
|
|
66
|
+
if {
|
|
67
|
+
[sc_cfg_tool_task_exists file padring] &&
|
|
68
|
+
[llength [sc_cfg_tool_task_get file padring]] > 0
|
|
69
|
+
} {
|
|
66
70
|
set do_automatic_pins 0
|
|
67
71
|
|
|
68
72
|
###########################
|
|
@@ -208,7 +212,7 @@ if { [sc_cfg_exists constraint component] } {
|
|
|
208
212
|
}
|
|
209
213
|
|
|
210
214
|
set site_height [$site getHeight]
|
|
211
|
-
set site_width
|
|
215
|
+
set site_width [$site getWidth]
|
|
212
216
|
if { $y_grid == 0 } {
|
|
213
217
|
set y_grid $site_height
|
|
214
218
|
} elseif { $y_grid > $site_height } {
|
|
@@ -236,12 +240,8 @@ if { [sc_cfg_exists constraint component] } {
|
|
|
236
240
|
|
|
237
241
|
dict for {name params} [sc_cfg_get constraint component] {
|
|
238
242
|
set location [dict get $params placement]
|
|
239
|
-
set rotation [dict get $params rotation]
|
|
240
|
-
|
|
241
|
-
set rotation 0
|
|
242
|
-
}
|
|
243
|
-
set rotation [expr { int($rotation) }]
|
|
244
|
-
set flip [dict get $params flip]
|
|
243
|
+
set rotation [sc_convert_rotation [dict get $params rotation]]
|
|
244
|
+
|
|
245
245
|
if { [dict exists $params partname] } {
|
|
246
246
|
set cell [dict get $params partname]
|
|
247
247
|
} else {
|
|
@@ -251,14 +251,7 @@ if { [sc_cfg_exists constraint component] } {
|
|
|
251
251
|
utl::warn FLW 1 "Halo is not supported in OpenROAD"
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
set
|
|
255
|
-
$transform_r setOrient "R${rotation}"
|
|
256
|
-
set transform_f [odb::dbTransform]
|
|
257
|
-
if { $flip == "true" } {
|
|
258
|
-
$transform_f setOrient [odb::dbTransform "MY"]
|
|
259
|
-
}
|
|
260
|
-
set transform_final [odb::dbTransform]
|
|
261
|
-
odb::dbTransform_concat $transform_r $transform_f $transform_final
|
|
254
|
+
set transform [odb::dbTransform $rotation]
|
|
262
255
|
|
|
263
256
|
set inst [[ord::get_db_block] findInst $name]
|
|
264
257
|
if { $inst == "NULL" } {
|
|
@@ -275,16 +268,11 @@ if { [sc_cfg_exists constraint component] } {
|
|
|
275
268
|
}
|
|
276
269
|
}
|
|
277
270
|
set master [$inst getMaster]
|
|
278
|
-
set height [ord::dbu_to_microns [$master getHeight]]
|
|
279
|
-
set width [ord::dbu_to_microns [$master getWidth]]
|
|
280
|
-
|
|
281
|
-
set x_loc [expr { [lindex $location 0] - $width / 2 }]
|
|
282
|
-
set y_loc [expr { [lindex $location 1] - $height / 2 }]
|
|
283
271
|
|
|
284
|
-
set x_loc [expr { round($
|
|
285
|
-
set y_loc [expr { round($
|
|
272
|
+
set x_loc [expr { round([lindex $location 0] / $x_grid) * $x_grid }]
|
|
273
|
+
set y_loc [expr { round([lindex $location 1] / $y_grid) * $y_grid }]
|
|
286
274
|
|
|
287
|
-
$inst setOrient [$
|
|
275
|
+
$inst setOrient [$rotation getOrient]
|
|
288
276
|
$inst setLocation [ord::microns_to_dbu $x_loc] [ord::microns_to_dbu $y_loc]
|
|
289
277
|
$inst setPlacementStatus FIRM
|
|
290
278
|
}
|
|
@@ -302,8 +290,10 @@ if { $do_automatic_pins } {
|
|
|
302
290
|
# since we get an error otherwise.
|
|
303
291
|
if { [sc_design_has_unplaced_macros] } {
|
|
304
292
|
if { $openroad_rtlmp_enable == "true" } {
|
|
305
|
-
set halo_max [expr {
|
|
306
|
-
|
|
293
|
+
set halo_max [expr {
|
|
294
|
+
max([lindex $openroad_mpl_macro_place_halo 0],
|
|
295
|
+
[lindex $openroad_mpl_macro_place_halo 1])
|
|
296
|
+
}]
|
|
307
297
|
|
|
308
298
|
set rtlmp_args []
|
|
309
299
|
if { $openroad_rtlmp_min_instances != "" } {
|
|
@@ -370,9 +360,11 @@ if { [sc_cfg_tool_task_exists {file} ifp_tapcell] } {
|
|
|
370
360
|
# Power Network
|
|
371
361
|
###########################
|
|
372
362
|
|
|
373
|
-
if {
|
|
374
|
-
|
|
375
|
-
|
|
363
|
+
if {
|
|
364
|
+
$openroad_pdn_enable == "true" &&
|
|
365
|
+
[sc_cfg_tool_task_exists {file} pdn_config] &&
|
|
366
|
+
[llength [sc_cfg_tool_task_get {file} pdn_config]] > 0
|
|
367
|
+
} {
|
|
376
368
|
set pdn_files []
|
|
377
369
|
foreach pdnconfig [sc_cfg_tool_task_get {file} pdn_config] {
|
|
378
370
|
if { [lsearch -exact $pdn_files $pdnconfig] != -1 } {
|
|
@@ -59,8 +59,10 @@ if { [sc_cfg_tool_task_check_in_list unconstrained var reports] } {
|
|
|
59
59
|
> reports/timing/unconstrained.topN.rpt
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
if {
|
|
63
|
-
|
|
62
|
+
if {
|
|
63
|
+
[sc_cfg_tool_task_check_in_list clock_skew var reports] &&
|
|
64
|
+
[llength [all_clocks]] > 0
|
|
65
|
+
} {
|
|
64
66
|
puts "$PREFIX clock_skew"
|
|
65
67
|
report_clock_skew -setup -digits 4 > reports/timing/skew.setup.rpt
|
|
66
68
|
sc_display_report reports/timing/skew.setup.rpt
|
|
@@ -19,8 +19,10 @@ proc sc_global_placement_density {} {
|
|
|
19
19
|
# User specified adjustment
|
|
20
20
|
if { $openroad_gpl_uniform_placement_adjustment > 0.0 } {
|
|
21
21
|
set or_uniform_adjusted_density \
|
|
22
|
-
[expr {
|
|
23
|
-
|
|
22
|
+
[expr {
|
|
23
|
+
$or_uniform_density + ((1.0 - $or_uniform_density) *
|
|
24
|
+
$openroad_gpl_uniform_placement_adjustment) + $or_adjust_density_adder
|
|
25
|
+
}]
|
|
24
26
|
if { $or_uniform_adjusted_density > 1.00 } {
|
|
25
27
|
utl::warn FLW 1 "Adjusted density exceeds 1.00 ([format %0.3f $or_uniform_adjusted_density]),\
|
|
26
28
|
reverting to use ($openroad_gpl_place_density) for global placement"
|
|
@@ -56,8 +58,10 @@ proc sc_global_placement { args } {
|
|
|
56
58
|
global openroad_gpl_padding
|
|
57
59
|
|
|
58
60
|
set openroad_gpl_args []
|
|
59
|
-
if {
|
|
60
|
-
|
|
61
|
+
if {
|
|
62
|
+
$openroad_gpl_routability_driven == "true" &&
|
|
63
|
+
![info exists flags(-disable_routability_driven)]
|
|
64
|
+
} {
|
|
61
65
|
lappend openroad_gpl_args "-routability_driven"
|
|
62
66
|
}
|
|
63
67
|
if { $openroad_gpl_timing_driven == "true" } {
|
|
@@ -235,8 +239,10 @@ proc sc_design_has_unplaced_pads {} {
|
|
|
235
239
|
|
|
236
240
|
proc sc_design_has_placeable_ios {} {
|
|
237
241
|
foreach bterm [[ord::get_db_block] getBTerms] {
|
|
238
|
-
if {
|
|
239
|
-
|
|
242
|
+
if {
|
|
243
|
+
[$bterm getFirstPinPlacementStatus] != "FIXED" &&
|
|
244
|
+
[$bterm getFirstPinPlacementStatus] != "LOCKED"
|
|
245
|
+
} {
|
|
240
246
|
return true
|
|
241
247
|
}
|
|
242
248
|
}
|
|
@@ -421,3 +427,29 @@ proc count_logic_depth {} {
|
|
|
421
427
|
# Subtract 1 to account for initial launch
|
|
422
428
|
return [expr { $count - 1 }]
|
|
423
429
|
}
|
|
430
|
+
|
|
431
|
+
###########################
|
|
432
|
+
# Translate schema rotation
|
|
433
|
+
###########################
|
|
434
|
+
|
|
435
|
+
proc sc_convert_rotation { rot } {
|
|
436
|
+
if { [string match "MZ*" $rot] } {
|
|
437
|
+
utl::error FLW 1 "Z mirroring is not supported in OpenROAD"
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
switch $rot {
|
|
441
|
+
"R0" { return "R0" }
|
|
442
|
+
"R90" { return "R90" }
|
|
443
|
+
"R180" { return "R180" }
|
|
444
|
+
"R270" { return "R270" }
|
|
445
|
+
"MX" { return "MX" }
|
|
446
|
+
"MX_R90" { return "MXR90" }
|
|
447
|
+
"MX_R180" { return "MY" }
|
|
448
|
+
"MX_R270" { return "MYR90" }
|
|
449
|
+
"MY" { return "MY" }
|
|
450
|
+
"MY_R90" { return "MYR90" }
|
|
451
|
+
"MY_R180" { return "MX" }
|
|
452
|
+
"MY_R270" { return "MXR90" }
|
|
453
|
+
default { utl::error FLW 1 "$rot not recognized" }
|
|
454
|
+
}
|
|
455
|
+
}
|
|
@@ -9,7 +9,7 @@ source ./sc_manifest.tcl > /dev/null
|
|
|
9
9
|
###############################
|
|
10
10
|
|
|
11
11
|
proc sc_get_layer_name { name } {
|
|
12
|
-
if { [
|
|
12
|
+
if { [string is integer $name] } {
|
|
13
13
|
set layer [[ord::get_db_tech] findRoutingLayer $name]
|
|
14
14
|
if { $layer == "NULL" } {
|
|
15
15
|
utl::error FLW 1 "$name is not a valid routing layer."
|
|
@@ -23,18 +23,18 @@ proc sc_get_layer_name { name } {
|
|
|
23
23
|
# Schema Adapter
|
|
24
24
|
###############################
|
|
25
25
|
|
|
26
|
-
set sc_tool
|
|
27
|
-
set sc_step
|
|
28
|
-
set sc_index
|
|
29
|
-
set sc_flow
|
|
30
|
-
set sc_task
|
|
26
|
+
set sc_tool openroad
|
|
27
|
+
set sc_step [sc_cfg_get arg step]
|
|
28
|
+
set sc_index [sc_cfg_get arg index]
|
|
29
|
+
set sc_flow [sc_cfg_get option flow]
|
|
30
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
31
31
|
|
|
32
32
|
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
33
33
|
|
|
34
34
|
# Design
|
|
35
|
-
set sc_design
|
|
36
|
-
set sc_pdk
|
|
37
|
-
set sc_stackup
|
|
35
|
+
set sc_design [sc_top]
|
|
36
|
+
set sc_pdk [sc_cfg_get option pdk]
|
|
37
|
+
set sc_stackup [sc_cfg_get option stackup]
|
|
38
38
|
|
|
39
39
|
# Library
|
|
40
40
|
set sc_libtype [lindex [sc_cfg_tool_task_get {var} libtype] 0]
|
|
@@ -71,10 +71,14 @@ global_route -guide_file "./route.guide" \
|
|
|
71
71
|
######################
|
|
72
72
|
|
|
73
73
|
estimate_parasitics -global_routing
|
|
74
|
-
if {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
if {
|
|
75
|
+
$openroad_ant_check == "true" &&
|
|
76
|
+
[check_antennas -report_file "reports/${sc_design}_antenna.rpt"] != 0
|
|
77
|
+
} {
|
|
78
|
+
if {
|
|
79
|
+
$openroad_ant_repair == "true" &&
|
|
80
|
+
[llength [sc_cfg_get library $sc_mainlib asic cells antenna]] != 0
|
|
81
|
+
} {
|
|
78
82
|
set sc_antenna [lindex [sc_cfg_get library $sc_mainlib asic cells antenna] 0]
|
|
79
83
|
|
|
80
84
|
# Remove filler cells before attempting to repair antennas
|
|
@@ -14,8 +14,10 @@ sc_save_image "screenshot" "outputs/${sc_design}.png" $sc_resolution
|
|
|
14
14
|
|
|
15
15
|
gui::restore_display_controls
|
|
16
16
|
|
|
17
|
-
if {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if {
|
|
18
|
+
[sc_cfg_tool_task_exists {var} include_report_images] &&
|
|
19
|
+
[lindex [sc_cfg_tool_task_get {var} include_report_images] 0]
|
|
20
|
+
== "true"
|
|
21
|
+
} {
|
|
20
22
|
source -echo "${sc_refdir}/sc_write_images.tcl"
|
|
21
23
|
}
|
|
@@ -156,12 +156,13 @@ proc sc_image_estimated_routing_congestion {} {
|
|
|
156
156
|
sc_image_setup_default
|
|
157
157
|
|
|
158
158
|
suppress_message GRT 10
|
|
159
|
-
catch {
|
|
159
|
+
catch {
|
|
160
160
|
sc_image_heatmap "Estimated Congestion (RUDY)" \
|
|
161
161
|
"RUDY" \
|
|
162
162
|
"estimated_routing_congestion.png" \
|
|
163
163
|
"estimated routing congestion" \
|
|
164
|
-
0
|
|
164
|
+
0
|
|
165
|
+
} err
|
|
165
166
|
unsuppress_message GRT 10
|
|
166
167
|
}
|
|
167
168
|
|
|
@@ -271,30 +272,31 @@ proc sc_image_optimizer {} {
|
|
|
271
272
|
gui::set_display_controls "Instances/*" visible true
|
|
272
273
|
gui::set_display_controls "Instances/Physical/*" visible false
|
|
273
274
|
|
|
274
|
-
set hold_count
|
|
275
|
-
set input_count
|
|
276
|
-
set output_count
|
|
277
|
-
set repeater_count
|
|
278
|
-
set fanout_count
|
|
279
|
-
set load_slew_count
|
|
280
|
-
set max_cap_count
|
|
275
|
+
set hold_count [select -name "hold*" -type Inst -highlight 0] ;# green
|
|
276
|
+
set input_count [select -name "input*" -type Inst -highlight 1] ;# yellow
|
|
277
|
+
set output_count [select -name "output*" -type Inst -highlight 1]
|
|
278
|
+
set repeater_count [select -name "repeater*" -type Inst -highlight 3] ;# magenta
|
|
279
|
+
set fanout_count [select -name "fanout*" -type Inst -highlight 3]
|
|
280
|
+
set load_slew_count [select -name "load_slew*" -type Inst -highlight 3]
|
|
281
|
+
set max_cap_count [select -name "max_cap*" -type Inst -highlight 3]
|
|
281
282
|
set max_length_count [select -name "max_length*" -type Inst -highlight 3]
|
|
282
|
-
set wire_count
|
|
283
|
-
set rebuffer_count
|
|
284
|
-
set split_count
|
|
285
|
-
|
|
286
|
-
set select_count [expr {
|
|
287
|
-
$hold_count +
|
|
288
|
-
$input_count +
|
|
289
|
-
$output_count +
|
|
290
|
-
$repeater_count +
|
|
291
|
-
$fanout_count +
|
|
292
|
-
$load_slew_count +
|
|
293
|
-
$max_cap_count +
|
|
294
|
-
$max_length_count +
|
|
295
|
-
$wire_count +
|
|
296
|
-
$rebuffer_count +
|
|
297
|
-
$split_count
|
|
283
|
+
set wire_count [select -name "wire*" -type Inst -highlight 3]
|
|
284
|
+
set rebuffer_count [select -name "rebuffer*" -type Inst -highlight 4] ;# red
|
|
285
|
+
set split_count [select -name "split*" -type Inst -highlight 5] ;# dark green
|
|
286
|
+
|
|
287
|
+
set select_count [expr {
|
|
288
|
+
$hold_count +
|
|
289
|
+
$input_count +
|
|
290
|
+
$output_count +
|
|
291
|
+
$repeater_count +
|
|
292
|
+
$fanout_count +
|
|
293
|
+
$load_slew_count +
|
|
294
|
+
$max_cap_count +
|
|
295
|
+
$max_length_count +
|
|
296
|
+
$wire_count +
|
|
297
|
+
$rebuffer_count +
|
|
298
|
+
$split_count
|
|
299
|
+
}]
|
|
298
300
|
|
|
299
301
|
if { $select_count == 0 } {
|
|
300
302
|
# Nothing selected
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,9 +8,6 @@ def setup(chip):
|
|
|
8
8
|
Compiles Verilog and C/C++ sources into an executable. In addition to the
|
|
9
9
|
standard RTL inputs, this task reads C/C++ sources from :keypath:`input,
|
|
10
10
|
hll, c`. Outputs an executable in ``outputs/<design>.vexe``.
|
|
11
|
-
|
|
12
|
-
This task supports using the :keypath:`option, trace` parameter to enable
|
|
13
|
-
Verilator's ``--trace`` flag.
|
|
14
11
|
'''
|
|
15
12
|
|
|
16
13
|
# Generic tool setup.
|
|
@@ -69,7 +66,7 @@ def setup(chip):
|
|
|
69
66
|
"if true, enables trace generation.",
|
|
70
67
|
field='help')
|
|
71
68
|
chip.set('tool', tool, 'task', task, 'var', 'trace_type',
|
|
72
|
-
"specifies type of wave file to create when [
|
|
69
|
+
"specifies type of wave file to create when [trace] is set. Valid options are "
|
|
73
70
|
"'vcd' or 'fst'. Defaults to 'vcd'.",
|
|
74
71
|
field='help')
|
|
75
72
|
|
|
@@ -14,8 +14,7 @@ exist, through the following keypaths:
|
|
|
14
14
|
* :keypath:`option, idir`
|
|
15
15
|
|
|
16
16
|
For all tasks, this driver runs Verilator using the ``-sv`` switch to enable
|
|
17
|
-
parsing a subset of SystemVerilog features.
|
|
18
|
-
:keypath:`option, relax` to make warnings nonfatal.
|
|
17
|
+
parsing a subset of SystemVerilog features.
|
|
19
18
|
|
|
20
19
|
Documentation: https://verilator.org/guide/latest
|
|
21
20
|
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
###############################
|
|
3
2
|
# Reading SC Schema
|
|
4
3
|
###############################
|
|
@@ -15,13 +14,13 @@ if { [sc_cfg_exists input fpga xdc] } {
|
|
|
15
14
|
} else {
|
|
16
15
|
set sc_constraint ""
|
|
17
16
|
}
|
|
18
|
-
set sc_tool
|
|
19
|
-
set sc_partname
|
|
20
|
-
set sc_step
|
|
21
|
-
set sc_index
|
|
22
|
-
set sc_flow
|
|
23
|
-
set sc_task
|
|
24
|
-
set sc_refdir
|
|
17
|
+
set sc_tool "vivado"
|
|
18
|
+
set sc_partname [sc_cfg_get fpga partname]
|
|
19
|
+
set sc_step [sc_cfg_get arg step]
|
|
20
|
+
set sc_index [sc_cfg_get arg index]
|
|
21
|
+
set sc_flow [sc_cfg_get option flow]
|
|
22
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
23
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
25
24
|
|
|
26
25
|
source $sc_refdir/sc_$sc_task.tcl
|
|
27
26
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Vivado is an FPGA programming tool suite from Xilinx used to
|
|
3
3
|
program Xilinx devices.
|
|
4
4
|
|
|
5
|
-
Documentation: https://www.
|
|
5
|
+
Documentation: https://www.amd.com/en/products/software/adaptive-socs-and-fpgas/vivado.html
|
|
6
6
|
'''
|
|
7
7
|
|
|
8
8
|
import json
|
|
File without changes
|
|
@@ -31,6 +31,9 @@ def setup(chip, clobber=True):
|
|
|
31
31
|
chip.add('tool', tool, 'task', task, 'output', design + '.net', step=step, index=index)
|
|
32
32
|
chip.add('tool', tool, 'task', task, 'output', design + '.place', step=step, index=index)
|
|
33
33
|
|
|
34
|
+
chip.set('tool', tool, 'task', task, 'var', 'placement', 'component placement constraints',
|
|
35
|
+
field='help')
|
|
36
|
+
|
|
34
37
|
|
|
35
38
|
def runtime_options(chip):
|
|
36
39
|
'''Command line options to vpr for the place step
|
|
@@ -75,12 +78,13 @@ def pre_process(chip):
|
|
|
75
78
|
|
|
76
79
|
step = chip.get('arg', 'step')
|
|
77
80
|
index = chip.get('arg', 'index')
|
|
81
|
+
tool, task = get_tool_task(chip, step, index)
|
|
78
82
|
|
|
79
83
|
part_name = chip.get('fpga', 'partname')
|
|
80
84
|
|
|
81
85
|
# If the user explicitly provides an XML constraints file, give that
|
|
82
86
|
# priority over other constraints input types:
|
|
83
|
-
if
|
|
87
|
+
if chip.valid('input', 'constraint', 'vpr_pins'):
|
|
84
88
|
constraint_file = vpr.find_single_file(chip, 'input', 'constraint', 'vpr_pins',
|
|
85
89
|
step=step, index=index,
|
|
86
90
|
file_not_found_msg="VPR constraints file not found")
|
|
@@ -88,7 +92,7 @@ def pre_process(chip):
|
|
|
88
92
|
if (constraint_file is not None):
|
|
89
93
|
shutil.copy2(constraint_file, vpr.auto_constraints())
|
|
90
94
|
|
|
91
|
-
elif
|
|
95
|
+
elif chip.valid('input', 'constraint', 'pcf'):
|
|
92
96
|
constraint_file = vpr.find_single_file(chip, 'input', 'constraint', 'pcf',
|
|
93
97
|
step=step, index=index,
|
|
94
98
|
file_not_found_msg="PCF constraints file not found")
|
|
@@ -111,11 +115,13 @@ def pre_process(chip):
|
|
|
111
115
|
generate_vpr_constraints_xml_file(all_place_constraints, vpr.auto_constraints())
|
|
112
116
|
|
|
113
117
|
else:
|
|
114
|
-
all_component_constraints = chip.
|
|
118
|
+
all_component_constraints = chip.get('tool', tool, 'task', task, 'var', 'placement',
|
|
119
|
+
step=step, index=index)
|
|
120
|
+
|
|
115
121
|
all_place_constraints = {}
|
|
116
|
-
for
|
|
117
|
-
place_constraint =
|
|
118
|
-
|
|
122
|
+
for constraint in all_component_constraints:
|
|
123
|
+
component, *place_constraint = constraint.split(",")
|
|
124
|
+
place_constraint = tuple([int(loc) for loc in place_constraint])
|
|
119
125
|
chip.logger.info(f'Place constraint for {component} at {place_constraint}')
|
|
120
126
|
all_place_constraints[component] = place_constraint
|
|
121
127
|
|
|
@@ -123,6 +129,14 @@ def pre_process(chip):
|
|
|
123
129
|
generate_vpr_constraints_xml_file(all_place_constraints, vpr.auto_constraints())
|
|
124
130
|
|
|
125
131
|
|
|
132
|
+
def add_placement_constraint(chip, component, location, step=None, index=None):
|
|
133
|
+
tool = 'vpr'
|
|
134
|
+
task = 'place'
|
|
135
|
+
|
|
136
|
+
constraint = f"{component},{','.join([str(loc) for loc in location])}"
|
|
137
|
+
|
|
138
|
+
chip.add('tool', tool, 'task', task, 'var', 'placement', constraint, step=step, index=index)
|
|
139
|
+
|
|
126
140
|
################################
|
|
127
141
|
# Post_process (post executable)
|
|
128
142
|
################################
|
siliconcompiler/tools/vpr/vpr.py
CHANGED
|
@@ -134,7 +134,7 @@ def runtime_options(chip):
|
|
|
134
134
|
'vpr_clock model must be set to ideal, route, or dedicated_clock_network',
|
|
135
135
|
chip=chip)
|
|
136
136
|
|
|
137
|
-
if
|
|
137
|
+
if chip.valid('input', 'constraint', 'sdc'):
|
|
138
138
|
sdc_file = find_single_file(chip, 'input', 'constraint', 'sdc',
|
|
139
139
|
step=step, index=index,
|
|
140
140
|
file_not_found_msg="SDC file not found")
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Xyce XDM netlist converter, used to convert PSPICE and HSPICE netists into Xyce format.
|
|
3
|
+
|
|
4
|
+
Sources: https://github.com/Xyce/XDM
|
|
5
|
+
|
|
6
|
+
Installation: https://github.com/Xyce/XDM
|
|
7
|
+
|
|
8
|
+
Status: SC integration WIP
|
|
9
|
+
'''
|
|
10
|
+
from siliconcompiler.tools._common import get_tool_task
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def setup(chip):
|
|
14
|
+
step = chip.get('arg', 'step')
|
|
15
|
+
index = chip.get('arg', 'index')
|
|
16
|
+
tool, task = get_tool_task(chip, step, index)
|
|
17
|
+
|
|
18
|
+
chip.set('tool', tool, 'exe', 'xdm_bdl')
|
|
19
|
+
chip.set('tool', tool, 'vswitch', '-h')
|
|
20
|
+
chip.set('tool', tool, 'version', '>=v2.7.0', clobber=False)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
################################
|
|
24
|
+
# Version Check
|
|
25
|
+
################################
|
|
26
|
+
def parse_version(stdout):
|
|
27
|
+
line = stdout.splitlines()[5]
|
|
28
|
+
return line.split()[1]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
2
|
+
from siliconcompiler.tools.xdm import setup as tool_setup
|
|
3
|
+
import os
|
|
4
|
+
import shutil
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def setup(chip):
|
|
8
|
+
tool_setup(chip)
|
|
9
|
+
|
|
10
|
+
step = chip.get('arg', 'step')
|
|
11
|
+
index = chip.get('arg', 'index')
|
|
12
|
+
tool, task = get_tool_task(chip, step, index)
|
|
13
|
+
|
|
14
|
+
design = chip.top()
|
|
15
|
+
|
|
16
|
+
if f'{design}.cir' in input_provides(chip, step, index):
|
|
17
|
+
chip.add('tool', tool, 'task', task, 'input', f'{design}.cir',
|
|
18
|
+
step=step, index=index)
|
|
19
|
+
else:
|
|
20
|
+
chip.add('tool', tool, 'task', task, 'require', 'input,netlist,spice',
|
|
21
|
+
step=step, index=index)
|
|
22
|
+
|
|
23
|
+
chip.add('tool', tool, 'task', task, 'output', f'{design}.xyce', step=step, index=index)
|
|
24
|
+
|
|
25
|
+
chip.add('tool', tool, 'task', task, 'option', '--auto',
|
|
26
|
+
step=step, index=index)
|
|
27
|
+
chip.add('tool', tool, 'task', task, 'option', '--source_file_format hspice',
|
|
28
|
+
step=step, index=index)
|
|
29
|
+
chip.add('tool', tool, 'task', task, 'option', f'--dir_out outputs/{design}.xyce',
|
|
30
|
+
step=step, index=index)
|
|
31
|
+
|
|
32
|
+
chip.set('tool', 'xdm', 'task', 'convert', 'var', 'rename', 'true',
|
|
33
|
+
step=step, index=index, clobber=False)
|
|
34
|
+
chip.set('tool', 'xdm', 'task', 'convert', 'var', 'rename',
|
|
35
|
+
'true/false: indicate whether to rename the output file to match the '
|
|
36
|
+
'naming scheme for siliconcompiler', field='help')
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def runtime_options(chip):
|
|
40
|
+
return __get_input_file(chip)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def __get_input_file(chip):
|
|
44
|
+
step = chip.get('arg', 'step')
|
|
45
|
+
index = chip.get('arg', 'index')
|
|
46
|
+
design = chip.top()
|
|
47
|
+
|
|
48
|
+
if f'{design}.cir' in input_provides(chip, step, index):
|
|
49
|
+
return [f'inputs/{design}.cir']
|
|
50
|
+
|
|
51
|
+
return chip.find_files('input', 'netlist', 'spice',
|
|
52
|
+
step=step, index=index)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def post_process(chip):
|
|
56
|
+
step = chip.get('arg', 'step')
|
|
57
|
+
index = chip.get('arg', 'index')
|
|
58
|
+
|
|
59
|
+
if chip.get('tool', 'xdm', 'task', 'convert', 'var', 'rename',
|
|
60
|
+
step=step, index=index) == ['false']:
|
|
61
|
+
return
|
|
62
|
+
|
|
63
|
+
inputfile = __get_input_file(chip)[0]
|
|
64
|
+
|
|
65
|
+
outdir = f'outputs/{chip.top()}.xyce'
|
|
66
|
+
|
|
67
|
+
inputfile_base = os.path.basename(inputfile)
|
|
68
|
+
outputfile_base = f'{chip.top()}.cir'
|
|
69
|
+
|
|
70
|
+
if inputfile_base != outputfile_base:
|
|
71
|
+
shutil.move(os.path.join(outdir, inputfile_base), os.path.join(outdir, outputfile_base))
|