Skip to content
Snippets Groups Projects
Commit c285d5b0 authored by Mikael Henriksson's avatar Mikael Henriksson :runner:
Browse files

Added global option for license queuing

parent ca2af9b1
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,13 @@ RETIME_ENABLE="YES" ...@@ -47,6 +47,13 @@ RETIME_ENABLE="YES"
# idealy be set to min{ Computer Cores, Design Compiler Licenses }. # idealy be set to min{ Computer Cores, Design Compiler Licenses }.
MAX_CONCURRENCY=12 MAX_CONCURRENCY=12
# Wait for appropriate Design Compiler licenses when the required licenses are
# currently already in use by other Design Compiler instances. This enables
# Design Compiler License Queuing. Setting this option to 'NO' can make you
# miss sweep points if all available licenses are already in use by other Design
# Compiler instances. Set to either 'YES' or 'NO' (note the CAPITALIZATION).
WAIT_FOR_LICENSE="YES"
# String that will be appended to the top sweep directory name. Could, for # String that will be appended to the top sweep directory name. Could, for
# example, be used to append technology, corrner or other vital info to the # example, be used to append technology, corrner or other vital info to the
# sweep directory name. Leave blank if unused. # sweep directory name. Leave blank if unused.
...@@ -127,18 +134,24 @@ function generate_synthesis_script() { ...@@ -127,18 +134,24 @@ function generate_synthesis_script() {
# access any unexported items (variables, functions, etc). # access any unexported items (variables, functions, etc).
function run_design_compiler() { function run_design_compiler() {
# Change directory to design directory. # Change active directory to design directory.
local design_directory="$1" local design_directory="$1"
cd "$design_directory" || exit 1 cd "$design_directory" || exit 1
# Get time of sweep start. # Get time of sweep start.
start_time="$(date +"%H:%M:%S")" start_time="$(date +"%H:%M:%S")"
# Activate Design Compiler License Queuing if requiered in global settings.
if [ ${WAIT_FOR_LICENSE} = "YES" ]; then
export SNPSLMD_QUEUE="true"
fi
# Source the automatically generated design options file. This file contains # Source the automatically generated design options file. This file contains
# 'period' and 'design'generics'. # 'period' and 'design'generics'.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source .design_options.sh source .design_options.sh
# Display sweep start.
if [ "$design_generics" = "" ]; then if [ "$design_generics" = "" ]; then
echo "[ PID: $$ ]: $start_time, starting synthesis: '$DESIGN_NAME'" \ echo "[ PID: $$ ]: $start_time, starting synthesis: '$DESIGN_NAME'" \
"@ $period $PERIOD_DIM." "@ $period $PERIOD_DIM."
...@@ -180,6 +193,7 @@ function sigterm_handler() { ...@@ -180,6 +193,7 @@ function sigterm_handler() {
export -f run_design_compiler export -f run_design_compiler
export DESIGN_NAME export DESIGN_NAME
export PERIOD_DIM export PERIOD_DIM
export WAIT_FOR_LICENSE
# Sanity checks for the global settings. # Sanity checks for the global settings.
if [ -z "$CLOCK_NAME" ]; then if [ -z "$CLOCK_NAME" ]; then
...@@ -208,6 +222,10 @@ if ! [[ "$RETIME_ENABLE" =~ ^(YES)|(NO)$ ]]; then ...@@ -208,6 +222,10 @@ if ! [[ "$RETIME_ENABLE" =~ ^(YES)|(NO)$ ]]; then
echo "Error: \$RETIME_ENABLE not in { "YES", "NO" }." echo "Error: \$RETIME_ENABLE not in { "YES", "NO" }."
exit 1 exit 1
fi fi
if ! [[ "${WAIT_FOR_LICENSE}" =~ ^(YES)|(NO)$ ]]; then
echo "Error: \$WAIT_FOR_LICENSE not in { "YES", "NO" }."
exit 1
fi
# Assure all periods are in numeric format, with max one decimal delimiter. # Assure all periods are in numeric format, with max one decimal delimiter.
for period in "${PERIODS[@]}"; do for period in "${PERIODS[@]}"; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment