From cd8e24549327b93c3f7128cbd88b01c44f508f68 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 21 Oct 2023 21:30:48 +0200 Subject: [PATCH] updates project setup and launch configs --- .cproject | 2 +- .envrc | 9 +++++++ .launch/TGC-VP interp dhrystone.launch | 2 +- .launch/TGC-VP interp hello.launch | 2 +- .launch/TGC-VP tcc dhrystone.launch | 2 +- .launch/TGC-VP tcc hello.launch | 2 +- .launch/TGC-VP with pctrace.launch | 35 -------------------------- CMakeLists.txt | 2 ++ Modulefile | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/generate.sh | 32 ----------------------- 11 files changed, 18 insertions(+), 74 deletions(-) create mode 100644 .envrc delete mode 100644 .launch/TGC-VP with pctrace.launch delete mode 100644 tgc-iss/generate.sh diff --git a/.cproject b/.cproject index 1382e75..0737b1b 100644 --- a/.cproject +++ b/.cproject @@ -12,7 +12,7 @@ - + diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..bdad7ec --- /dev/null +++ b/.envrc @@ -0,0 +1,9 @@ +distro=`/bin/lsb_release -i -s` +if [ $distro == "CentOS" ]; then + . /opt/rh/devtoolset-8/enable + . /opt/rh/llvm-toolset-7/enable + . /opt/rh/rh-python38/enable +fi +module load ./Modulefile +layout python3 +[ -f .envrc.$USER ] && . .envrc.$USER diff --git a/.launch/TGC-VP interp dhrystone.launch b/.launch/TGC-VP interp dhrystone.launch index a1bc0d0..c2be0be 100644 --- a/.launch/TGC-VP interp dhrystone.launch +++ b/.launch/TGC-VP interp dhrystone.launch @@ -18,7 +18,7 @@ - + diff --git a/.launch/TGC-VP interp hello.launch b/.launch/TGC-VP interp hello.launch index 9b2a268..7f6f140 100644 --- a/.launch/TGC-VP interp hello.launch +++ b/.launch/TGC-VP interp hello.launch @@ -18,7 +18,7 @@ - + diff --git a/.launch/TGC-VP tcc dhrystone.launch b/.launch/TGC-VP tcc dhrystone.launch index 1c02e04..33341c6 100644 --- a/.launch/TGC-VP tcc dhrystone.launch +++ b/.launch/TGC-VP tcc dhrystone.launch @@ -18,7 +18,7 @@ - + diff --git a/.launch/TGC-VP tcc hello.launch b/.launch/TGC-VP tcc hello.launch index d854972..8664d4f 100644 --- a/.launch/TGC-VP tcc hello.launch +++ b/.launch/TGC-VP tcc hello.launch @@ -18,7 +18,7 @@ - + diff --git a/.launch/TGC-VP with pctrace.launch b/.launch/TGC-VP with pctrace.launch deleted file mode 100644 index 7f1e781..0000000 --- a/.launch/TGC-VP with pctrace.launch +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CMakeLists.txt b/CMakeLists.txt index 9504951..7fb1e73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,6 +177,8 @@ if(FW_BUILD) riscvfw GIT_REPOSITORY https://git.minres.com/VP/Firmwares.git GIT_TAG main + GIT_SHALLOW OFF + UPDATE_DISCONNECTED ON ) FetchContent_GetProperties(riscvfw) if(NOT riscvfw_POPULATED) diff --git a/Modulefile b/Modulefile index 67fc848..1ece628 100644 --- a/Modulefile +++ b/Modulefile @@ -12,5 +12,5 @@ if { $distro == "CentOS" && ![info exists ::env(PROJECT)] && ![info exists ::env puts stderr "Don't forget to execute 'scl enable devtoolset-7 llvm-toolset-7 bash'" } -module load tools/gcc-riscv32/9.2.0 +module load tools/gcc-riscv32-unknown-elf/11 module load tools/cmake diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 803414f..1d76c89 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 803414fa8c1bb1a73571e24e81ddc5f5fa42e218 +Subproject commit 1d76c895dba794d706f246e42d6e64224abec2a6 diff --git a/tgc-iss/generate.sh b/tgc-iss/generate.sh deleted file mode 100644 index b9bfb77..0000000 --- a/tgc-iss/generate.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -## - -if [ -z "${GENERATOR_HOME}" ]; then - if [ -z "${GENERATOR_HOME}" ]; then - echo "Please define GENERATOR_HOME to point to your CoreDSL source or GENERATOR_LOC to pint to your directory containing the jar" - exit 1 - else - export GENERATOR_LOC=${GENERATOR_HOME}/com.minres.coredsl.generator.repository/target - fi -fi -JAVA_OPTS="--add-modules ALL-SYSTEM --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED" - -GENERATOR="java $JAVA_OPTS -jar ${GENERATOR_LOC}/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar " - -CORE_NAME=$1 -BACKEND=$2 -CORE_NAME_LC=`echo $CORE_NAME | tr '[:upper:]' '[:lower:]' ` -INPUT_FILE=dbt-rise-tgc/gen_input/TGFS.core_desc - -REPO_DIR=dbt-rise-tgc/gen_input/CoreDSL-Instruction-Set-Description -TMPL_DIR=dbt-rise-tgc/gen_input/templates - -MAPPING="" -MAPPING="$MAPPING -m ${TMPL_DIR}/CORENAME.h.gtl:dbt-rise-tgc/src-gen/iss/arch/${CORE_NAME_LC}.h" -MAPPING="$MAPPING -m ${TMPL_DIR}/CORENAME.cpp.gtl:dbt-rise-tgc/src-gen/iss/arch/${CORE_NAME_LC}.cpp" -MAPPING="$MAPPING -m ${TMPL_DIR}/${BACKEND}/CORENAME.cpp.gtl:dbt-rise-tgc/src-gen/vm/${BACKEND}/vm_${CORE_NAME_LC}.cpp" - -[ -f ${GENERATOR_LOC}/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar ] || (cd ${GENERATOR_HOME}; mvn package) - -$GENERATOR -c $CORE_NAME -r $REPO_DIR $MAPPING $INPUT_FILE -