From 049c5531867647fd4688aee38df193886dba0698 Mon Sep 17 00:00:00 2001 From: Iulia Moldovan Date: Thu, 6 Jul 2023 17:28:03 +0300 Subject: [PATCH] Add copyright and license to .sh, .yml, .pl files Signed-off-by: Iulia Moldovan --- .github/scripts/check_for_missing_readme_md.sh | 8 +++++++- .../workflows/check_for_guideline_rules.yml | 6 ++++++ .github/workflows/test_n_lint.yml | 7 +++++++ library/common/tb/generate_xml.sh | 7 ++++++- library/common/tb/run_tb.sh | 5 +++++ projects/scripts/gtwiz_parser.pl | 18 ++++++++++-------- 6 files changed, 41 insertions(+), 10 deletions(-) diff --git a/.github/scripts/check_for_missing_readme_md.sh b/.github/scripts/check_for_missing_readme_md.sh index 2e2c4b4e418..47d9ecaa94d 100755 --- a/.github/scripts/check_for_missing_readme_md.sh +++ b/.github/scripts/check_for_missing_readme_md.sh @@ -1,6 +1,12 @@ #!/bin/sh + +############################################################################## +## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved. +### SPDX short identifier: BSD-1-Clause # -# Ensure there are README.md (case insensitive name) files in all the project directories +# The purpose of this script: +## Ensure there are README.md (case insensitive name) files in all the project directories +############################################################################## set -e #set -x diff --git a/.github/workflows/check_for_guideline_rules.yml b/.github/workflows/check_for_guideline_rules.yml index b39b6781a90..f456eb6f5d4 100644 --- a/.github/workflows/check_for_guideline_rules.yml +++ b/.github/workflows/check_for_guideline_rules.yml @@ -1,3 +1,9 @@ +############################################################################## +## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved. +# +## GitHub action script for the check_guideline.py script located in .github/scripts +############################################################################## + name: Guideline checker on: diff --git a/.github/workflows/test_n_lint.yml b/.github/workflows/test_n_lint.yml index 4e49e78270b..3a6c446534d 100644 --- a/.github/workflows/test_n_lint.yml +++ b/.github/workflows/test_n_lint.yml @@ -1,3 +1,10 @@ +############################################################################## +## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved. +# +## GitHub action script for the check_for_missing_readme_md.sh script located +## in .github/scripts +############################################################################## + name: Lint on: diff --git a/library/common/tb/generate_xml.sh b/library/common/tb/generate_xml.sh index c82dc4cba0b..bf46861d34d 100755 --- a/library/common/tb/generate_xml.sh +++ b/library/common/tb/generate_xml.sh @@ -1,5 +1,10 @@ #!/bin/bash +############################################################################## +## Copyright (C) 2014-2023 Analog Devices, Inc. All rights reserved. +### SPDX short identifier: BSD-1-Clause +############################################################################## + # Depending on simulator, search for errors or 'SUCCESS' keyword in specific log if [[ "$SIMULATOR" == "modelsim" ]]; then ERRS=`grep -i -e '# Error ' -e '# Fatal' -e '# Failed' -C 10 ${NAME}_modelsim.log` @@ -15,7 +20,7 @@ else fi # If DURATION is not defined, try to extract it from log file. If it's not found, just use 0 -if [[ -z ${DURATION+x} ]]; then +if [[ -z ${DURATION+x} ]]; then DURATION=$(grep -i 'elapsed' ${NAME}_${SIMULATOR}.log | cut -d ' ' -f '10') if [[ -z "$DURATION" ]]; then DURATION="0";fi fi diff --git a/library/common/tb/run_tb.sh b/library/common/tb/run_tb.sh index 973fe539308..9812dd1d076 100644 --- a/library/common/tb/run_tb.sh +++ b/library/common/tb/run_tb.sh @@ -1,3 +1,8 @@ +############################################################################## +## Copyright (C) 2014-2023 Analog Devices, Inc. All rights reserved. +### SPDX short identifier: BSD-1-Clause +############################################################################## + export NAME=`basename $0` # MODE not defined or defined to something else than 'batch' diff --git a/projects/scripts/gtwiz_parser.pl b/projects/scripts/gtwiz_parser.pl index 3581aeddeac..b6eb237ef7b 100755 --- a/projects/scripts/gtwiz_parser.pl +++ b/projects/scripts/gtwiz_parser.pl @@ -1,12 +1,14 @@ #!/usr/bin/perl -w -################################################################################ +############################################################################### +## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved. +### SPDX short identifier: ADIBSD # # This script is meant to be used together with gtwizard_generator.tcl -# It parses and provides as output a list of unique parameters to a provided GT wizard configuration +# It parses and provides as output a list of unique parameters to a provided GT wizard configuration # Must be called from the project folder, where the IP instance is (*.gen/sources_1/ip) -# -################################################################################ +############################################################################### + use strict; use warnings; # use bigint; @@ -58,7 +60,7 @@ sub get_attribute_name { $xcvr_params_str = $xcvr_params_str=~s/$comment_regex/$subst/rg; # return the attribute block from the *_[COMMON|CHANNEL] instance - # Ultrascale/Ultrascale+ version + # Ultrascale/Ultrascale+ version # if ($xcvr_params_str =~ m/#\(((\n(.*\),\n){2,}).*\)\n)/) { # Version that works for both 7 series and Ultrascale/Ultrascale+ # This regex searches for the IP instance in the verilog code. In 7 series there are spaces at the begining of the line, while for Ultrascale there are not. After that searches for the name of the instance followed by spaces (0 or more) and a #. The next characters are maybe a \n followed by spaces and (. Going forward, it accepts \n followed by anything as long as it ends with '),'. Or a space followed by anything. The '?' is there to make the regex be non-greedy. The group after ( is searched for at least 2 times and must be followed by a ')\n'. This regex matches . with \n becouse of the /m at the end. @@ -78,7 +80,7 @@ sub get_attribute_name { # parse out the attribute names foreach my $i (0..$#xcvr_params) { # remove leading white space - $xcvr_params[$i] =~ s/^\s+//; + $xcvr_params[$i] =~ s/^\s+//; # remove trailing text, keep just the first word $xcvr_params[$i] =~ s/\s+.*$//; @@ -322,7 +324,7 @@ sub xcvr_default { } else { $default_attributes{$param} = $old_value; } - + } } @@ -713,7 +715,7 @@ sub prune_drp_access { foreach my $gt_ref_conf_attribute_key (keys %{ $$gt_drp_ref{$ref_conf}{$gt_ref_conf_type_key} }) { $is_generic = 1; foreach my $gt_drp_config_key (keys %{ $gt_drp_ref }) { - + if ($gt_drp_config_key ne $ref_conf) { if (exists $$gt_drp_ref{$gt_drp_config_key}{$gt_ref_conf_type_key}{$gt_ref_conf_attribute_key}) { if ($$gt_drp_ref{$gt_drp_config_key}{$gt_ref_conf_type_key}{$gt_ref_conf_attribute_key} eq '') {