From b1fefd28f8fe6f6f831833eb38428cb43f8ea23b Mon Sep 17 00:00:00 2001
From: Reinier van der Walle <walle@astron.nl>
Date: Fri, 28 Feb 2020 13:26:01 +0100
Subject: [PATCH] Added time_limited sof support

---
 .../hardware/unb2b/scripts/post_flow_pr.tcl        | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/applications/ta2/libraries/ta2_unb2b_bsp/hardware/unb2b/scripts/post_flow_pr.tcl b/applications/ta2/libraries/ta2_unb2b_bsp/hardware/unb2b/scripts/post_flow_pr.tcl
index 8645fbd068..568d6f7ba6 100755
--- a/applications/ta2/libraries/ta2_unb2b_bsp/hardware/unb2b/scripts/post_flow_pr.tcl
+++ b/applications/ta2/libraries/ta2_unb2b_bsp/hardware/unb2b/scripts/post_flow_pr.tcl
@@ -46,11 +46,17 @@ post_message "Revision name: $revision_name"
 # Run adjust PLL script 
 source "$sdk_root/ip/board/bsp/adjust_plls_a10.tcl"
 
-# Copy flat.rbf to parent directory
-file copy -force flat.sof ../flat.sof
+# Copy flat.sof and flat.rbf to parent directory
+if {[file exists "flat_time_limited.sof"] == 1} {
+   post_message "Warning: flat.sof and flat.rbf are Time Limited!"
+   qexec "quartus_cpf -c --option=scripts/rbf_options_file flat_time_limited.sof ../flat.rbf"
+   file copy -force flat_time_limited.sof ../flat.sof
+}
 
-# Convert .sof to .rbf 
-qexec "quartus_cpf -c --option=scripts/rbf_options_file flat.sof ../flat.rbf"
+if {[file exists "flat.sof"] == 1} {
+   qexec "quartus_cpf -c --option=scripts/rbf_options_file flat.sof ../flat.rbf"
+   file copy -force flat.sof ../flat.sof
+}
 
 if {$fast_compile} {
   ::aocl_fast_compile::check_logic_utilization $logic_limit
-- 
GitLab