From 86c9847c5fc14c2137aadb36125f04956f20fde0 Mon Sep 17 00:00:00 2001 From: Iulia Moldovan Date: Thu, 6 Jul 2023 17:28:03 +0300 Subject: [PATCH] Add copyright & license to .sh, .yml, .pl files. Edit Makefile for KV260 * Updated the Makefile for KV260 template as the copyright was not generated properly 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/common/kv260/Makefile | 2 +- projects/scripts/gtwiz_parser.pl | 18 ++++++++++-------- 7 files changed, 42 insertions(+), 11 deletions(-) diff --git a/.github/scripts/check_for_missing_readme_md.sh b/.github/scripts/check_for_missing_readme_md.sh index 2e2c4b4e4..47d9ecaa9 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 b39b6781a..f456eb6f5 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 4e49e7827..3a6c44653 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 c82dc4cba..bf46861d3 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 973fe5393..9812dd1d0 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/common/kv260/Makefile b/projects/common/kv260/Makefile index 7b9b1619e..5dc2f5197 100644 --- a/projects/common/kv260/Makefile +++ b/projects/common/kv260/Makefile @@ -1,5 +1,5 @@ #################################################################################### -## Copyright (c) 2023 Analog Devices, Inc. +## Copyright (c) 2018 - 2023 Analog Devices, Inc. ### SPDX short identifier: BSD-1-Clause ## Auto-generated, do not modify! #################################################################################### diff --git a/projects/scripts/gtwiz_parser.pl b/projects/scripts/gtwiz_parser.pl index 3581aedde..b6eb237ef 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 '') {