From 1b6d5cbbc9c06396e46b93bbb5dcee7bce8a560e Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Sun, 22 Jan 2023 13:04:31 -0600 Subject: [PATCH] Added SPDX header to scripts. --- bin/elf2hex.sh | 28 +++++++++++++++-- bin/exe2memfile.pl | 36 ++++++++++++++++++--- bin/extractFunctionRadix.sh | 55 ++++++++++++++++----------------- bin/parseHPMC.py | 25 +++++++++++++++ bin/testcount.pl | 33 +++++++++++++++++--- bin/testlist.pl | 33 +++++++++++++++++--- bin/vclean.pl | 33 +++++++++++++++++--- bin/wally-tool-chain-install.sh | 2 +- 8 files changed, 195 insertions(+), 50 deletions(-) diff --git a/bin/elf2hex.sh b/bin/elf2hex.sh index 5808f410..56f28613 100755 --- a/bin/elf2hex.sh +++ b/bin/elf2hex.sh @@ -1,8 +1,30 @@ #!/bin/bash -# james.stine@okstate.edu 4 Jan 2022 -# Script to run elf2hex for memfile for -# Imperas and riscv-arch-test benchmarks +########################################### +## Written: james.stine@okstate.edu +## Created: 4 Jan 2022 +## Modified: +## +## Purpose: Script to run elf2hex for memfile for +## Imperas and riscv-arch-test benchmarks +## +## A component of the CORE-V-WALLY configurable RISC-V project. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ for file in work/rv64i_m/*/*.elf ; do memfile=${file%.elf}.elf.memfile diff --git a/bin/exe2memfile.pl b/bin/exe2memfile.pl index 70e51167..2af665bb 100755 --- a/bin/exe2memfile.pl +++ b/bin/exe2memfile.pl @@ -1,9 +1,35 @@ #!/usr/bin/perl -w -# exe2memfile.pl -# David_Harris@hmc.edu 26 November 2020 -# Converts an executable file to a series of 32-bit hex instructions -# to read into a Verilog simulation with $readmemh +########################################### +## exe2memfile.pl +## +## Written: David_Harris@hmc.edu +## Created: 26 November 2020 +## Modified: +## +## Purpose: Converts an executable file to a series of 32-bit hex instructions +## to read into a Verilog simulation with $readmemh +## +## A component of the CORE-V-WALLY configurable RISC-V project. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ + +# +# use File::stat; use IO::Handle; @@ -167,4 +193,4 @@ sub fixadr { my $adr = shift; if ($adr =~ s/^8/0/) { return hex($adr); } else { die("address $adr lacks leading 8\n"); } -} \ No newline at end of file +} diff --git a/bin/extractFunctionRadix.sh b/bin/extractFunctionRadix.sh index cb37f537..42e3db0b 100755 --- a/bin/extractFunctionRadix.sh +++ b/bin/extractFunctionRadix.sh @@ -1,34 +1,33 @@ #!/bin/bash ###################### -# extractFunctionRadix.sh -# -# Written: Ross Thompson -# email: ross1728@gmail.com -# Created: March 1, 2021 -# Modified: March 10, 2021 -# -# Purpose: Processes all compiled object files into 2 types of files which assist in debuging applications. -# File 1: .addr: A sorted list of function starting addresses. -# When a the PCE is greater than or equal to the function's starting address, the label will be associated with this address. -# File 2: .lab: A sorted list of funciton labels. The names of functions. Modelsim will display these names rather than the function address. -# -# A component of the Wally configurable RISC-V project. -# -# Copyright (C) 2021 Harvey Mudd College & Oklahoma State University -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, -# modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software -# is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT -# OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -###################### +## extractFunctionRadix.sh +## +## Written: Ross Thompson +## email: ross1728@gmail.com +## Created: March 1, 2021 +## Modified: March 10, 2021 +## +## Purpose: Processes all compiled object files into 2 types of files which assist in debuging applications. +## File 1: .addr: A sorted list of function starting addresses. +## When a the PCE is greater than or equal to the function's starting address, the label will be associated with this address. +## File 2: .lab: A sorted list of funciton labels. The names of functions. Modelsim will display these names rather than the function address. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ function processProgram { diff --git a/bin/parseHPMC.py b/bin/parseHPMC.py index 2bc998e5..00dcb308 100755 --- a/bin/parseHPMC.py +++ b/bin/parseHPMC.py @@ -1,5 +1,30 @@ #!/usr/bin/python3 +########################################### +## Written: Ross Thompson ross1728@gmail.com +## Created: 4 Jan 2022 +## Modified: +## +## Purpose: Parses the performance counters from a modelsim trace. +## +## A component of the CORE-V-WALLY configurable RISC-V project. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ + import os import sys import matplotlib.pyplot as plt diff --git a/bin/testcount.pl b/bin/testcount.pl index 65d66229..e801ed0e 100755 --- a/bin/testcount.pl +++ b/bin/testcount.pl @@ -1,8 +1,33 @@ #!/bin/bash -# testcount.pl -# David_Harris@hmc.edu 25 December 2022 -# Read the riscv-test-suite directories from riscv-arch-test -# and count how many tests are in each + +########################################### +## testcount.pl +## +## Written: David_Harris@hmc.edu +## Created: 25 December 2022 +## Modified: Read the riscv-test-suite directories from riscv-arch-test +## and count how many tests are in each +## +## Purpose: Read the riscv-test-suite directories from riscv-arch-test +## and count how many tests are in each +## +## A component of the CORE-V-WALLY configurable RISC-V project. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ for dir in `ls ${WALLY}/addins/riscv-arch-test/riscv-test-suite/rv*/*` do diff --git a/bin/testlist.pl b/bin/testlist.pl index 12be0a91..655cdd6f 100755 --- a/bin/testlist.pl +++ b/bin/testlist.pl @@ -1,8 +1,33 @@ #!/bin/perl -W -# testlist.pl -# David_Harris@hmc.edu 25 December 2021 -# Read the work directories from riscv-arch-test or imperas-riscv-tests -# and generate a list of tests and signature addresses for tests.vh + +########################################### +## testlist.pl +## +## Written: David_Harris@hmc.edu +## Created: 25 December 2021 +## Modified: +## +## Purpose: Read the work directories from riscv-arch-test or imperas-riscv-tests +## and generate a list of tests and signature addresses for tests.vh +## +## A component of the CORE-V-WALLY configurable RISC-V project. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ + use strict; use warnings; diff --git a/bin/vclean.pl b/bin/vclean.pl index 2bc25d3d..f947ed9d 100755 --- a/bin/vclean.pl +++ b/bin/vclean.pl @@ -1,9 +1,32 @@ #!/usr/bin/perl -w -# vclean.pl -# David_Harris@hmc.edu 7 December 2023 -# Identifies unused signals in Verilog files -# verilator should do this, but it also reports partially used signals +########################################### +## vclean.pl +## +## Written: David_Harris@hmc.edu +## Created: 7 December 2023 +## Modified: +## +## Purpose: Identifies unused signals in Verilog files +## verilator should do this, but it also reports partially used signals +## +## A component of the CORE-V-WALLY configurable RISC-V project. +## +## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +## +## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +## +## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +## except in compliance with the License, or, at your option, the Apache License version 2.0. You +## may obtain a copy of the License at +## +## https:##solderpad.org/licenses/SHL-2.1/ +## +## Unless required by applicable law or agreed to in writing, any work distributed under the +## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +## either express or implied. See the License for the specific language governing permissions +## and limitations under the License. +################################################################################################ use strict; @@ -43,4 +66,4 @@ sub clean { printf("$sig not used in $fname\n"); } } -} \ No newline at end of file +} diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index dbed6ed8..3265795c 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -1,6 +1,6 @@ #!/bin/bash ########################################### -## cache +## Tool chain install script. ## ## Written: Ross Thompson ross1728@gmail.com ## Created: 18 January 2023