Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -reference_checkpoint option to aws_build_dcp_from_cl.sh #43

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ set clock_recipe_c [lindex $argv 10]
set uram_option [lindex $argv 11]
set notify_via_sns [lindex $argv 12]
set VDEFINES [lindex $argv 13]
set reference_checkpoint [lindex $argv 14]


if {$VDEFINES == "__NONE__"} {
# it is easier to explicitly pass something rather than having to get
# empty string passed correctly through layers of string interpolation
set VDEFINES ""
}

##################################################
## Flow control variables
##################################################
Expand Down Expand Up @@ -285,6 +294,14 @@ if {$implement} {
}
report_utilization -hierarchical -file $CL_DIR/build/reports/${timestamp}.post_opt_utilization.rpt

########################
# Load Reference Checkpoint (if provided)
########################
if {$reference_checkpoint != "__NONE__"} {
read_checkpoint -incremental $reference_checkpoint
report_incremental_reuse -hierarchical -file $CL_DIR/build/reports/${timestamp}.post_opt_incremental_reuse.rpt
}

########################
# CL Place
########################
Expand Down Expand Up @@ -328,6 +345,10 @@ if {$implement} {
# Report final timing
report_timing_summary -file $CL_DIR/build/reports/${timestamp}.SH_CL_final_timing_summary.rpt

if {$reference_checkpoint != "__NONE__"} {
report_incremental_reuse -hierarchical -file $CL_DIR/build/reports/${timestamp}.SH_CL_incremental_reuse.rpt
}

# Report utilization
report_utilization -hierarchical -file $CL_DIR/build/reports/${timestamp}.SH_CL_utilization.rpt

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ 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]
set runcmd [concat synth_design -top $CL_MODULE -verilog_define XSDB_SLV_DIS $VDEFINES -part [DEVICE_TYPE] -mode out_of_context $synth_options -directive $synth_directive]
puts "\n$runcmd"
eval $runcmd

set failval [catch {exec grep "FAIL" failfast.csv}]
if { $failval==0 } {
Expand Down
14 changes: 11 additions & 3 deletions hdk/common/shell_v04261818/build/scripts/aws_build_dcp_from_cl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Usage help
function usage
{
echo "usage: aws_build_dcp_from_cl.sh [ [-script <vivado_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 "usage: aws_build_dcp_from_cl.sh [ [-script <vivado_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] [-reference_checkpoint <dcp>] | [-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."
Expand All @@ -45,6 +45,7 @@ ignore_memory_requirement=0
expected_memory_usage=30000000
uram_option=2
vdefine=""
reference_checkpoint="__NONE__"

function info_msg {
echo -e "INFO: $1"
Expand Down Expand Up @@ -100,6 +101,9 @@ while [ "$1" != "" ]; do
;;
-ignore_memory_requirement) ignore_memory_requirement=1
;;
-reference_checkpoint) shift
reference_checkpoint=$1
;;
-h | -H | -help ) usage
exit
;;
Expand Down Expand Up @@ -162,7 +166,11 @@ do
opt_vdefine+=" -verilog_define "
opt_vdefine+=${vdefine_array[index]}
done
echo "$opt_vdefine"

if [[ "$opt_vdefine" == "" ]]; then
opt_vdefine="__NONE__"
fi
info_msg "opt_vdefine is : $opt_vdefine"
if [ $expected_memory_usage -gt `get_instance_memory` ]; then

output_message="YOUR INSTANCE has less memory than is necessary for certain builds. This means that your builds will take longer than expected. \nTo change to an instance type with more memory, please check our instance resize guide: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html"
Expand Down Expand Up @@ -243,7 +251,7 @@ subsystem_id="0x${id1_version:0:4}";
subsystem_vendor_id="0x${id1_version:4:4}";

# Run vivado
cmd="vivado -mode batch -nojournal -log $logname -source $vivado_script -tclargs $timestamp $strategy $hdk_version $shell_version $device_id $vendor_id $subsystem_id $subsystem_vendor_id $clock_recipe_a $clock_recipe_b $clock_recipe_c $uram_option $notify $opt_vdefine"
cmd="vivado -mode batch -nojournal -log $logname -source $vivado_script -tclargs $timestamp $strategy $hdk_version $shell_version $device_id $vendor_id $subsystem_id $subsystem_vendor_id $clock_recipe_a $clock_recipe_b $clock_recipe_c $uram_option $notify $opt_vdefine $reference_checkpoint"
if [[ "$foreground" == "0" ]]; then
nohup $cmd > $timestamp.nohup.out 2>&1 &

Expand Down