From 85c04dcfb8e8b5cccde25346deb68346b85fb9a9 Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Tue, 26 Jan 2021 09:25:28 +0000 Subject: [PATCH 1/4] Error out on partially routed clock nets --- .../cl_firesim/build/scripts/create_dcp_from_cl.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl b/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl index 89045059..7013b1ba 100644 --- a/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl +++ b/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl @@ -147,6 +147,8 @@ set_msg_config -id {Timing 38-436} -suppress # Promote the following critical warnings to errors to prevent AGFI generation # Design not completely routed set_msg_config -id {Route 35-1} -new_severity "ERROR" +# Route 35-535] Clock Net: is not completely routed. +set_msg_config -id {Route 35-535} -new_severity "ERROR" # Check that an email address has been set, else unset notify_via_sns From e9945dac18c5e3f59991f3bbe6a169a0f981501d Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Thu, 25 Feb 2021 20:00:52 +0000 Subject: [PATCH 2/4] Add strategy to remove -retime flag from Vivado --- .../build/scripts/synth_cl_firesim.tcl | 2 +- .../build/scripts/strategy_BASIC.tcl | 2 +- .../build/scripts/strategy_CONGESTION.tcl | 2 +- .../build/scripts/strategy_DEFAULT.tcl | 2 +- .../build/scripts/strategy_EXPLORE.tcl | 2 +- .../build/scripts/strategy_NORETIMING.tcl | 58 +++++++++++++++++++ .../build/scripts/strategy_TIMING.tcl | 2 +- 7 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 hdk/common/shell_v04261818/build/scripts/strategy_NORETIMING.tcl diff --git a/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl b/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl index 9490754f..037ec3dd 100644 --- a/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl +++ b/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl @@ -117,7 +117,7 @@ puts "AWS FPGA: ([clock format [clock seconds] -format %T]) Start design synthes update_compile_order -fileset sources_1 puts "\nRunning synth_design for $CL_MODULE $CL_DIR/build/scripts \[[clock format [clock seconds] -format {%a %b %d %H:%M:%S %Y}]\]" -eval [concat synth_design -top $CL_MODULE -verilog_define XSDB_SLV_DIS $VDEFINES -part [DEVICE_TYPE] -mode out_of_context $synth_options -directive $synth_directive -retiming] +eval [concat synth_design -top $CL_MODULE -verilog_define XSDB_SLV_DIS $VDEFINES -part [DEVICE_TYPE] -mode out_of_context $synth_options -directive $synth_directive] set failval [catch {exec grep "FAIL" failfast.csv}] if { $failval==0 } { diff --git a/hdk/common/shell_v04261818/build/scripts/strategy_BASIC.tcl b/hdk/common/shell_v04261818/build/scripts/strategy_BASIC.tcl index 4d5f4b13..3069707e 100644 --- a/hdk/common/shell_v04261818/build/scripts/strategy_BASIC.tcl +++ b/hdk/common/shell_v04261818/build/scripts/strategy_BASIC.tcl @@ -16,7 +16,7 @@ source $HDK_SHELL_DIR/build/scripts/params.tcl source $HDK_SHELL_DIR/build/scripts/uram_options.tcl -set synth_options "-keep_equivalent_registers $synth_uram_option" +set synth_options "-keep_equivalent_registers $synth_uram_option -retiming" set synth_directive "default" #Set psip to 1 to enable Physical Synthesis in Placer diff --git a/hdk/common/shell_v04261818/build/scripts/strategy_CONGESTION.tcl b/hdk/common/shell_v04261818/build/scripts/strategy_CONGESTION.tcl index 09a99acd..d145b480 100644 --- a/hdk/common/shell_v04261818/build/scripts/strategy_CONGESTION.tcl +++ b/hdk/common/shell_v04261818/build/scripts/strategy_CONGESTION.tcl @@ -16,7 +16,7 @@ source $HDK_SHELL_DIR/build/scripts/params.tcl source $HDK_SHELL_DIR/build/scripts/uram_options.tcl -set synth_options "-no_lc -shreg_min_size 10 -control_set_opt_threshold 16 $synth_uram_option" +set synth_options "-no_lc -shreg_min_size 10 -control_set_opt_threshold 16 $synth_uram_option -retiming" set synth_directive "AlternateRoutability" #Set psip to 1 to enable Physical Synthesis in Placer diff --git a/hdk/common/shell_v04261818/build/scripts/strategy_DEFAULT.tcl b/hdk/common/shell_v04261818/build/scripts/strategy_DEFAULT.tcl index f1bd24eb..696d64d1 100644 --- a/hdk/common/shell_v04261818/build/scripts/strategy_DEFAULT.tcl +++ b/hdk/common/shell_v04261818/build/scripts/strategy_DEFAULT.tcl @@ -16,7 +16,7 @@ source $HDK_SHELL_DIR/build/scripts/params.tcl source $HDK_SHELL_DIR/build/scripts/uram_options.tcl -set synth_options "-keep_equivalent_registers -flatten_hierarchy rebuilt $synth_uram_option" +set synth_options "-keep_equivalent_registers -flatten_hierarchy rebuilt $synth_uram_option -retiming" set synth_directive "default" #Set psip to 1 to enable Physical Synthesis in Placer diff --git a/hdk/common/shell_v04261818/build/scripts/strategy_EXPLORE.tcl b/hdk/common/shell_v04261818/build/scripts/strategy_EXPLORE.tcl index 17c54eda..2d0dd1e8 100644 --- a/hdk/common/shell_v04261818/build/scripts/strategy_EXPLORE.tcl +++ b/hdk/common/shell_v04261818/build/scripts/strategy_EXPLORE.tcl @@ -16,7 +16,7 @@ source $HDK_SHELL_DIR/build/scripts/params.tcl source $HDK_SHELL_DIR/build/scripts/uram_options.tcl -set synth_options "-keep_equivalent_registers -flatten_hierarchy rebuilt $synth_uram_option" +set synth_options "-keep_equivalent_registers -flatten_hierarchy rebuilt $synth_uram_option -retiming" set synth_directive "default" #Set psip to 1 to enable Physical Synthesis in Placer diff --git a/hdk/common/shell_v04261818/build/scripts/strategy_NORETIMING.tcl b/hdk/common/shell_v04261818/build/scripts/strategy_NORETIMING.tcl new file mode 100644 index 00000000..dcc09bd2 --- /dev/null +++ b/hdk/common/shell_v04261818/build/scripts/strategy_NORETIMING.tcl @@ -0,0 +1,58 @@ +# Amazon FPGA Hardware Development Kit +# +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Amazon Software License (the "License"). You may not use +# this file except in compliance with the License. A copy of the License is +# located at +# +# http://aws.amazon.com/asl/ +# +# or in the "license" file accompanying this file. This file is distributed on +# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or +# implied. See the License for the specific language governing permissions and +# limitations under the License. + +source $HDK_SHELL_DIR/build/scripts/params.tcl +source $HDK_SHELL_DIR/build/scripts/uram_options.tcl + +set synth_options "-no_lc -shreg_min_size 5 -fsm_extraction one_hot -resource_sharing auto $synth_uram_option" +set synth_directive "default" + +#Set psip to 1 to enable Physical Synthesis in Placer +set psip 0 + +set link 1 + +set opt 1 +set opt_options "" +set opt_directive "Explore" +set opt_preHookTcl "$HDK_SHELL_DIR/build/scripts/check_uram.tcl" +set opt_postHookTcl "$HDK_SHELL_DIR/build/scripts/apply_debug_constraints.tcl" + +set place 1 +set place_options "" +set place_directive "ExtraNetDelay_high" +set place_preHookTcl "" +set place_postHookTcl "" + +set phys_opt 1 +set phys_options "" +set phys_directive "" +set phys_directive "AggressiveExplore" +set phys_preHookTcl "" +set phys_postHookTcl "" + +set route 1 +set route_options "-tns_cleanup" +set route_directive "Explore" +set route_preHookTcl "" +set route_postHookTcl "" + +set route_phys_opt 1 +set post_phys_options "" +set post_phys_directive "AggressiveExplore" +set post_phys_preHookTcl "" +set post_phys_postHookTcl "" + + diff --git a/hdk/common/shell_v04261818/build/scripts/strategy_TIMING.tcl b/hdk/common/shell_v04261818/build/scripts/strategy_TIMING.tcl index dcc09bd2..deb1e56c 100644 --- a/hdk/common/shell_v04261818/build/scripts/strategy_TIMING.tcl +++ b/hdk/common/shell_v04261818/build/scripts/strategy_TIMING.tcl @@ -16,7 +16,7 @@ source $HDK_SHELL_DIR/build/scripts/params.tcl source $HDK_SHELL_DIR/build/scripts/uram_options.tcl -set synth_options "-no_lc -shreg_min_size 5 -fsm_extraction one_hot -resource_sharing auto $synth_uram_option" +set synth_options "-no_lc -shreg_min_size 5 -fsm_extraction one_hot -resource_sharing auto $synth_uram_option -retiming" set synth_directive "default" #Set psip to 1 to enable Physical Synthesis in Placer From 10f1708226d6dd6f27f05eb79315773030cc4aac Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 12 Mar 2021 23:35:32 +0000 Subject: [PATCH 3/4] Finish adding support for NORETIMING strategy --- .../cl_firesim/build/scripts/create_dcp_from_cl.tcl | 4 ++++ .../shell_v04261818/build/scripts/aws_build_dcp_from_cl.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl b/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl index 89045059..1cea9628 100644 --- a/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl +++ b/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl @@ -175,6 +175,10 @@ switch $strategy { puts "EXPLORE strategy." source $HDK_SHELL_DIR/build/scripts/strategy_EXPLORE.tcl } + "NORETIMING" { + puts "NORETIMING strategy." + source $HDK_SHELL_DIR/build/scripts/strategy_NORETIMING.tcl + } "TIMING" { puts "TIMING strategy." source $HDK_SHELL_DIR/build/scripts/strategy_TIMING.tcl diff --git a/hdk/common/shell_v04261818/build/scripts/aws_build_dcp_from_cl.sh b/hdk/common/shell_v04261818/build/scripts/aws_build_dcp_from_cl.sh index 4a1613d8..75104d5c 100755 --- a/hdk/common/shell_v04261818/build/scripts/aws_build_dcp_from_cl.sh +++ b/hdk/common/shell_v04261818/build/scripts/aws_build_dcp_from_cl.sh @@ -18,7 +18,7 @@ # Usage help function usage { - echo "usage: aws_build_dcp_from_cl.sh [ [-script ] | [-strategy BASIC | DEFAULT | EXPLORE | TIMING | CONGESTION] [-clock_recipe_a A0 | A1 | A2] [-clock_recipe_b B0 | B1 | B2 | B3 | B4 | B5] [-clock_recipe_c C0 | C1 | C2 | C3] [-uram_option 2 | 3 | 4] [-vdefine macro1,macro2,macro3,.....,macrox] -foreground] [-notify] | [-h] | [-H] | [-help] ]" + echo "usage: aws_build_dcp_from_cl.sh [ [-script ] | [-strategy BASIC | DEFAULT | EXPLORE | TIMING | NORETIMING | CONGESTION] [-clock_recipe_a A0 | A1 | A2] [-clock_recipe_b B0 | B1 | B2 | B3 | B4 | B5] [-clock_recipe_c C0 | C1 | C2 | C3] [-uram_option 2 | 3 | 4] [-vdefine macro1,macro2,macro3,.....,macrox] -foreground] [-notify] | [-h] | [-H] | [-help] ]" echo " " echo "By default the build is run in the background using nohup so that the" echo "process will not be terminated if the terminal window is closed." @@ -117,7 +117,7 @@ fi # Check that strategy is valid shopt -s extglob -if [[ $strategy != @(BASIC|DEFAULT|EXPLORE|TIMING|CONGESTION) ]]; then +if [[ $strategy != @(BASIC|DEFAULT|EXPLORE|TIMING|CONGESTION|NORETIMING) ]]; then err_msg "$strategy isn't a valid strategy. Valid strategies are BASIC, DEFAULT, EXPLORE, TIMING and CONGESTION." exit 1 fi From 6cd1a8cd417ac6b0e4a7bf7db83192a17d0bf764 Mon Sep 17 00:00:00 2001 From: Tim Snyder Date: Mon, 3 May 2021 11:05:35 -0500 Subject: [PATCH 4/4] add more reports (#37) use -hierarchical_percentages in report_utilization seems to indicate percent utilization while obeying hierarchical pblock constraints report_control_sets after synthesis, gives nice overview of the clocking in the design. Co-authored-by: Tim Snyder --- .../cl_firesim/build/scripts/create_dcp_from_cl.tcl | 4 ++-- .../cl_firesim/build/scripts/synth_cl_firesim.tcl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl b/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl index b10e5069..3d10b53b 100644 --- a/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl +++ b/hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl @@ -285,7 +285,7 @@ if {$implement} { impl_step opt_design $TOP "-merge_equivalent_drivers -sweep" } } - report_utilization -hierarchical -file $CL_DIR/build/reports/${timestamp}.post_opt_utilization.rpt + report_utilization -hierarchical -hierarchical_percentages -file $CL_DIR/build/reports/${timestamp}.post_opt_utilization.rpt ######################## # CL Place @@ -331,7 +331,7 @@ if {$implement} { report_timing_summary -file $CL_DIR/build/reports/${timestamp}.SH_CL_final_timing_summary.rpt # Report utilization - report_utilization -hierarchical -file $CL_DIR/build/reports/${timestamp}.SH_CL_utilization.rpt + report_utilization -hierarchical -hierarchical_percentages -file $CL_DIR/build/reports/${timestamp}.SH_CL_utilization.rpt # This is what will deliver to AWS puts "AWS FPGA: ([clock format [clock seconds] -format %T]) - Writing final DCP to to_aws directory."; diff --git a/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl b/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl index 037ec3dd..08425a91 100644 --- a/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl +++ b/hdk/cl/developer_designs/cl_firesim/build/scripts/synth_cl_firesim.tcl @@ -128,6 +128,9 @@ if { $failval==0 } { puts "AWS FPGA: ([clock format [clock seconds] -format %T]) writing post synth checkpoint."; write_checkpoint -force $CL_DIR/build/checkpoints/${timestamp}.CL.post_synth.dcp +report_utilization -hierarchical -hierarchical_percentages -file $CL_DIR/build/reports/${timestamp}.post_synth_utilization.rpt +report_control_sets -verbose -file $CL_DIR/build/reports/${timestamp}.post_synth_control_sets.rpt + close_project #Set param back to default value set_param sta.enableAutoGenClkNamePersistence 1