siliconcompiler 0.28.2__py3-none-any.whl → 0.28.4__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/_common.py +12 -0
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/sc_dashboard.py +6 -2
- siliconcompiler/apps/sc_install.py +61 -13
- siliconcompiler/apps/sc_remote.py +1 -1
- siliconcompiler/core.py +132 -68
- siliconcompiler/fpgas/vpr_example.py +8 -0
- siliconcompiler/package.py +3 -2
- siliconcompiler/remote/client.py +41 -10
- siliconcompiler/report/__init__.py +1 -1
- siliconcompiler/report/{streamlit_report.py → dashboard/__init__.py} +56 -10
- siliconcompiler/report/dashboard/components/__init__.py +546 -0
- siliconcompiler/report/dashboard/components/flowgraph.py +114 -0
- siliconcompiler/report/dashboard/components/graph.py +208 -0
- siliconcompiler/report/dashboard/layouts/__init__.py +20 -0
- siliconcompiler/report/dashboard/layouts/_common.py +43 -0
- siliconcompiler/report/dashboard/layouts/vertical_flowgraph.py +96 -0
- siliconcompiler/report/dashboard/layouts/vertical_flowgraph_node_tab.py +117 -0
- siliconcompiler/report/dashboard/layouts/vertical_flowgraph_sac_tabs.py +110 -0
- siliconcompiler/report/dashboard/state.py +217 -0
- siliconcompiler/report/dashboard/utils/__init__.py +73 -0
- siliconcompiler/report/dashboard/utils/file_utils.py +120 -0
- siliconcompiler/report/dashboard/viewer.py +36 -0
- siliconcompiler/report/report.py +22 -4
- siliconcompiler/report/summary_table.py +1 -2
- siliconcompiler/report/utils.py +1 -2
- siliconcompiler/scheduler/__init__.py +45 -6
- siliconcompiler/schema/schema_obj.py +4 -2
- siliconcompiler/sphinx_ext/dynamicgen.py +6 -0
- siliconcompiler/tools/_common/__init__.py +44 -6
- siliconcompiler/tools/_common/asic.py +79 -23
- siliconcompiler/tools/genfasm/genfasm.py +7 -0
- siliconcompiler/tools/ghdl/convert.py +7 -0
- siliconcompiler/tools/klayout/convert_drc_db.py +60 -0
- siliconcompiler/tools/klayout/drc.py +156 -0
- siliconcompiler/tools/klayout/export.py +2 -0
- siliconcompiler/tools/klayout/klayout.py +0 -1
- siliconcompiler/tools/klayout/klayout_convert_drc_db.py +182 -0
- siliconcompiler/tools/klayout/operations.py +2 -0
- siliconcompiler/tools/klayout/screenshot.py +2 -0
- siliconcompiler/tools/klayout/show.py +4 -4
- siliconcompiler/tools/magic/drc.py +21 -0
- siliconcompiler/tools/magic/extspice.py +21 -0
- siliconcompiler/tools/magic/magic.py +29 -0
- siliconcompiler/tools/magic/sc_drc.tcl +2 -12
- siliconcompiler/tools/magic/sc_extspice.tcl +3 -15
- siliconcompiler/tools/openroad/floorplan.py +5 -0
- siliconcompiler/tools/openroad/openroad.py +56 -5
- siliconcompiler/tools/openroad/scripts/sc_apr.tcl +15 -0
- siliconcompiler/tools/openroad/scripts/sc_cts.tcl +18 -13
- siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +61 -10
- siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +10 -0
- siliconcompiler/tools/openroad/scripts/sc_procs.tcl +31 -1
- siliconcompiler/tools/openroad/scripts/sc_route.tcl +8 -2
- siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +0 -5
- siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +36 -6
- siliconcompiler/tools/surelog/__init__.py +12 -0
- siliconcompiler/tools/verilator/compile.py +27 -0
- siliconcompiler/tools/verilator/verilator.py +9 -0
- siliconcompiler/tools/vpr/vpr.py +18 -0
- siliconcompiler/tools/yosys/{syn_asic_fpga_shared.tcl → procs.tcl} +23 -0
- siliconcompiler/tools/yosys/sc_screenshot.tcl +104 -0
- siliconcompiler/tools/yosys/sc_syn.tcl +7 -9
- siliconcompiler/tools/yosys/screenshot.py +153 -0
- siliconcompiler/tools/yosys/syn_asic.py +3 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +1 -3
- siliconcompiler/tools/yosys/syn_fpga.tcl +3 -2
- siliconcompiler/toolscripts/_tools.json +10 -5
- siliconcompiler/toolscripts/rhel8/install-chisel.sh +26 -0
- siliconcompiler/toolscripts/rhel8/install-ghdl.sh +25 -0
- siliconcompiler/toolscripts/rhel8/install-icarus.sh +40 -0
- siliconcompiler/toolscripts/rhel8/install-klayout.sh +17 -0
- siliconcompiler/toolscripts/rhel8/install-magic.sh +26 -0
- siliconcompiler/toolscripts/rhel8/install-montage.sh +5 -0
- siliconcompiler/toolscripts/rhel8/install-netgen.sh +25 -0
- siliconcompiler/toolscripts/rhel8/install-openroad.sh +31 -0
- siliconcompiler/toolscripts/rhel8/install-slang.sh +31 -0
- siliconcompiler/toolscripts/rhel8/install-surelog.sh +32 -0
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +27 -0
- siliconcompiler/toolscripts/rhel8/install-verible.sh +24 -0
- siliconcompiler/toolscripts/rhel8/install-verilator.sh +40 -0
- siliconcompiler/toolscripts/rhel8/install-xyce.sh +64 -0
- siliconcompiler/toolscripts/rhel8/install-yosys.sh +23 -0
- siliconcompiler/toolscripts/rhel9/install-chisel.sh +26 -0
- siliconcompiler/toolscripts/rhel9/install-ghdl.sh +25 -0
- siliconcompiler/toolscripts/rhel9/install-icarus.sh +40 -0
- siliconcompiler/toolscripts/rhel9/install-klayout.sh +17 -0
- siliconcompiler/toolscripts/rhel9/install-magic.sh +26 -0
- siliconcompiler/toolscripts/rhel9/install-montage.sh +5 -0
- siliconcompiler/toolscripts/rhel9/install-netgen.sh +25 -0
- siliconcompiler/toolscripts/rhel9/install-slang.sh +31 -0
- siliconcompiler/toolscripts/rhel9/install-surelog.sh +32 -0
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +27 -0
- siliconcompiler/toolscripts/rhel9/install-verible.sh +24 -0
- siliconcompiler/toolscripts/rhel9/install-verilator.sh +40 -0
- siliconcompiler/toolscripts/rhel9/install-xdm.sh +43 -0
- siliconcompiler/toolscripts/rhel9/install-xyce.sh +64 -0
- siliconcompiler/toolscripts/rhel9/install-yosys.sh +23 -0
- siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +40 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +2 -2
- siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +40 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +2 -2
- siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +40 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +2 -2
- siliconcompiler/utils/__init__.py +30 -1
- siliconcompiler/utils/showtools.py +4 -0
- {siliconcompiler-0.28.2.dist-info → siliconcompiler-0.28.4.dist-info}/METADATA +22 -8
- {siliconcompiler-0.28.2.dist-info → siliconcompiler-0.28.4.dist-info}/RECORD +116 -67
- {siliconcompiler-0.28.2.dist-info → siliconcompiler-0.28.4.dist-info}/WHEEL +1 -1
- siliconcompiler/report/streamlit_viewer.py +0 -944
- {siliconcompiler-0.28.2.dist-info → siliconcompiler-0.28.4.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.28.2.dist-info → siliconcompiler-0.28.4.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.28.2.dist-info → siliconcompiler-0.28.4.dist-info}/top_level.txt +0 -0
|
@@ -290,12 +290,12 @@ if { $do_automatic_pins } {
|
|
|
290
290
|
# since we get an error otherwise.
|
|
291
291
|
if { [sc_design_has_unplaced_macros] } {
|
|
292
292
|
if { $openroad_rtlmp_enable == "true" } {
|
|
293
|
-
|
|
294
|
-
max([lindex $openroad_mpl_macro_place_halo 0],
|
|
295
|
-
[lindex $openroad_mpl_macro_place_halo 1])
|
|
296
|
-
}]
|
|
293
|
+
lassign $openroad_mpl_macro_place_halo halo_x halo_y
|
|
297
294
|
|
|
298
295
|
set rtlmp_args []
|
|
296
|
+
if { $openroad_rtlmp_max_levels != "" } {
|
|
297
|
+
lappend rtlmp_args -max_num_level $openroad_rtlmp_max_levels
|
|
298
|
+
}
|
|
299
299
|
if { $openroad_rtlmp_min_instances != "" } {
|
|
300
300
|
lappend rtlmp_args -min_num_inst $openroad_rtlmp_min_instances
|
|
301
301
|
}
|
|
@@ -308,9 +308,48 @@ if { [sc_design_has_unplaced_macros] } {
|
|
|
308
308
|
if { $openroad_rtlmp_max_macros != "" } {
|
|
309
309
|
lappend rtlmp_args -max_num_macro $openroad_rtlmp_max_macros
|
|
310
310
|
}
|
|
311
|
+
if { $openroad_rtlmp_min_aspect_ratio != "" } {
|
|
312
|
+
lappend rtlmp_args -min_ar $openroad_rtlmp_min_aspect_ratio
|
|
313
|
+
}
|
|
314
|
+
if { $openroad_rtlmp_fence != "" } {
|
|
315
|
+
lappend rtlmp_args -fence_lx [lindex $openroad_rtlmp_fence 0]
|
|
316
|
+
lappend rtlmp_args -fence_ly [lindex $openroad_rtlmp_fence 1]
|
|
317
|
+
lappend rtlmp_args -fence_ux [lindex $openroad_rtlmp_fence 2]
|
|
318
|
+
lappend rtlmp_args -fence_uy [lindex $openroad_rtlmp_fence 3]
|
|
319
|
+
}
|
|
320
|
+
if { $openroad_rtlmp_bus_planning == "true" } {
|
|
321
|
+
lappend rtlmp_args -bus_planning
|
|
322
|
+
}
|
|
323
|
+
if { $openroad_rtlmp_target_dead_space != "" } {
|
|
324
|
+
lappend rtlmp_args -target_dead_space $openroad_rtlmp_target_dead_space
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if { $openroad_rtlmp_area_weight != "" } {
|
|
328
|
+
lappend rtlmp_args -area_weight $openroad_rtlmp_area_weight
|
|
329
|
+
}
|
|
330
|
+
if { $openroad_rtlmp_outline_weight != "" } {
|
|
331
|
+
lappend rtlmp_args -outline_weight $openroad_rtlmp_outline_weight
|
|
332
|
+
}
|
|
333
|
+
if { $openroad_rtlmp_wirelength_weight != "" } {
|
|
334
|
+
lappend rtlmp_args -wirelength_weight $openroad_rtlmp_wirelength_weight
|
|
335
|
+
}
|
|
336
|
+
if { $openroad_rtlmp_guidance_weight != "" } {
|
|
337
|
+
lappend rtlmp_args -guidance_weight $openroad_rtlmp_guidance_weight
|
|
338
|
+
}
|
|
339
|
+
if { $openroad_rtlmp_fence_weight != "" } {
|
|
340
|
+
lappend rtlmp_args -fence_weight $openroad_rtlmp_fence_weight
|
|
341
|
+
}
|
|
342
|
+
if { $openroad_rtlmp_notch_weight != "" } {
|
|
343
|
+
lappend rtlmp_args -notch_weight $openroad_rtlmp_notch_weight
|
|
344
|
+
}
|
|
345
|
+
if { $openroad_rtlmp_blockage_weight != "" } {
|
|
346
|
+
lappend rtlmp_args -blockage_weight $openroad_rtlmp_blockage_weight
|
|
347
|
+
}
|
|
311
348
|
|
|
312
349
|
rtl_macro_placer -report_directory reports/rtlmp \
|
|
313
|
-
-halo_width $
|
|
350
|
+
-halo_width $halo_x \
|
|
351
|
+
-halo_height $halo_y \
|
|
352
|
+
-target_util [sc_global_placement_density] \
|
|
314
353
|
{*}$rtlmp_args
|
|
315
354
|
} else {
|
|
316
355
|
###########################
|
|
@@ -330,6 +369,9 @@ if { [sc_design_has_unplaced_macros] } {
|
|
|
330
369
|
# technologies we support do not, so we don't include that step for now.
|
|
331
370
|
}
|
|
332
371
|
}
|
|
372
|
+
|
|
373
|
+
sc_print_macro_information
|
|
374
|
+
|
|
333
375
|
if { [sc_design_has_unplaced_macros] } {
|
|
334
376
|
utl::error FLW 1 "Design contains unplaced macros."
|
|
335
377
|
}
|
|
@@ -349,11 +391,18 @@ global_connect
|
|
|
349
391
|
# Tap Cells
|
|
350
392
|
###########################
|
|
351
393
|
|
|
352
|
-
if {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
394
|
+
if {
|
|
395
|
+
[sc_cfg_tool_task_exists {file} ifp_tapcell] &&
|
|
396
|
+
[llength [sc_cfg_tool_task_get {file} ifp_tapcell]] > 0
|
|
397
|
+
} {
|
|
398
|
+
foreach tapcell_file [sc_cfg_tool_task_get {file} ifp_tapcell] {
|
|
399
|
+
puts "Sourcing tapcell file: ${tapcell_file}"
|
|
400
|
+
source $tapcell_file
|
|
401
|
+
}
|
|
356
402
|
global_connect
|
|
403
|
+
} else {
|
|
404
|
+
utl::warn FLW 1 "Tapcell configuration not provided"
|
|
405
|
+
cut_rows
|
|
357
406
|
}
|
|
358
407
|
|
|
359
408
|
###########################
|
|
@@ -402,4 +451,6 @@ foreach net [sc_psm_check_nets] {
|
|
|
402
451
|
# Remove buffers inserted by synthesis
|
|
403
452
|
###########################
|
|
404
453
|
|
|
405
|
-
|
|
454
|
+
if { [lindex [sc_cfg_tool_task_get var remove_synth_buffers] 0] == "true" } {
|
|
455
|
+
remove_buffers
|
|
456
|
+
}
|
|
@@ -158,3 +158,13 @@ if { $unconstrained_endpoints == "" } {
|
|
|
158
158
|
set unconstrained_endpoints 0
|
|
159
159
|
}
|
|
160
160
|
utl::metric_int "timing__unconstrained" $unconstrained_endpoints
|
|
161
|
+
|
|
162
|
+
# Write markers
|
|
163
|
+
foreach markerdb [[ord::get_db_block] getMarkerCategories] {
|
|
164
|
+
if { [$markerdb getMarkerCount] == 0 } {
|
|
165
|
+
continue
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
$markerdb writeTR "reports/markers/${sc_design}.[$markerdb getName].rpt"
|
|
169
|
+
$markerdb writeJSON "reports/markers/${sc_design}.[$markerdb getName].json"
|
|
170
|
+
}
|
|
@@ -72,8 +72,10 @@ proc sc_global_placement { args } {
|
|
|
72
72
|
lappend openroad_gpl_args "-skip_io"
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
set density [sc_global_placement_density]
|
|
76
|
+
|
|
75
77
|
global_placement {*}$openroad_gpl_args \
|
|
76
|
-
-density
|
|
78
|
+
-density $density \
|
|
77
79
|
-pad_left $openroad_gpl_padding \
|
|
78
80
|
-pad_right $openroad_gpl_padding
|
|
79
81
|
}
|
|
@@ -220,6 +222,34 @@ proc sc_design_has_unplaced_macros { } {
|
|
|
220
222
|
return false
|
|
221
223
|
}
|
|
222
224
|
|
|
225
|
+
###########################
|
|
226
|
+
# Print macros placement
|
|
227
|
+
###########################
|
|
228
|
+
|
|
229
|
+
proc sc_print_macro_information { } {
|
|
230
|
+
set print_header "true"
|
|
231
|
+
foreach inst [[ord::get_db_block] getInsts] {
|
|
232
|
+
if { [$inst isBlock] } {
|
|
233
|
+
set master [$inst getMaster]
|
|
234
|
+
set status [$inst getPlacementStatus]
|
|
235
|
+
|
|
236
|
+
if { $print_header == "true" } {
|
|
237
|
+
puts "Macro placement information"
|
|
238
|
+
set print_header "false"
|
|
239
|
+
}
|
|
240
|
+
if { [$inst isPlaced] } {
|
|
241
|
+
set location [$inst getLocation]
|
|
242
|
+
set orient [$inst getOrient]
|
|
243
|
+
set xloc [ord::dbu_to_microns [lindex $location 0]]
|
|
244
|
+
set yloc [ord::dbu_to_microns [lindex $location 1]]
|
|
245
|
+
puts "[$inst getName] ([$master getName]): $status at ($xloc um, $yloc um) $orient"
|
|
246
|
+
} else {
|
|
247
|
+
utl::warn FLW 1 "[$inst getName] ([$master getName]): UNPLACED"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
223
253
|
###########################
|
|
224
254
|
# Design has unplaced pads
|
|
225
255
|
###########################
|
|
@@ -8,8 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
proc insert_fillers { } {
|
|
10
10
|
upvar sc_filler sc_filler
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
global sc_mainlib
|
|
12
|
+
|
|
13
|
+
set fillers $sc_filler
|
|
14
|
+
if { [lindex [sc_cfg_tool_task_get var dpl_use_decap_fillers] 0] == "true" } {
|
|
15
|
+
lappend fillers {*}[sc_cfg_get library $sc_mainlib asic cells decap]
|
|
16
|
+
}
|
|
17
|
+
if { $fillers != "" } {
|
|
18
|
+
filler_placement $fillers
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
check_placement -verbose
|
|
@@ -3,11 +3,6 @@ gui::save_display_controls
|
|
|
3
3
|
set sc_resolution \
|
|
4
4
|
[lindex [sc_cfg_tool_task_get {var} show_vertical_resolution] 0]
|
|
5
5
|
|
|
6
|
-
# Show the drc markers (if any)
|
|
7
|
-
if { [file exists reports/${sc_design}_drc.rpt] } {
|
|
8
|
-
gui::load_drc reports/${sc_design}_drc.rpt
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
sc_image_setup_default
|
|
12
7
|
|
|
13
8
|
sc_save_image "screenshot" "outputs/${sc_design}.png" $sc_resolution
|
|
@@ -226,6 +226,12 @@ proc sc_image_clocks { } {
|
|
|
226
226
|
proc sc_image_clocktree { } {
|
|
227
227
|
gui::show_widget "Clock Tree Viewer"
|
|
228
228
|
global sc_scenarios
|
|
229
|
+
global sc_design
|
|
230
|
+
|
|
231
|
+
sc_image_setup_default
|
|
232
|
+
gui::set_display_controls "Layers/*" visible true
|
|
233
|
+
gui::set_display_controls "Nets/*" visible false
|
|
234
|
+
gui::set_display_controls "Nets/Clock" visible true
|
|
229
235
|
|
|
230
236
|
set clock_state []
|
|
231
237
|
foreach clock [all_clocks] {
|
|
@@ -233,6 +239,7 @@ proc sc_image_clocktree { } {
|
|
|
233
239
|
}
|
|
234
240
|
set_propagated_clock [all_clocks]
|
|
235
241
|
|
|
242
|
+
file mkdir reports/images/clocks
|
|
236
243
|
foreach clock [get_clocks *] {
|
|
237
244
|
if { [llength [get_property $clock sources]] == 0 } {
|
|
238
245
|
# Skip virtual clocks
|
|
@@ -243,13 +250,18 @@ proc sc_image_clocktree { } {
|
|
|
243
250
|
set clock_name [get_name $clock]
|
|
244
251
|
foreach corner $sc_scenarios {
|
|
245
252
|
set path reports/images/clocktree/${clock_name}.${corner}.png
|
|
246
|
-
utl::info FLW 1 "Saving $clock_name clock tree for $corner
|
|
253
|
+
utl::info FLW 1 "Saving \"$clock_name\" clock tree for $corner to $path"
|
|
247
254
|
save_clocktree_image $path \
|
|
248
255
|
-clock $clock_name \
|
|
249
256
|
-width 1024 \
|
|
250
257
|
-height 1024 \
|
|
251
258
|
-corner $corner
|
|
252
259
|
}
|
|
260
|
+
|
|
261
|
+
if { [info commands gui::select_clockviewer_clock] != "" } {
|
|
262
|
+
gui::select_clockviewer_clock ${clock_name}
|
|
263
|
+
sc_save_image "clock - ${clock_name}" reports/images/clocks/${sc_design}.${clock_name}.png
|
|
264
|
+
}
|
|
253
265
|
}
|
|
254
266
|
|
|
255
267
|
foreach {clock state} $clock_state {
|
|
@@ -306,21 +318,39 @@ proc sc_image_optimizer { } {
|
|
|
306
318
|
sc_save_image "optimizer" reports/images/${sc_design}.optimizer.png
|
|
307
319
|
}
|
|
308
320
|
|
|
321
|
+
proc sc_image_markers { } {
|
|
322
|
+
global sc_design
|
|
323
|
+
sc_image_setup_default
|
|
324
|
+
|
|
325
|
+
file mkdir reports/images/markers
|
|
326
|
+
foreach markerdb [[ord::get_db_block] getMarkerCategories] {
|
|
327
|
+
if { [$markerdb getMarkerCount] == 0 } {
|
|
328
|
+
continue
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
gui::select_marker_category $markerdb
|
|
332
|
+
|
|
333
|
+
sc_save_image \
|
|
334
|
+
"markers - [$markerdb getName]" \
|
|
335
|
+
reports/images/markers/${sc_design}.[$markerdb getName].png
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
gui::select_marker_category NULL
|
|
339
|
+
}
|
|
340
|
+
|
|
309
341
|
# Setup
|
|
310
342
|
file mkdir reports/images
|
|
311
343
|
gui::save_display_controls
|
|
312
344
|
sc_image_setup_default
|
|
313
345
|
|
|
314
|
-
if { [file exists reports/${sc_design}_drc.rpt] } {
|
|
315
|
-
# Show the drc markers (if any)
|
|
316
|
-
gui::load_drc reports/${sc_design}_drc.rpt
|
|
317
|
-
}
|
|
318
|
-
|
|
319
346
|
# General images
|
|
320
347
|
sc_image_everything
|
|
321
348
|
sc_image_placement
|
|
322
349
|
sc_image_routing
|
|
323
350
|
|
|
351
|
+
# Markers
|
|
352
|
+
sc_image_markers
|
|
353
|
+
|
|
324
354
|
# Heatmaps
|
|
325
355
|
if { [sc_cfg_tool_task_check_in_list placement_density var reports] } {
|
|
326
356
|
sc_image_placement_density
|
|
@@ -61,24 +61,36 @@ def setup(chip):
|
|
|
61
61
|
field='help')
|
|
62
62
|
chip.set('tool', tool, 'task', task, 'var', 'enable_lowmem', 'false',
|
|
63
63
|
step=step, index=index, clobber=False)
|
|
64
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
65
|
+
','.join(['tool', tool, 'task', task, 'var', 'enable_lowmem']),
|
|
66
|
+
step=step, index=index)
|
|
64
67
|
|
|
65
68
|
chip.set('tool', tool, 'task', task, 'var', 'disable_write_cache',
|
|
66
69
|
'true/false, when true instructs Surelog to not write to its cache.',
|
|
67
70
|
field='help')
|
|
68
71
|
chip.set('tool', tool, 'task', task, 'var', 'disable_write_cache', 'false',
|
|
69
72
|
step=step, index=index, clobber=False)
|
|
73
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
74
|
+
','.join(['tool', tool, 'task', task, 'var', 'disable_write_cache']),
|
|
75
|
+
step=step, index=index)
|
|
70
76
|
|
|
71
77
|
chip.set('tool', tool, 'task', task, 'var', 'disable_info',
|
|
72
78
|
'true/false, when true instructs Surelog to not log infos.',
|
|
73
79
|
field='help')
|
|
74
80
|
chip.set('tool', tool, 'task', task, 'var', 'disable_info', 'false',
|
|
75
81
|
step=step, index=index, clobber=False)
|
|
82
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
83
|
+
','.join(['tool', tool, 'task', task, 'var', 'disable_info']),
|
|
84
|
+
step=step, index=index)
|
|
76
85
|
|
|
77
86
|
chip.set('tool', tool, 'task', task, 'var', 'disable_note',
|
|
78
87
|
'true/false, when true instructs Surelog to not log notes.',
|
|
79
88
|
field='help')
|
|
80
89
|
chip.set('tool', tool, 'task', task, 'var', 'disable_note', 'false',
|
|
81
90
|
step=step, index=index, clobber=False)
|
|
91
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
92
|
+
','.join(['tool', tool, 'task', task, 'var', 'disable_note']),
|
|
93
|
+
step=step, index=index)
|
|
82
94
|
|
|
83
95
|
|
|
84
96
|
def parse_version(stdout):
|
|
@@ -34,24 +34,42 @@ def setup(chip):
|
|
|
34
34
|
if mode not in (['cc'], ['systemc']):
|
|
35
35
|
chip.error(f"Invalid mode {mode} provided to verilator/compile. Expected one of 'cc' or "
|
|
36
36
|
"'systemc'")
|
|
37
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
38
|
+
','.join(['tool', tool, 'task', task, 'var', 'mode']),
|
|
39
|
+
step=step, index=index)
|
|
37
40
|
|
|
38
41
|
trace_type = chip.get('tool', tool, 'task', task, 'var', 'trace_type', step=step, index=index)
|
|
39
42
|
if trace_type not in (['vcd'], ['fst']):
|
|
40
43
|
chip.error(f"Invalid trace type {trace_type} provided to verilator/compile. Expected "
|
|
41
44
|
"one of 'vcd' or 'fst'.")
|
|
45
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
46
|
+
','.join(['tool', tool, 'task', task, 'var', 'trace_type']),
|
|
47
|
+
step=step, index=index)
|
|
42
48
|
|
|
43
49
|
chip.set('tool', tool, 'task', task, 'var', 'cflags',
|
|
44
50
|
'flags to provide to the C++ compiler invoked by Verilator',
|
|
45
51
|
field='help')
|
|
52
|
+
if chip.get('tool', tool, 'task', task, 'var', 'cflags', step=step, index=index):
|
|
53
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
54
|
+
','.join(['tool', tool, 'task', task, 'var', 'cflags']),
|
|
55
|
+
step=step, index=index)
|
|
46
56
|
|
|
47
57
|
chip.set('tool', tool, 'task', task, 'var', 'ldflags',
|
|
48
58
|
'flags to provide to the linker invoked by Verilator',
|
|
49
59
|
field='help')
|
|
60
|
+
if chip.get('tool', tool, 'task', task, 'var', 'ldflags', step=step, index=index):
|
|
61
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
62
|
+
','.join(['tool', tool, 'task', task, 'var', 'ldflags']),
|
|
63
|
+
step=step, index=index)
|
|
50
64
|
|
|
51
65
|
chip.set('tool', tool, 'task', task, 'var', 'pins_bv',
|
|
52
66
|
'controls datatypes used to represent SystemC inputs/outputs. See --pins-bv in '
|
|
53
67
|
'Verilator docs for more info.',
|
|
54
68
|
field='help')
|
|
69
|
+
if chip.get('tool', tool, 'task', task, 'var', 'pins_bv', step=step, index=index):
|
|
70
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
71
|
+
','.join(['tool', tool, 'task', task, 'var', 'pins_bv']),
|
|
72
|
+
step=step, index=index)
|
|
55
73
|
|
|
56
74
|
chip.set('tool', tool, 'task', task, 'var', 'mode',
|
|
57
75
|
"defines compilation mode for Verilator. Valid options are 'cc' for C++, or 'systemc' "
|
|
@@ -61,10 +79,19 @@ def setup(chip):
|
|
|
61
79
|
chip.set('tool', tool, 'task', task, 'dir', 'cincludes',
|
|
62
80
|
'include directories to provide to the C++ compiler invoked by Verilator',
|
|
63
81
|
field='help')
|
|
82
|
+
if chip.get('tool', tool, 'task', task, 'dir', 'cincludes', step=step, index=index):
|
|
83
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
84
|
+
','.join(['tool', tool, 'task', task, 'dir', 'cincludes']),
|
|
85
|
+
step=step, index=index)
|
|
64
86
|
|
|
65
87
|
chip.set('tool', tool, 'task', task, 'var', 'trace',
|
|
66
88
|
"if true, enables trace generation.",
|
|
67
89
|
field='help')
|
|
90
|
+
if chip.get('tool', tool, 'task', task, 'var', 'trace', step=step, index=index):
|
|
91
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
92
|
+
','.join(['tool', tool, 'task', task, 'var', 'trace']),
|
|
93
|
+
step=step, index=index)
|
|
94
|
+
|
|
68
95
|
chip.set('tool', tool, 'task', task, 'var', 'trace_type',
|
|
69
96
|
"specifies type of wave file to create when [trace] is set. Valid options are "
|
|
70
97
|
"'vcd' or 'fst'. Defaults to 'vcd'.",
|
|
@@ -71,6 +71,10 @@ def setup(chip):
|
|
|
71
71
|
chip.set('tool', tool, 'task', task, 'file', 'config',
|
|
72
72
|
'Verilator configuration file',
|
|
73
73
|
field='help')
|
|
74
|
+
if chip.get('tool', tool, 'task', task, 'file', 'config', step=step, index=index):
|
|
75
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
76
|
+
','.join(['tool', tool, 'task', task, 'file', 'config']),
|
|
77
|
+
step=step, index=index)
|
|
74
78
|
|
|
75
79
|
chip.set('tool', tool, 'task', task, 'var', 'enable_assert',
|
|
76
80
|
'true/false, when true assertions are enabled in Verilator.',
|
|
@@ -78,6 +82,11 @@ def setup(chip):
|
|
|
78
82
|
chip.set('tool', tool, 'task', task, 'var', 'enable_assert', 'false',
|
|
79
83
|
step=step, index=index, clobber=False)
|
|
80
84
|
|
|
85
|
+
if chip.get('tool', tool, 'task', task, 'var', 'enable_assert', step=step, index=index):
|
|
86
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
87
|
+
','.join(['tool', tool, 'task', task, 'var', 'enable_assert']),
|
|
88
|
+
step=step, index=index)
|
|
89
|
+
|
|
81
90
|
if f'{chip.top()}.v' not in input_provides(chip, step, index):
|
|
82
91
|
add_require_input(chip, 'input', 'rtl', 'verilog')
|
|
83
92
|
add_require_input(chip, 'input', 'rtl', 'systemverilog')
|
siliconcompiler/tools/vpr/vpr.py
CHANGED
|
@@ -66,6 +66,20 @@ def setup_tool(chip, clobber=True):
|
|
|
66
66
|
chip.add('tool', tool, 'task', task, 'require', f'fpga,{part_name},var,{resource}',
|
|
67
67
|
step=step, index=index)
|
|
68
68
|
|
|
69
|
+
add_tool_requirements(chip)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def add_tool_requirements(chip):
|
|
73
|
+
|
|
74
|
+
step = chip.get('arg', 'step')
|
|
75
|
+
index = chip.get('arg', 'index')
|
|
76
|
+
tool, task = get_tool_task(chip, step, index)
|
|
77
|
+
|
|
78
|
+
part_name = chip.get('fpga', 'partname')
|
|
79
|
+
|
|
80
|
+
chip.add('tool', tool, 'task', task, 'require', f'fpga,{part_name},var,vpr_device_code',
|
|
81
|
+
step=step, index=index)
|
|
82
|
+
|
|
69
83
|
|
|
70
84
|
def runtime_options(chip):
|
|
71
85
|
|
|
@@ -76,6 +90,10 @@ def runtime_options(chip):
|
|
|
76
90
|
|
|
77
91
|
options = []
|
|
78
92
|
|
|
93
|
+
device_code = chip.get('fpga', part_name, 'var', 'vpr_device_code')
|
|
94
|
+
|
|
95
|
+
options.append(f"--device {device_code[0]}")
|
|
96
|
+
|
|
79
97
|
options.append(f"--write_block_usage {__block_file}")
|
|
80
98
|
options.append("--outfile_prefix outputs/")
|
|
81
99
|
|
|
@@ -29,3 +29,26 @@ proc sc_map_memory { lib_file techmap_file do_rom } {
|
|
|
29
29
|
|
|
30
30
|
return $design_mod
|
|
31
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
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl
|
|
6
|
+
|
|
7
|
+
yosys echo on
|
|
8
|
+
|
|
9
|
+
###############################
|
|
10
|
+
# Schema Adapter
|
|
11
|
+
###############################
|
|
12
|
+
|
|
13
|
+
set sc_tool yosys
|
|
14
|
+
set sc_step [sc_cfg_get arg step]
|
|
15
|
+
set sc_index [sc_cfg_get arg index]
|
|
16
|
+
set sc_flow [sc_cfg_get option flow]
|
|
17
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
18
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
19
|
+
|
|
20
|
+
####################
|
|
21
|
+
# DESIGNER's CHOICE
|
|
22
|
+
####################
|
|
23
|
+
|
|
24
|
+
set sc_design [sc_top]
|
|
25
|
+
|
|
26
|
+
########################################################
|
|
27
|
+
# Helper function
|
|
28
|
+
########################################################
|
|
29
|
+
|
|
30
|
+
source "$sc_refdir/procs.tcl"
|
|
31
|
+
|
|
32
|
+
########################################################
|
|
33
|
+
# Design Inputs
|
|
34
|
+
########################################################
|
|
35
|
+
|
|
36
|
+
if { [file exists "inputs/$sc_design.v"] } {
|
|
37
|
+
set input_verilog "inputs/$sc_design.v"
|
|
38
|
+
yosys read_verilog -noblackbox -sv $input_verilog
|
|
39
|
+
set file_type "v"
|
|
40
|
+
} elseif { [file exists "inputs/$sc_design.vg"] } {
|
|
41
|
+
set input_verilog "inputs/$sc_design.vg"
|
|
42
|
+
yosys read_verilog -noblackbox -sv $input_verilog
|
|
43
|
+
set file_type "vg"
|
|
44
|
+
} elseif { [sc_cfg_tool_task_exists var show_filepath] } {
|
|
45
|
+
yosys read_verilog -noblackbox -sv [sc_cfg_tool_task_get var show_filepath]
|
|
46
|
+
set file_type [lindex [sc_cfg_tool_task_get var show_filetype] 0]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
########################################################
|
|
50
|
+
# Override top level parameters
|
|
51
|
+
########################################################
|
|
52
|
+
|
|
53
|
+
sc_apply_params
|
|
54
|
+
|
|
55
|
+
########################################################
|
|
56
|
+
# Read Libraries
|
|
57
|
+
########################################################
|
|
58
|
+
|
|
59
|
+
set sc_logiclibs [sc_get_asic_libraries logic]
|
|
60
|
+
set sc_macrolibs [sc_get_asic_libraries macro]
|
|
61
|
+
|
|
62
|
+
set sc_libraries [sc_cfg_tool_task_get {file} synthesis_libraries]
|
|
63
|
+
if { [sc_cfg_tool_task_exists {file} synthesis_libraries_macros] } {
|
|
64
|
+
set sc_macro_libraries \
|
|
65
|
+
[sc_cfg_tool_task_get {file} synthesis_libraries_macros]
|
|
66
|
+
} else {
|
|
67
|
+
set sc_macro_libraries []
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
set sc_blackboxes []
|
|
71
|
+
foreach lib $sc_macrolibs {
|
|
72
|
+
if { [sc_cfg_exists library $lib output blackbox verilog] } {
|
|
73
|
+
foreach lib_f [sc_cfg_get library $lib output blackbox verilog] {
|
|
74
|
+
lappend sc_blackboxes $lib_f
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
foreach lib_file "$sc_libraries $sc_macro_libraries" {
|
|
80
|
+
yosys read_liberty -lib $lib_file
|
|
81
|
+
}
|
|
82
|
+
foreach bb_file $sc_blackboxes {
|
|
83
|
+
yosys log "Reading blackbox model file: $bb_file"
|
|
84
|
+
yosys read_verilog -sv $bb_file
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
########################################################
|
|
88
|
+
# Screenshot
|
|
89
|
+
########################################################
|
|
90
|
+
|
|
91
|
+
yosys hierarchy -top $sc_design
|
|
92
|
+
|
|
93
|
+
if { $file_type == "v" } {
|
|
94
|
+
yosys proc
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
yosys show \
|
|
98
|
+
-nobg \
|
|
99
|
+
-format png \
|
|
100
|
+
-width \
|
|
101
|
+
-signed \
|
|
102
|
+
-stretch \
|
|
103
|
+
-prefix outputs/${sc_design} \
|
|
104
|
+
$sc_design
|
|
@@ -26,6 +26,12 @@ set sc_flow [sc_cfg_get option flow]
|
|
|
26
26
|
set sc_optmode [sc_cfg_get option optmode]
|
|
27
27
|
set sc_pdk [sc_cfg_get option pdk]
|
|
28
28
|
|
|
29
|
+
########################################################
|
|
30
|
+
# Helper function
|
|
31
|
+
########################################################
|
|
32
|
+
|
|
33
|
+
source "$sc_refdir/procs.tcl"
|
|
34
|
+
|
|
29
35
|
########################################################
|
|
30
36
|
# Design Inputs
|
|
31
37
|
########################################################
|
|
@@ -57,15 +63,7 @@ if { [file exists "inputs/$sc_design.v"] } {
|
|
|
57
63
|
# Override top level parameters
|
|
58
64
|
########################################################
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
if { [sc_cfg_exists option param] } {
|
|
62
|
-
dict for {key value} [sc_cfg_get option param] {
|
|
63
|
-
if { ![string is integer $value] } {
|
|
64
|
-
set value [concat \"$value\"]
|
|
65
|
-
}
|
|
66
|
-
yosys chparam -set $key $value $sc_design
|
|
67
|
-
}
|
|
68
|
-
}
|
|
66
|
+
sc_apply_params
|
|
69
67
|
|
|
70
68
|
########################################################
|
|
71
69
|
# Synthesis based on mode
|