Skip to content

Commit

Permalink
Add copyright and license to .sh, .yml, .pl files
Browse files Browse the repository at this point in the history
Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
  • Loading branch information
IuliaCMoldovan committed Jul 7, 2023
1 parent 8b15d66 commit 049c553
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .github/scripts/check_for_missing_readme_md.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check_for_guideline_rules.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test_n_lint.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 6 additions & 1 deletion library/common/tb/generate_xml.sh
Original file line number Diff line number Diff line change
@@ -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`
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions library/common/tb/run_tb.sh
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
18 changes: 10 additions & 8 deletions projects/scripts/gtwiz_parser.pl
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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.
Expand All @@ -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+.*$//;
Expand Down Expand Up @@ -322,7 +324,7 @@ sub xcvr_default {
} else {
$default_attributes{$param} = $old_value;
}

}
}

Expand Down Expand Up @@ -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 '') {
Expand Down

0 comments on commit 049c553

Please sign in to comment.