mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-06-27 17:01:10 -04:00
Checking commit
Some checks failed
CI / setup (push) Has been cancelled
CI / build (32) (push) Has been cancelled
CI / build (64) (push) Has been cancelled
CI / tests (cache, 32) (push) Has been cancelled
CI / tests (cache, 64) (push) Has been cancelled
CI / tests (config1, 32) (push) Has been cancelled
CI / tests (config1, 64) (push) Has been cancelled
CI / tests (config2, 32) (push) Has been cancelled
CI / tests (config2, 64) (push) Has been cancelled
CI / tests (debug, 32) (push) Has been cancelled
CI / tests (debug, 64) (push) Has been cancelled
CI / tests (opencl, 32) (push) Has been cancelled
CI / tests (opencl, 64) (push) Has been cancelled
CI / tests (regression, 32) (push) Has been cancelled
CI / tests (regression, 64) (push) Has been cancelled
CI / tests (scope, 32) (push) Has been cancelled
CI / tests (scope, 64) (push) Has been cancelled
CI / tests (stress, 32) (push) Has been cancelled
CI / tests (stress, 64) (push) Has been cancelled
CI / tests (synthesis, 32) (push) Has been cancelled
CI / tests (synthesis, 64) (push) Has been cancelled
CI / tests (vector, 32) (push) Has been cancelled
CI / tests (vector, 64) (push) Has been cancelled
CI / tests (vm, 32) (push) Has been cancelled
CI / tests (vm, 64) (push) Has been cancelled
CI / complete (push) Has been cancelled
Some checks failed
CI / setup (push) Has been cancelled
CI / build (32) (push) Has been cancelled
CI / build (64) (push) Has been cancelled
CI / tests (cache, 32) (push) Has been cancelled
CI / tests (cache, 64) (push) Has been cancelled
CI / tests (config1, 32) (push) Has been cancelled
CI / tests (config1, 64) (push) Has been cancelled
CI / tests (config2, 32) (push) Has been cancelled
CI / tests (config2, 64) (push) Has been cancelled
CI / tests (debug, 32) (push) Has been cancelled
CI / tests (debug, 64) (push) Has been cancelled
CI / tests (opencl, 32) (push) Has been cancelled
CI / tests (opencl, 64) (push) Has been cancelled
CI / tests (regression, 32) (push) Has been cancelled
CI / tests (regression, 64) (push) Has been cancelled
CI / tests (scope, 32) (push) Has been cancelled
CI / tests (scope, 64) (push) Has been cancelled
CI / tests (stress, 32) (push) Has been cancelled
CI / tests (stress, 64) (push) Has been cancelled
CI / tests (synthesis, 32) (push) Has been cancelled
CI / tests (synthesis, 64) (push) Has been cancelled
CI / tests (vector, 32) (push) Has been cancelled
CI / tests (vector, 64) (push) Has been cancelled
CI / tests (vm, 32) (push) Has been cancelled
CI / tests (vm, 64) (push) Has been cancelled
CI / complete (push) Has been cancelled
This commit is contained in:
parent
0a9f109338
commit
1d2d0f60a3
2 changed files with 0 additions and 192 deletions
176
configure
vendored
176
configure
vendored
|
@ -1,176 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright © 2019-2023
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# Determine the current working directory
|
|
||||||
CURRENT_DIR=$(pwd)
|
|
||||||
|
|
||||||
# Function to detect current OS
|
|
||||||
detect_osversion() {
|
|
||||||
local osversion="unsupported"
|
|
||||||
if [ -f /etc/os-release ]; then
|
|
||||||
. /etc/os-release # Source the os-release file to get OS information
|
|
||||||
case "$ID" in
|
|
||||||
ubuntu)
|
|
||||||
case "$VERSION_CODENAME" in
|
|
||||||
bionic) osversion="ubuntu/bionic";;
|
|
||||||
focal) osversion="ubuntu/focal";;
|
|
||||||
jammy) osversion="ubuntu/focal";;
|
|
||||||
noble) osversion="ubuntu/focal";;
|
|
||||||
# Add new versions as needed
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
centos)
|
|
||||||
case "$VERSION_ID" in
|
|
||||||
7) osversion="centos/7";;
|
|
||||||
# Add new versions as needed
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
echo "$osversion"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to recursively copy files, skipping the current directory
|
|
||||||
copy_files() {
|
|
||||||
local source_dir="$1"
|
|
||||||
local target_dir="$2"
|
|
||||||
#echo "source_dir=$source_dir, target_dir=$target_dir"
|
|
||||||
|
|
||||||
local same_dir=0
|
|
||||||
if [ "$(realpath "$source_dir")" == "$(realpath "$target_dir")" ]; then
|
|
||||||
same_dir=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Function to copy and update file
|
|
||||||
copy_and_update() {
|
|
||||||
local src_pattern="$1"
|
|
||||||
local dest_dir="$2"
|
|
||||||
for file in $src_pattern; do
|
|
||||||
#echo "*** $file > $dest_dir"
|
|
||||||
if [ -f "$file" ]; then
|
|
||||||
if [[ "$file" == *.in ]]; then
|
|
||||||
filename=$(basename -- "$file")
|
|
||||||
filename_no_ext="${filename%.in}"
|
|
||||||
dest_file="$dest_dir/$filename_no_ext"
|
|
||||||
mkdir -p "$dest_dir"
|
|
||||||
sed "s|@VORTEX_HOME@|$SOURCE_DIR|g; s|@XLEN@|$XLEN|g; s|@TOOLDIR@|$TOOLDIR|g; s|@OSVERSION@|$OSVERSION|g; s|@INSTALLDIR@|$PREFIX|g; s|@BUILDDIR@|$CURRENT_DIR|g" "$file" > "$dest_file"
|
|
||||||
# apply permissions to bash scripts
|
|
||||||
read -r firstline < "$dest_file"
|
|
||||||
if [[ "$firstline" =~ ^#!.*bash ]]; then
|
|
||||||
chmod +x "$dest_file"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ $same_dir -eq 0 ]; then
|
|
||||||
mkdir -p "$dest_dir"
|
|
||||||
cp -p "$file" "$dest_dir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
for pattern in "${SUBDIRS[@]}"; do
|
|
||||||
local full_copy=0
|
|
||||||
if [[ "$pattern" == !* ]]; then
|
|
||||||
full_copy=1
|
|
||||||
pattern=${pattern:1}
|
|
||||||
fi
|
|
||||||
local source_pattern="$source_dir/$pattern"
|
|
||||||
if [[ "$pattern" == "." ]]; then
|
|
||||||
source_pattern=$source_dir
|
|
||||||
fi
|
|
||||||
find "$source_dir" -type d -path "$source_pattern" 2>/dev/null | while read dir; do
|
|
||||||
# Compute the relative path of the directory
|
|
||||||
local rel_path="${dir#$source_dir}"
|
|
||||||
rel_path="${rel_path#/}" # Remove leading slash, if present
|
|
||||||
local full_target_dir="$target_dir/$rel_path"
|
|
||||||
|
|
||||||
# Copy and update Makefile and common.mk if they exist
|
|
||||||
if [ $full_copy -eq 1 ]; then
|
|
||||||
copy_and_update "$dir/*" "$full_target_dir"
|
|
||||||
else
|
|
||||||
copy_and_update "$dir/Makefile" "$full_target_dir"
|
|
||||||
copy_and_update "$dir/common.mk" "$full_target_dir"
|
|
||||||
copy_and_update "$dir/*.in" "$full_target_dir"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# default configuration parameters
|
|
||||||
default_xlen=32
|
|
||||||
default_tooldir=$HOME/tools
|
|
||||||
default_osversion=$(detect_osversion)
|
|
||||||
default_prefix=$CURRENT_DIR
|
|
||||||
|
|
||||||
# load default configuration parameters from existing config.mk
|
|
||||||
if [ -f "config.mk" ]; then
|
|
||||||
while IFS='=' read -r key value; do
|
|
||||||
value=${value//[@]/} # Remove placeholder characters
|
|
||||||
value="${value#"${value%%[![:space:]]*}"}" # Remove leading whitespace
|
|
||||||
value="${value%"${value##*[![:space:]]}"}" # Remove trailing whitespace
|
|
||||||
case $key in
|
|
||||||
XLEN\ ?*) default_xlen=${value//\?=/} ;;
|
|
||||||
TOOLDIR\ ?*) default_tooldir=${value//\?=/} ;;
|
|
||||||
OSVERSION\ ?*) default_osversion=${value//\?=/} ;;
|
|
||||||
PREFIX\ ?*) default_prefix=${value//\?=/} ;;
|
|
||||||
esac
|
|
||||||
done < config.mk
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set configuration parameters
|
|
||||||
XLEN=${XLEN:=$default_xlen}
|
|
||||||
TOOLDIR=${TOOLDIR:=$default_tooldir}
|
|
||||||
OSVERSION=${OSVERSION:=$default_osversion}
|
|
||||||
PREFIX=${PREFIX:=$default_prefix}
|
|
||||||
|
|
||||||
# parse command line arguments
|
|
||||||
usage() {
|
|
||||||
echo "Usage: $0 [--xlen=<value>] [--tooldir=<path>] [--osversion=<version>]"
|
|
||||||
echo " --xlen=<value> Set the XLEN value (default: 32)"
|
|
||||||
echo " --tooldir=<path> Set the TOOLDIR path (default: $HOME/tools)"
|
|
||||||
echo " --osversion=<version> Set the OS Version (default: $(detect_osversion))"
|
|
||||||
echo " --prefix=<path> Set installation directory"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
while [[ "$#" -gt 0 ]]; do
|
|
||||||
case $1 in
|
|
||||||
--xlen=*) XLEN="${1#*=}" ;;
|
|
||||||
--tooldir=*) TOOLDIR="${1#*=}" ;;
|
|
||||||
--osversion=*) OSVERSION="${1#*=}" ;;
|
|
||||||
--prefix=*) PREFIX="${1#*=}" ;;
|
|
||||||
-h|--help) usage ;;
|
|
||||||
*) echo "Unknown parameter passed: $1"; usage ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
# check OS
|
|
||||||
if [ "$OSVERSION" == "unsupported" ]; then
|
|
||||||
echo "Error: Unsupported OS."
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# project subdirectories to build
|
|
||||||
SUBDIRS=("." "!ci" "!perf" "hw*" "kernel*" "runtime*" "sim*" "tests*")
|
|
||||||
|
|
||||||
# Get the directory of the script
|
|
||||||
SOURCE_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
||||||
|
|
||||||
THIRD_PARTY_DIR=$SOURCE_DIR/third_party
|
|
||||||
|
|
||||||
copy_files "$SOURCE_DIR" "$CURRENT_DIR"
|
|
16
third_party/Makefile
vendored
16
third_party/Makefile
vendored
|
@ -1,16 +0,0 @@
|
||||||
all: cvfpu softfloat ramulator
|
|
||||||
|
|
||||||
cvfpu:
|
|
||||||
|
|
||||||
softfloat:
|
|
||||||
SPECIALIZE_TYPE=RISCV SOFTFLOAT_OPTS="-fPIC -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32" $(MAKE) -C softfloat/build/Linux-x86_64-GCC
|
|
||||||
|
|
||||||
ramulator/libramulator.so:
|
|
||||||
cd ramulator && mkdir -p build && cd build && cmake .. && make -j4
|
|
||||||
ramulator: ramulator/libramulator.so
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C softfloat/build/Linux-x86_64-GCC clean
|
|
||||||
rm -rf ramulator/build ramulator/libramulator.so
|
|
||||||
|
|
||||||
.PHONY: all cvfpu softfloat ramulator
|
|
Loading…
Add table
Add a link
Reference in a new issue