From c0bae483c1760144e2bd92b4a29e86472874b7d5 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 9 Jul 2024 13:52:37 +0200 Subject: [PATCH 01/73] updates submodules --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 346b177..fb4012f 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 346b177a87b8bfa9f3e895e63910f9c7cf7a1561 +Subproject commit fb4012fbd180d167447370b568750fcdab61bfd1 From e8037b9c27a59105fad6f469a44df79a63f845f6 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 9 Jul 2024 13:57:43 +0200 Subject: [PATCH 02/73] updates dbt-rise-tgc --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index fb4012f..63da7f8 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit fb4012fbd180d167447370b568750fcdab61bfd1 +Subproject commit 63da7f8d57fab339530e2ac4c808ff71ff3c4941 From b118b43988943c6309fffaceadf6c0d47a99e774 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Mon, 8 Jul 2024 11:48:11 +0200 Subject: [PATCH 03/73] upgrades cxx version for std::variant in vmbase, updates asmjit and reorder for proper build --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d7626a..2dbb725 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") option(WITH_LLVM "Build LLVM backend" OFF) option(WITH_ASMJIT "Build ASMJIT backend" OFF) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -98,7 +98,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=True) endif() if(WITH_ASMJIT) - list(APPEND CONAN_PACKAGE_LIST asmjit/cci.20230325) + list(APPEND CONAN_PACKAGE_LIST asmjit/cci.20240531) list(APPEND CONAN_PACKAGE_OPTIONS asmjit:shared=False) endif() if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dbt-rise-plugins) From 856e251be49a1e18ba4d5a0c1d9de490799d6506 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 10 Jul 2024 12:57:13 +0200 Subject: [PATCH 04/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index b725ff3..1612982 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit b725ff307be15ae274b5b4e97bcb73856212b1b4 +Subproject commit 1612982e4997dd35d1eac37e27966cb4bdf26c84 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 63da7f8..149b313 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 63da7f8d57fab339530e2ac4c808ff71ff3c4941 +Subproject commit 149b3136d26ef0edbb810b24977c274079d35363 diff --git a/scc b/scc index 59d07fb..7e07770 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 59d07fbc6678f5676dc508925ed1982007e350f1 +Subproject commit 7e0777089bc86d60557ebe25d34d3f7244d97b53 From cc61e0b476c577708746ca5f89215256828b5e53 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 10 Jul 2024 13:16:11 +0200 Subject: [PATCH 05/73] changes dockerless to local --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d21ea3d..c25d9c4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,25 +47,25 @@ pipeline { stage("Test interp") { steps { sh "mkdir interp" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w interp --dockerless --backend interp" + sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w interp --local --backend interp" } } stage("Test tcc") { steps { sh "mkdir tcc" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w tcc --dockerless --backend tcc" + sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w tcc --local --backend tcc" } } stage("Test asmjit") { steps { sh "mkdir asmjit" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w asmjit --dockerless --backend asmjit" + sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w asmjit --local --backend asmjit" } } stage("Test llvm") { steps { sh "mkdir llvm" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w llvm --dockerless --backend llvm" + sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w llvm --local --backend llvm" } } } From ab4a0eeb6e868d6fa21ab232fa5016c91f721432 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 08:41:16 +0200 Subject: [PATCH 06/73] updates submodule --- dbt-rise-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-core b/dbt-rise-core index 1612982..245b842 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 1612982e4997dd35d1eac37e27966cb4bdf26c84 +Subproject commit 245b842e9487d2b249f8513f7014705fe00e68cb From fa1c96024785ccbafec750a186c045269179118a Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 09:41:06 +0200 Subject: [PATCH 07/73] updates Jenkinsfile --- Jenkinsfile | 89 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c25d9c4..7481bb5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,56 +19,71 @@ pipeline { agent { docker { image 'git.minres.com/tooling/riscof_sail:latest' - args ' -e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail' + args '-e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail' } } stages { - stage("Checkout TGC-ISS"){ - steps { - checkout_project("https://git.minres.com/TGFS/TGC-ISS.git", "develop") - } - } - stage("build TGC-ISS"){ - steps { - sh 'conan profile new default --detect --force ' - sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' - sh 'cmake --build build -j' - } - } - stage("Checkout TGC-Compliance"){ + stage("Checkout TGC-Compliance and TGC-GEN"){ steps { dir("TGC-COMPLIANCE"){ checkout_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master") } + dir("TGC-GEN"){ + checkout_project("https://git.minres.com/TGFS/TGC-GEN.git", "develop") + } } } - stage("Test backends"){ - parallel { - stage("Test interp") { - steps { - sh "mkdir interp" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w interp --local --backend interp" + stage("generate cores and build TGC-ISS"){ + steps { + sh 'TGC-COMPLIANCE/scripts/generate_all -o dbt-rise-tgc' + sh 'conan profile new default --detect --force' + sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' + sh 'cmake --build build -j' + } + } + stage('ACT 32bit') { + matrix { + axes { + axis { + name 'CORE' + values 'TGC5A', 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E' + } + axis { + name 'BACKEND' + values 'interp', 'llvm', 'tcc', 'asmjit' } } - stage("Test tcc") { - steps { - sh "mkdir tcc" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w tcc --local --backend tcc" - } - } - stage("Test asmjit") { - steps { - sh "mkdir asmjit" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w asmjit --local --backend asmjit" - } - } - stage("Test llvm") { - steps { - sh "mkdir llvm" - sh "python3 TGC-COMPLIANCE/run_act.py -core TGC5C -sim build/dbt-rise-tgc/tgc-sim -w llvm --local --backend llvm" + stages { + stage('Run riscof') { + steps { + sh "mkdir ${BACKEND}" + sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" + } } } } - } + } + stage('ACT 64bit') { + matrix { + axes { + axis { + name 'CORE' + values 'TGC6B', 'TGC6C', 'TGC6D', 'TGC6E' + } + axis { + name 'BACKEND' + values 'interp', 'llvm', 'asmjit' + } + } + stages { + stage('Run riscof') { + steps { + sh "mkdir ${BACKEND}" + sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" + } + } + } + } + } } } From 8de84ca4beeb4d734a3655fa25039a4038a41674 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 09:46:25 +0200 Subject: [PATCH 08/73] fixes typo --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7481bb5..12e726f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,7 @@ pipeline { } stage("generate cores and build TGC-ISS"){ steps { - sh 'TGC-COMPLIANCE/scripts/generate_all -o dbt-rise-tgc' + sh 'TGC-GEN/scripts/generate_all -o dbt-rise-tgc' sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' From 3d657d42bc05e5c04e79629980e1d1a270f3feb8 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 09:52:02 +0200 Subject: [PATCH 09/73] fixes typo yet again --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 12e726f..c56a796 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,7 @@ pipeline { } stage("generate cores and build TGC-ISS"){ steps { - sh 'TGC-GEN/scripts/generate_all -o dbt-rise-tgc' + sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' From c99a7982b7d8928f4e2346a0f3e147fd4e5c50dc Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 10:04:35 +0200 Subject: [PATCH 10/73] adds seperate image for core gen --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c56a796..8ffc469 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,9 +33,14 @@ pipeline { } } } - stage("generate cores and build TGC-ISS"){ + stage("generate cores "){ + agent {docker { image 'ubuntu-riscv' } } steps { sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' + } + } + stage("build TGC-ISS"){ + steps { sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' From 21ca5aee7aebf93005cac665a8bdc9bd605a51fd Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 10:14:46 +0200 Subject: [PATCH 11/73] different agents for different stages --- Jenkinsfile | 96 ++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8ffc469..ff20725 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,12 +16,6 @@ void checkout_project(String repoUrl, String branch = 'develop') { } pipeline { - agent { - docker { - image 'git.minres.com/tooling/riscof_sail:latest' - args '-e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail' - } - } stages { stage("Checkout TGC-Compliance and TGC-GEN"){ steps { @@ -33,58 +27,64 @@ pipeline { } } } - stage("generate cores "){ - agent {docker { image 'ubuntu-riscv' } } + stage("generate cores and build TGC-ISS"){ + agent {docker { image 'ubuntu-riscv' }} steps { sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' - } - } - stage("build TGC-ISS"){ - steps { sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' } } - stage('ACT 32bit') { - matrix { - axes { - axis { - name 'CORE' - values 'TGC5A', 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E' - } - axis { - name 'BACKEND' - values 'interp', 'llvm', 'tcc', 'asmjit' - } - } - stages { - stage('Run riscof') { - steps { - sh "mkdir ${BACKEND}" - sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" + stage{ + agent { + docker { + image 'git.minres.com/tooling/riscof_sail:latest' + args ' -e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail' + } + } + stages { + stage('ACT 32bit') { + matrix { + axes { + axis { + name 'CORE' + values 'TGC5A', 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E' + } + axis { + name 'BACKEND' + values 'interp', 'llvm', 'tcc', 'asmjit' + } + } + stages { + stage('Run riscof') { + steps { + sh "mkdir ${BACKEND}" + sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" + } + } } } } - } - } - stage('ACT 64bit') { - matrix { - axes { - axis { - name 'CORE' - values 'TGC6B', 'TGC6C', 'TGC6D', 'TGC6E' - } - axis { - name 'BACKEND' - values 'interp', 'llvm', 'asmjit' - } - } - stages { - stage('Run riscof') { - steps { - sh "mkdir ${BACKEND}" - sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" + stage('ACT 64bit') { + matrix { + axes { + axis { + name 'CORE' + values 'TGC6B', 'TGC6C', 'TGC6D', 'TGC6E' + } + axis { + name 'BACKEND' + values 'interp', 'llvm', 'asmjit' + } + } + stages { + stage('Run riscof') { + steps { + sh "mkdir ${BACKEND}" + sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" + } + } } } } From 99e36acbae9580f134c850963153655fc0bbaeaa Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 10:19:56 +0200 Subject: [PATCH 12/73] fixes bugs --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff20725..51c85d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,6 +16,7 @@ void checkout_project(String repoUrl, String branch = 'develop') { } pipeline { + agent any stages { stage("Checkout TGC-Compliance and TGC-GEN"){ steps { @@ -27,7 +28,7 @@ pipeline { } } } - stage("generate cores and build TGC-ISS"){ + stage("Generate cores and build TGC-ISS"){ agent {docker { image 'ubuntu-riscv' }} steps { sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' @@ -36,7 +37,7 @@ pipeline { sh 'cmake --build build -j' } } - stage{ + stage("Run test suite") { agent { docker { image 'git.minres.com/tooling/riscof_sail:latest' From 5c31d06a58edc01c97ee4da277469abef024c979 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 10:24:49 +0200 Subject: [PATCH 13/73] . --- Jenkinsfile | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 51c85d8..3bfa175 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,23 +18,27 @@ void checkout_project(String repoUrl, String branch = 'develop') { pipeline { agent any stages { - stage("Checkout TGC-Compliance and TGC-GEN"){ - steps { - dir("TGC-COMPLIANCE"){ - checkout_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master") - } - dir("TGC-GEN"){ - checkout_project("https://git.minres.com/TGFS/TGC-GEN.git", "develop") - } - } - } - stage("Generate cores and build TGC-ISS"){ + stage("Checkout and build"){ agent {docker { image 'ubuntu-riscv' }} - steps { - sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' - sh 'conan profile new default --detect --force' - sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' - sh 'cmake --build build -j' + stages{ + stage("Checkout TGC-Compliance and TGC-GEN"){ + steps { + dir("TGC-COMPLIANCE"){ + checkout_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master") + } + dir("TGC-GEN"){ + checkout_project("https://git.minres.com/TGFS/TGC-GEN.git", "develop") + } + } + } + stage("Generate cores and build TGC-ISS"){ + steps { + sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' + sh 'conan profile new default --detect --force' + sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' + sh 'cmake --build build -j' + } + } } } stage("Run test suite") { From 3da38170ff389b9c81f7b4566b15c92b00adb140 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 10:53:59 +0200 Subject: [PATCH 14/73] generates cores manually --- Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3bfa175..528bf44 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,11 @@ pipeline { } stage("Generate cores and build TGC-ISS"){ steps { - sh 'TGC-GEN/scripts/generate_all.sh -o dbt-rise-tgc' + sh 'for core in TGC5A TGC5B TGC5D TGC5E TGC6B TGC6C TGC6D TGC6E; do + for backend in interp llvm tcc asmjit; do + TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc + done + done' sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' @@ -44,8 +48,8 @@ pipeline { stage("Run test suite") { agent { docker { - image 'git.minres.com/tooling/riscof_sail:latest' - args ' -e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail' + image 'git.minres.com/tooling/riscof_sail:latest' + args ' -e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail' } } stages { From c2056c30f38ebaec0045835b9505d98fa085a404 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 10:55:27 +0200 Subject: [PATCH 15/73] fixes syntax for multiline command --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 528bf44..861f809 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,11 +33,13 @@ pipeline { } stage("Generate cores and build TGC-ISS"){ steps { - sh 'for core in TGC5A TGC5B TGC5D TGC5E TGC6B TGC6C TGC6D TGC6E; do + sh ''' + for core in TGC5A TGC5B TGC5D TGC5E TGC6B TGC6C TGC6D TGC6E; do for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done - done' + done + ''' sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' From 8811f13d1cceca026ace317cbf4c4a1af8693c3a Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 11:23:17 +0200 Subject: [PATCH 16/73] checks out ISS explicitly --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 861f809..3eae5d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ void checkout_project(String repoUrl, String branch = 'develop') { ], extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules: false] + [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules: false, shallow: true] ], submoduleCfg: [], userRemoteConfigs: [ @@ -23,6 +23,7 @@ pipeline { stages{ stage("Checkout TGC-Compliance and TGC-GEN"){ steps { + checkout_project("https://git.minres.com/TGFS/TGC-ISS.git", "develop") dir("TGC-COMPLIANCE"){ checkout_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master") } From 45e5ab6133d9c2577228a60c2a65c0dcb82e1e13 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 11:26:54 +0200 Subject: [PATCH 17/73] cleans repo before checkout --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 3eae5d6..7e0f85c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,7 @@ pipeline { stages{ stage("Checkout TGC-Compliance and TGC-GEN"){ steps { + sh 'rm -rf * .??* ' checkout_project("https://git.minres.com/TGFS/TGC-ISS.git", "develop") dir("TGC-COMPLIANCE"){ checkout_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master") From c4a746d4c86ea4e8149ecd9911fddb666a05e488 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 12:41:14 +0200 Subject: [PATCH 18/73] splits 32 and 64 bits, disables RVE for now --- Jenkinsfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7e0f85c..9ffbb2a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,11 +36,16 @@ pipeline { stage("Generate cores and build TGC-ISS"){ steps { sh ''' - for core in TGC5A TGC5B TGC5D TGC5E TGC6B TGC6C TGC6D TGC6E; do + for core in TGC5B TGC5D TGC5E; do #TGC5A for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done done + for core in TGC6B TGC6C TGC6D TGC6E; do + for backend in interp llvm asmjit; do + TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc + done + done ''' sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' @@ -62,7 +67,7 @@ pipeline { axes { axis { name 'CORE' - values 'TGC5A', 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E' + values 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E' // TGC5A } axis { name 'BACKEND' From c0e557316f7e3f8f5a46ca0f5cc15dbab450d135 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 12:59:43 +0200 Subject: [PATCH 19/73] adds switch to mkdir --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9ffbb2a..9fd7f6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,7 +77,7 @@ pipeline { stages { stage('Run riscof') { steps { - sh "mkdir ${BACKEND}" + sh "mkdir -p ${BACKEND}" sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" } } @@ -99,7 +99,7 @@ pipeline { stages { stage('Run riscof') { steps { - sh "mkdir ${BACKEND}" + sh "mkdir -p ${BACKEND}" sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}" } } From 2a0899a6710bea2f0db25ece0f94d51b9df4e295 Mon Sep 17 00:00:00 2001 From: stas Date: Thu, 11 Jul 2024 14:06:07 +0200 Subject: [PATCH 20/73] adjust cache line size --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 149b313..9996fd4 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 149b3136d26ef0edbb810b24977c274079d35363 +Subproject commit 9996fd483322c16c4c01b1aad3825c500d4cd383 From 6ee4840d8d5edf2764923f90d8ed2aeb9e9b2f68 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 15:46:51 +0200 Subject: [PATCH 21/73] removes TGC5B from testing --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9fd7f6b..325ea24 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { stage("Generate cores and build TGC-ISS"){ steps { sh ''' - for core in TGC5B TGC5D TGC5E; do #TGC5A + for core in TGC5C TGC5D TGC5E; do #TGC5A TGC5B for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done From 6ce8eada3e323de7dfd12493d4dc6faa02a39203 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 16:37:21 +0200 Subject: [PATCH 22/73] removes TGC5C from generation as it is already in TGC-ISS --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 325ea24..fff95c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { stage("Generate cores and build TGC-ISS"){ steps { sh ''' - for core in TGC5C TGC5D TGC5E; do #TGC5A TGC5B + for core in TGC5D TGC5E; do #TGC5A TGC5B for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done From c365d4f822c54eb851a451bf73634b6ca4af872d Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 11 Jul 2024 22:05:07 +0200 Subject: [PATCH 23/73] removes TGC5B from testing as it is also not generated atm --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fff95c6..e7bc95f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ pipeline { axes { axis { name 'CORE' - values 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E' // TGC5A + values 'TGC5C', 'TGC5D', 'TGC5E' // TGC5A, 'TGC5B', } axis { name 'BACKEND' From db0d125651bc40e2fa924361aabc32f54dd43cf7 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 18 Jul 2024 14:21:24 +0200 Subject: [PATCH 24/73] adds Debug tools --- .gitignore | 1 - Debug/.gitignore | 5 + Debug/create_reg_traces.py | 154 ++++++++++++++++++++ {scripts => Debug}/makeJitOutputReadable.py | 0 Debug/offsets.txt | 43 ++++++ Debug/simplify_sail_trace.py | 29 ++++ Debug/simplify_tgc_trace.py | 26 ++++ 7 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 Debug/.gitignore create mode 100644 Debug/create_reg_traces.py rename {scripts => Debug}/makeJitOutputReadable.py (100%) create mode 100644 Debug/offsets.txt create mode 100644 Debug/simplify_sail_trace.py create mode 100644 Debug/simplify_tgc_trace.py diff --git a/.gitignore b/.gitignore index 614430a..577e7ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /build/ -/Debug/ .settings /.venv* /Debug-PA/ diff --git a/Debug/.gitignore b/Debug/.gitignore new file mode 100644 index 0000000..25f9233 --- /dev/null +++ b/Debug/.gitignore @@ -0,0 +1,5 @@ +*.log +*.dis +*.asm +*.ll +*tcc_* diff --git a/Debug/create_reg_traces.py b/Debug/create_reg_traces.py new file mode 100644 index 0000000..58d9351 --- /dev/null +++ b/Debug/create_reg_traces.py @@ -0,0 +1,154 @@ +import argparse +import os +import shutil +import subprocess +from pathlib import Path + + +def validate_elf_file(filepath: str) -> str: + if not os.path.isfile(filepath): + raise argparse.ArgumentTypeError(f"{filepath} is not a valid file.") + + # Use the 'file' command to check if it's an ELF file + result = subprocess.run( + ["file", filepath], capture_output=True, text=True, check=False + ) + if "ELF" not in result.stdout: + raise argparse.ArgumentTypeError(f"{filepath} is not a valid ELF file.") + + return filepath + + +def run_test_and_move_output(elf_file: str, backend: str, isa: str = "tgc5c") -> None: + # Call 'test' with the specified backend mode + os.chdir(Path(__file__).parent.parent) + sim_path = "build/Debug/dbt-rise-tgc/tgc-sim" + run_command = [ + sim_path, + "-f", + elf_file, + "--backend", + backend, + "--isa", + isa, + "-p", + "build/Debug/dbt-rise-plugins/pctrace/pctrace.so=dbt-rise-tgc/contrib/instr/TGC5C_instr.yaml", + "-i", + "10000", + ] + print(f"Running: \n{' '.join(run_command)}") + try: + subprocess.run(run_command, check=False, timeout=10) + except subprocess.TimeoutExpired: + print("Execution timed out") + + # Move the output.trc file + if os.path.exists("output.trc"): + shutil.move("output.trc", f"Debug/{backend}.trc") + else: + print( + f"output.trc does not exist after running with backend {backend}, so it cannot be renamed." + ) + + +def create_shortened_diff_files(backend: str) -> None: + file1_path = "Debug/interp.trc" + file2_path = f"Debug/{backend}.trc" + + def validate_file(filepath: str) -> str: + if not os.path.isfile(filepath): + raise ValueError(f"{filepath} is not a valid file.") + return filepath + + file1_path = validate_file(file1_path) + file2_path = validate_file(file2_path) + + with open(file1_path, "r", encoding="utf8") as file1, open( + file2_path, "r", encoding="utf8" + ) as file2: + lines1 = file1.readlines() + lines2 = file2.readlines() + + diff_index = -1 + for index, (line1, line2) in enumerate(zip(lines1, lines2)): + if line1 != line2: + diff_index = index + break + + if diff_index == -1: + print("The files are identical.") + return + + start_index = max(0, diff_index - 5) + end_index = min(len(lines1), diff_index + 6) + + shortened_lines1 = lines1[start_index:end_index] + shortened_lines2 = lines2[start_index:end_index] + + with open("Debug/short_interp.trc", "w", encoding="utf8") as short_file1: + short_file1.writelines(shortened_lines1) + + with open(f"Debug/short_{backend}.trc", "w", encoding="utf8") as short_file2: + short_file2.writelines(shortened_lines2) + + +def create_disassembly(elf_file_path: str) -> None: + def validate_file(filepath: str) -> str: + if not os.path.isfile(filepath): + raise ValueError(f"{filepath} is not a valid file.") + return filepath + + elf_file_path = validate_file(elf_file_path) + + output_file_path = "Debug/dut.dis" + with open(output_file_path, "w", encoding="utf8") as output_file: + subprocess.run( + [ + "riscv64-unknown-elf-objdump", + "-d", + "-Mnumeric", + "-Mno-aliases", + elf_file_path, + ], + stdout=output_file, + check=True, + ) + + +def main(args: argparse.Namespace) -> None: + elf_file = args.elf_file + backend = args.backend + isa = args.isa + + # Set environment variable + os.environ["REGDUMP"] = "True" + + # Run the tests and move the output files + run_test_and_move_output(elf_file, "interp", isa) + run_test_and_move_output(elf_file, backend, isa) + create_shortened_diff_files(backend) + create_disassembly(elf_file) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Process an ELF file with a specified backend. Generates register traces for interp and the specified backend" + ) + parser.add_argument( + "elf_file", type=validate_elf_file, help="The ELF file to be processed." + ) + parser.add_argument( + "--backend", + type=str, + default="amsjit", + help="The backend to be used. Default is amsjit.", + required=False, + ) + parser.add_argument( + "--isa", + type=str, + default="tgc5c", + help="The isa to be used. Default 'tgc5c'", + required=False, + ) + main(args=parser.parse_args()) diff --git a/scripts/makeJitOutputReadable.py b/Debug/makeJitOutputReadable.py similarity index 100% rename from scripts/makeJitOutputReadable.py rename to Debug/makeJitOutputReadable.py diff --git a/Debug/offsets.txt b/Debug/offsets.txt new file mode 100644 index 0000000..89b10f3 --- /dev/null +++ b/Debug/offsets.txt @@ -0,0 +1,43 @@ +X0 (zero) : 0 (0x00) +X1 (ra) : 4 (0x04) +X2 (sp) : 8 (0x08) +X3 (gp) : 12 (0x0c) +X4 (tp) : 16 (0x10) +X5 (t0) : 20 (0x14) +X6 (t1) : 24 (0x18) +X7 (t2) : 28 (0x1c) +X8 (s0/fp): 32 (0x20) +X9 (s1) : 36 (0x24) +X10 (a0) : 40 (0x28) +X11 (a1) : 44 (0x2c) +X12 (a2) : 48 (0x30) +X13 (a3) : 52 (0x34) +X14 (a4) : 56 (0x38) +X15 (a5) : 60 (0x3c) +X16 (a6) : 64 (0x40) +X17 (a7) : 68 (0x44) +X18 (s2) : 72 (0x48) +X19 (s3) : 76 (0x4c) +X20 (s4) : 80 (0x50) +X21 (s5) : 84 (0x54) +X22 (s6) : 88 (0x58) +X23 (s7) : 92 (0x5c) +X24 (s8) : 96 (0x60) +X25 (s9) : 100 (0x64) +X26 (s10) : 104 (0x68) +X27 (s11) : 108 (0x6c) +X28 (t3) : 112 (0x70) +X29 (t4) : 116 (0x74) +X30 (t5) : 120 (0x78) +X31 (t6) : 124 (0x7c) +PC : 128 (0x80) +NEXT_PC : 132 (0x84) +PRIV : 136 (0x88) +DPC : 137 (0x89) +trap_state : 141 (0x8d) +pending_trap : 145 (0x91) +icount : 149 (0x95) +cycle : 157 (0x9d) +instret : 165 (0xa5) +instruction : 173 (0xad) +last_branch : 177 (0xb1) diff --git a/Debug/simplify_sail_trace.py b/Debug/simplify_sail_trace.py new file mode 100644 index 0000000..384ae9c --- /dev/null +++ b/Debug/simplify_sail_trace.py @@ -0,0 +1,29 @@ +import argparse +import re + + +def simplify_trace(input_file, output_file): + with open(input_file, "r") as infile, open(output_file, "w") as outfile: + for line in infile: + # Enhanced regex to match the instruction number, mode, and PC + match = re.search(r"\[\d+\] \[[MI]\]: (0x[0-9A-Fa-f]+)", line) + if match: + pc = match.group(1).lower() + outfile.write(f"{pc}\n") + + +def main(): + parser = argparse.ArgumentParser( + description="Simplify a trace from an instruction set simulator." + ) + parser.add_argument("input_file", type=str, help="The input trace file") + parser.add_argument( + "output_file", type=str, help="The output file for the simplified trace" + ) + + args = parser.parse_args() + simplify_trace(args.input_file, args.output_file) + + +if __name__ == "__main__": + main() diff --git a/Debug/simplify_tgc_trace.py b/Debug/simplify_tgc_trace.py new file mode 100644 index 0000000..004c74c --- /dev/null +++ b/Debug/simplify_tgc_trace.py @@ -0,0 +1,26 @@ +import argparse + + +def simplify_trace(input_file, output_file): + with open(input_file, "r") as infile, open(output_file, "w") as outfile: + for line in infile: + # Split the line by the first comma and take the PC part + pc = line.split(",")[0].strip().lower() + outfile.write(f"{pc}\n") + + +def main(): + parser = argparse.ArgumentParser( + description="Simplify traces from instruction set simulators." + ) + parser.add_argument("input_file", type=str, help="The input trace file") + parser.add_argument( + "output_file", type=str, help="The output file for the simplified trace" + ) + + args = parser.parse_args() + simplify_trace(args.input_file, args.output_file) + + +if __name__ == "__main__": + main() From 497b1d33d40eae133307126adfe4731525753030 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 18 Jul 2024 14:32:46 +0200 Subject: [PATCH 25/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 245b842..3d610e3 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 245b842e9487d2b249f8513f7014705fe00e68cb +Subproject commit 3d610e368d8de7faad8cc9394ec95d62a3d64a70 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 9996fd4..4f5d921 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 9996fd483322c16c4c01b1aad3825c500d4cd383 +Subproject commit 4f5d9214ed6b75167b0e47f17c4d722997a950f0 diff --git a/scc b/scc index 7e07770..cecb22f 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 7e0777089bc86d60557ebe25d34d3f7244d97b53 +Subproject commit cecb22f13d6aa1372d2cad21f296d869632d2aa8 From 1fee44c084214c6b75ee49e055949dbcd495b324 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 18 Jul 2024 14:32:59 +0200 Subject: [PATCH 26/73] enables all cores in Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e7bc95f..32d039b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { stage("Generate cores and build TGC-ISS"){ steps { sh ''' - for core in TGC5D TGC5E; do #TGC5A TGC5B + for core in TGC5A TGC5B TGC5D TGC5E; do for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done @@ -67,7 +67,7 @@ pipeline { axes { axis { name 'CORE' - values 'TGC5C', 'TGC5D', 'TGC5E' // TGC5A, 'TGC5B', + values 'TGC5A', 'TGC5B','TGC5C', 'TGC5D', 'TGC5E' } axis { name 'BACKEND' From 4058eed1061d9858a98330f5f798309265c850b8 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Mon, 22 Jul 2024 09:24:19 +0200 Subject: [PATCH 27/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 3d610e3..19e5bba 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 3d610e368d8de7faad8cc9394ec95d62a3d64a70 +Subproject commit 19e5bbaa389d83b21cb1f5d4a912218bd192bf28 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 4f5d921..0432803 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 4f5d9214ed6b75167b0e47f17c4d722997a950f0 +Subproject commit 0432803d82e2604c2f08ed35dfae3b965ee45a9b From 78245ec817414ea0f94900da52dbf0102bb6d580 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Tue, 23 Jul 2024 13:47:51 +0200 Subject: [PATCH 28/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 19e5bba..a6f2d6d 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 19e5bbaa389d83b21cb1f5d4a912218bd192bf28 +Subproject commit a6f2d6d9049b2669b75b50eb52c09b9a316b075f diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 0432803..051dd5e 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 0432803d82e2604c2f08ed35dfae3b965ee45a9b +Subproject commit 051dd5e2d3da35b70b2af709cc86837fa70213bc From 47d7357ed9d12d47340a34b36432a1b1b979f564 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Tue, 23 Jul 2024 14:36:16 +0200 Subject: [PATCH 29/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index a6f2d6d..c788ec3 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit a6f2d6d9049b2669b75b50eb52c09b9a316b075f +Subproject commit c788ec3971e68e76bd8a82691cc134c432b6796a diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 051dd5e..86de536 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 051dd5e2d3da35b70b2af709cc86837fa70213bc +Subproject commit 86de536c8fd176cbcfc31d2d8bb8c86f5d0f414e From c09fda3f25d3875d7aa13555098d6bdfcb5cca3b Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 24 Jul 2024 12:29:21 +0200 Subject: [PATCH 30/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index c788ec3..b0ea07f 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit c788ec3971e68e76bd8a82691cc134c432b6796a +Subproject commit b0ea07fd90621b468cdeb0bf621d9c0be278e831 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 86de536..c6b99cd 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 86de536c8fd176cbcfc31d2d8bb8c86f5d0f414e +Subproject commit c6b99cd155877d630102edebeb8def5178913762 From 97190a133c80cc350fad26a37ab3db764c4066e5 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 24 Jul 2024 12:44:52 +0200 Subject: [PATCH 31/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- {Debug => docs}/.gitignore | 0 {Debug => docs}/offsets.txt | 0 scc | 2 +- {Debug => scripts}/create_reg_traces.py | 0 {Debug => scripts}/makeJitOutputReadable.py | 0 {Debug => scripts}/simplify_sail_trace.py | 0 {Debug => scripts}/simplify_tgc_trace.py | 0 9 files changed, 3 insertions(+), 3 deletions(-) rename {Debug => docs}/.gitignore (100%) rename {Debug => docs}/offsets.txt (100%) rename {Debug => scripts}/create_reg_traces.py (100%) rename {Debug => scripts}/makeJitOutputReadable.py (100%) rename {Debug => scripts}/simplify_sail_trace.py (100%) rename {Debug => scripts}/simplify_tgc_trace.py (100%) diff --git a/dbt-rise-core b/dbt-rise-core index b0ea07f..e24491f 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit b0ea07fd90621b468cdeb0bf621d9c0be278e831 +Subproject commit e24491f46529c651e5d38b61542129c5b0eddb52 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index c6b99cd..5a2b96e 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit c6b99cd155877d630102edebeb8def5178913762 +Subproject commit 5a2b96ef3e247cfa2dadca46e39a9db3576f7c7b diff --git a/Debug/.gitignore b/docs/.gitignore similarity index 100% rename from Debug/.gitignore rename to docs/.gitignore diff --git a/Debug/offsets.txt b/docs/offsets.txt similarity index 100% rename from Debug/offsets.txt rename to docs/offsets.txt diff --git a/scc b/scc index cecb22f..137d3a8 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit cecb22f13d6aa1372d2cad21f296d869632d2aa8 +Subproject commit 137d3a823ba88e15fb3e60af679675555f9902f5 diff --git a/Debug/create_reg_traces.py b/scripts/create_reg_traces.py similarity index 100% rename from Debug/create_reg_traces.py rename to scripts/create_reg_traces.py diff --git a/Debug/makeJitOutputReadable.py b/scripts/makeJitOutputReadable.py similarity index 100% rename from Debug/makeJitOutputReadable.py rename to scripts/makeJitOutputReadable.py diff --git a/Debug/simplify_sail_trace.py b/scripts/simplify_sail_trace.py similarity index 100% rename from Debug/simplify_sail_trace.py rename to scripts/simplify_sail_trace.py diff --git a/Debug/simplify_tgc_trace.py b/scripts/simplify_tgc_trace.py similarity index 100% rename from Debug/simplify_tgc_trace.py rename to scripts/simplify_tgc_trace.py From a4ac3233068dfde6966d2a73e050371550d699d1 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 24 Jul 2024 14:49:19 +0200 Subject: [PATCH 32/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index e24491f..fc7e85d 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit e24491f46529c651e5d38b61542129c5b0eddb52 +Subproject commit fc7e85d8229b8c7fef9eda5aa26c1135eab5dca9 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 5a2b96e..e87b7d5 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 5a2b96ef3e247cfa2dadca46e39a9db3576f7c7b +Subproject commit e87b7d5fd00559b1023856bb8ca56edac8077c99 From 5d9d146aa2342d85afd25a7ee84c14a0869f45a6 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 25 Jul 2024 13:08:21 +0200 Subject: [PATCH 33/73] updates submodules and script --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scripts/create_reg_traces.py | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index fc7e85d..66546d7 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit fc7e85d8229b8c7fef9eda5aa26c1135eab5dca9 +Subproject commit 66546d7f2cf65150d1d7f3b496c79720fea14abb diff --git a/dbt-rise-tgc b/dbt-rise-tgc index e87b7d5..72b11be 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit e87b7d5fd00559b1023856bb8ca56edac8077c99 +Subproject commit 72b11beac51606ed547000cfce962d1c12fe30cf diff --git a/scripts/create_reg_traces.py b/scripts/create_reg_traces.py index 58d9351..f0106d2 100644 --- a/scripts/create_reg_traces.py +++ b/scripts/create_reg_traces.py @@ -131,6 +131,9 @@ def main(args: argparse.Namespace) -> None: if __name__ == "__main__": + # sys.exit( + # "This script needs to be adapted, it assumed to be in a directory named 'Debug'" + # ) parser = argparse.ArgumentParser( description="Process an ELF file with a specified backend. Generates register traces for interp and the specified backend" ) @@ -140,8 +143,8 @@ if __name__ == "__main__": parser.add_argument( "--backend", type=str, - default="amsjit", - help="The backend to be used. Default is amsjit.", + default="asmjit", + help="The backend to be used. Default is asmjit.", required=False, ) parser.add_argument( From 3dc80460ac1e05930feaca1fb24ca6b5ca4efcae Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 25 Jul 2024 19:35:22 +0200 Subject: [PATCH 34/73] updates submodules --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 72b11be..d2efb23 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 72b11beac51606ed547000cfce962d1c12fe30cf +Subproject commit d2efb23ff74a3b68de1228653c28cb05c4eaebc1 From 46128e395f001bb6964a2e54e6555965ea9a801e Mon Sep 17 00:00:00 2001 From: stas Date: Tue, 30 Jul 2024 13:34:57 +0200 Subject: [PATCH 35/73] update submodule --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index d2efb23..a365110 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit d2efb23ff74a3b68de1228653c28cb05c4eaebc1 +Subproject commit a365110054b843d4023cd63e87ac5560c55dc21b From 5bb29d2d3af89ed2b54fc78c2becdf54e47347ec Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 31 Jul 2024 12:21:08 +0200 Subject: [PATCH 36/73] adds script for annotating memory addrs to riscof memory dumps --- scripts/annotate_addr_to_signature.py | 75 +++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 scripts/annotate_addr_to_signature.py diff --git a/scripts/annotate_addr_to_signature.py b/scripts/annotate_addr_to_signature.py new file mode 100644 index 0000000..f839e02 --- /dev/null +++ b/scripts/annotate_addr_to_signature.py @@ -0,0 +1,75 @@ +import argparse +import os +import subprocess + + +def get_address_from_objdump(elf_file, symbol): + result = subprocess.run( + ["riscv64-unknown-elf-objdump", "-t", elf_file], capture_output=True, text=True + ) + for line in result.stdout.splitlines(): + if symbol in line: + return int(line.split()[0], 16) + return None + + +def annotate_dump(signature_file, elf_file): + begin_signature = get_address_from_objdump(elf_file, "begin_signature") + end_signature = get_address_from_objdump(elf_file, "end_signature") + + if begin_signature is None or end_signature is None: + print(f"Symbols not found in {elf_file}") + return + + address = begin_signature + annotated_lines = [] + + with open(signature_file, "r") as sig_file: + for line in sig_file: + annotated_lines.append(f"{hex(address)}: {line.strip()}") + address += 4 + + output_file = signature_file + ".annotated" + with open(output_file, "w") as out_file: + out_file.write("\n".join(annotated_lines)) + print(f"Annotated file created: {output_file}") + + +def process_directory(root_dir): + for subdir, _, files in os.walk(root_dir): + elf_file = None + signature_file = None + + for file in files: + if file.endswith(".elf"): + elf_file = os.path.join(subdir, file) + elif file.endswith(".signature"): + signature_file = os.path.join(subdir, file) + + if elf_file and signature_file: + annotate_dump(signature_file, elf_file) + elif signature_file: + print(f"No ELF file found for {signature_file}") + + +def main(): + parser = argparse.ArgumentParser( + description=""" + Annotate memory dumps with addresses. Parses all subdirectories from the given root. + Expects a .signature with a corresponding .elf in the same directory. + Designed to annotate riscof signatures.""" + ) + parser.add_argument( + "root_dir", type=str, help="Root directory to search for .signature files" + ) + args = parser.parse_args() + + if not os.path.isdir(args.root_dir): + print("Invalid root directory") + return + + process_directory(args.root_dir) + + +if __name__ == "__main__": + main() From 0b7969becf534ef34c41618a63c840ba8a22fd99 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 31 Jul 2024 12:31:10 +0200 Subject: [PATCH 37/73] updates submodule --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index a365110..f579ec6 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit a365110054b843d4023cd63e87ac5560c55dc21b +Subproject commit f579ec6e489d05e0633380b71804758f01e358c0 From 7d71ebca301cdadac7ad26c343f6a2edf27ac311 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 1 Aug 2024 11:02:26 +0200 Subject: [PATCH 38/73] update submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 66546d7..8d6d23c 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 66546d7f2cf65150d1d7f3b496c79720fea14abb +Subproject commit 8d6d23c445bc7d3f06ba8f7062044f3ccedc5954 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index f579ec6..c376e34 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit f579ec6e489d05e0633380b71804758f01e358c0 +Subproject commit c376e34b2b4693147919106eafd8e61d2dfbd660 From 5cfbbbc9ca6dafc09b4ecd67c77aba3d8a5ab42b Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 2 Aug 2024 08:59:48 +0200 Subject: [PATCH 39/73] updates dbt-rise-tgc to fix fcsr presence --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index c376e34..42efced 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit c376e34b2b4693147919106eafd8e61d2dfbd660 +Subproject commit 42efced1eb0b2efbc3b8ed0c5e2a7171a9215f6b From ae71682920bed49f45e4b72227ec9250ce08de8d Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 2 Aug 2024 10:33:29 +0200 Subject: [PATCH 40/73] updates TGC impl --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 42efced..edf456c 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 42efced1eb0b2efbc3b8ed0c5e2a7171a9215f6b +Subproject commit edf456c59f9e5a7f69966e4ea6f2583d16ca3719 From 17773cf9b1db7c1f33d3ee6bf092cd7613f6b93a Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 2 Aug 2024 11:59:10 +0200 Subject: [PATCH 41/73] updates tgc --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index edf456c..6ddb8da 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit edf456c59f9e5a7f69966e4ea6f2583d16ca3719 +Subproject commit 6ddb8da07ff815370b92550c1bd6752579bf41e5 From ed08913f26d58c7c9418a280406bb66a1be959f4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 4 Aug 2024 18:42:54 +0200 Subject: [PATCH 42/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 8d6d23c..287936e 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 8d6d23c445bc7d3f06ba8f7062044f3ccedc5954 +Subproject commit 287936e0dfaaa8c488c8aba20247d4dd613b2d40 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 6ddb8da..933f084 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 6ddb8da07ff815370b92550c1bd6752579bf41e5 +Subproject commit 933f08494c50f13f317ac67d7373b20bd7136d2e diff --git a/scc b/scc index 137d3a8..bc96b96 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 137d3a823ba88e15fb3e60af679675555f9902f5 +Subproject commit bc96b96ef2b155fe217b7574bf8f091843d7ae3d From 020a4d793f33e6838ddf94e0d2c15ec3cc4674e2 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 17 Aug 2024 09:22:03 +0200 Subject: [PATCH 43/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 287936e..2c047b7 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 287936e0dfaaa8c488c8aba20247d4dd613b2d40 +Subproject commit 2c047b7ff9e3aedbe060239564fb1d3671ec27f9 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 933f084..a45fcd2 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 933f08494c50f13f317ac67d7373b20bd7136d2e +Subproject commit a45fcd28db032099aaa24b3a6472f957cbe3c4b9 diff --git a/scc b/scc index bc96b96..2c3c85a 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit bc96b96ef2b155fe217b7574bf8f091843d7ae3d +Subproject commit 2c3c85ad83bbce00711fec27f8c5dff23b14147c From d27cbcc05b035166ad0cc3b65c47c4b28d06abe2 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 17 Aug 2024 09:22:33 +0200 Subject: [PATCH 44/73] adds TGC5F to testing --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 32d039b..4c5b17d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { stage("Generate cores and build TGC-ISS"){ steps { sh ''' - for core in TGC5A TGC5B TGC5D TGC5E; do + for core in TGC5A TGC5B TGC5D TGC5E TGC5F; do for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done @@ -67,7 +67,7 @@ pipeline { axes { axis { name 'CORE' - values 'TGC5A', 'TGC5B','TGC5C', 'TGC5D', 'TGC5E' + values 'TGC5A', 'TGC5B','TGC5C', 'TGC5D', 'TGC5E' ,'TGC5F' } axis { name 'BACKEND' From 30dd1044b0f9ef0d551fbf7a7f22573534b759cb Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 17 Aug 2024 11:20:03 +0200 Subject: [PATCH 45/73] updates submodule --- dbt-rise-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-core b/dbt-rise-core index 2c047b7..7a5f9e3 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 2c047b7ff9e3aedbe060239564fb1d3671ec27f9 +Subproject commit 7a5f9e3514a74e2e1bc98bd493041fc0fff14202 From 8d199ba7caeced713b1903c4ddc192cc48906759 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 17 Aug 2024 23:20:29 +0200 Subject: [PATCH 46/73] changes c++ back to 14 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dbb725..27e0b43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") option(WITH_LLVM "Build LLVM backend" OFF) option(WITH_ASMJIT "Build ASMJIT backend" OFF) - set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) From 3489fd151629321adea429cee7796e7ba11a6634 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 17 Aug 2024 23:22:14 +0200 Subject: [PATCH 47/73] updates submodule --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 7a5f9e3..7680458 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 7a5f9e3514a74e2e1bc98bd493041fc0fff14202 +Subproject commit 7680458096f966db7ec3755d5b1f6c6b621a57ec diff --git a/dbt-rise-tgc b/dbt-rise-tgc index a45fcd2..76ea0db 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit a45fcd28db032099aaa24b3a6472f957cbe3c4b9 +Subproject commit 76ea0db25d7d5d07bfd4f701f3b8758bf1c2dc0e From 3fb45df48c1fbbd9f20b9257a0c304c7e7cc9fb9 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 21 Aug 2024 11:05:01 +0200 Subject: [PATCH 48/73] updates submodule --- dbt-rise-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-core b/dbt-rise-core index 7680458..e3873be 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 7680458096f966db7ec3755d5b1f6c6b621a57ec +Subproject commit e3873bea7a2fcb19abda31fcac469bd8125288bd From e6b34cfad9e3df56e0174a3e9e675df7e90bcae4 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 21 Aug 2024 12:09:41 +0200 Subject: [PATCH 49/73] updates submodule, Jenkins displays available isa after building --- Jenkinsfile | 1 + dbt-rise-core | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4c5b17d..d1745c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,6 +50,7 @@ pipeline { sh 'conan profile new default --detect --force' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' + sh 'build/dbt-rise-tgc/tgc-sim --isa ?' } } } diff --git a/dbt-rise-core b/dbt-rise-core index e3873be..3fda1c7 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit e3873bea7a2fcb19abda31fcac469bd8125288bd +Subproject commit 3fda1c77b0e624ee3349f0379aca93e1ae3d3ecf From aad4a275162853bc3fd94855e92079e8646a8439 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 23 Sep 2024 09:30:33 +0200 Subject: [PATCH 50/73] updates dbt-rise submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 3fda1c7..74484b8 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 3fda1c77b0e624ee3349f0379aca93e1ae3d3ecf +Subproject commit 74484b8ac9fd68429a57076a26857b897f5b67a1 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 76ea0db..f6be8ec 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 76ea0db25d7d5d07bfd4f701f3b8758bf1c2dc0e +Subproject commit f6be8ec0067073ed42649872adf5b405859f6bd7 From b6e22e863acedf5d5c2b93fbb41a109f8a999d74 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 23 Sep 2024 10:06:10 +0200 Subject: [PATCH 51/73] updates dbt-rise-tgc submodule --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index f6be8ec..62768bf 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit f6be8ec0067073ed42649872adf5b405859f6bd7 +Subproject commit 62768bf81e74ef35ca4eb0ef622033861a898d5e From bacc9a8296a73ed2c1649ae1d8e94fde2429a18d Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Tue, 24 Sep 2024 08:41:35 +0200 Subject: [PATCH 52/73] updates elfio and c++ version --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27e0b43..f26b31a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") option(WITH_LLVM "Build LLVM backend" OFF) option(WITH_ASMJIT "Build ASMJIT backend" OFF) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -85,7 +85,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") spdlog/1.9.2 boost/1.75.0 gsl-lite/0.37.0 - elfio/3.8 + elfio/3.12 lz4/1.9.3 yaml-cpp/0.7.0 jsoncpp/1.9.5 From 45b55d5c245f1d0ff97bc6fbc930bb797dd7d48d Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Tue, 24 Sep 2024 08:42:33 +0200 Subject: [PATCH 53/73] updates submodule --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 62768bf..1fb7e8f 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 62768bf81e74ef35ca4eb0ef622033861a898d5e +Subproject commit 1fb7e8fcea2639852c03d53eb32fce8803e9f68a From d9706c58f97625d03eecb9469ff3e3e035009d83 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Fri, 27 Sep 2024 20:10:53 +0200 Subject: [PATCH 54/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 74484b8..08459fb 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 74484b8ac9fd68429a57076a26857b897f5b67a1 +Subproject commit 08459fb6260ba22f2a2f56ada0fd860addec27ba diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 1fb7e8f..ad60449 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 1fb7e8fcea2639852c03d53eb32fce8803e9f68a +Subproject commit ad604490738a9e5115804c3ab366b39c251f9137 From 5f43bb9c0f447ce60143d1646d707160d78d70f3 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Fri, 27 Sep 2024 20:10:53 +0200 Subject: [PATCH 55/73] updates submodules --- dbt-rise-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-core b/dbt-rise-core index 08459fb..99cf682 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 08459fb6260ba22f2a2f56ada0fd860addec27ba +Subproject commit 99cf6823a9f565ecb6cc7f8fe2cef1e52830890b From 478d1d4ac56d946d64d45949551951dff599fe3b Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Mon, 30 Sep 2024 09:51:56 +0200 Subject: [PATCH 56/73] includes GC cores into Jenkins --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d1745c5..2795458 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,12 +36,12 @@ pipeline { stage("Generate cores and build TGC-ISS"){ steps { sh ''' - for core in TGC5A TGC5B TGC5D TGC5E TGC5F; do + for core in TGC5A TGC5B TGC5D TGC5E TGC5F RV32GC; do for backend in interp llvm tcc asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done done - for core in TGC6B TGC6C TGC6D TGC6E; do + for core in TGC6B TGC6C TGC6D TGC6E RV64GC; do for backend in interp llvm asmjit; do TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc done @@ -68,7 +68,7 @@ pipeline { axes { axis { name 'CORE' - values 'TGC5A', 'TGC5B','TGC5C', 'TGC5D', 'TGC5E' ,'TGC5F' + values 'TGC5A', 'TGC5B', 'TGC5C', 'TGC5D', 'TGC5E', 'TGC5F', 'RV32GC' } axis { name 'BACKEND' @@ -90,7 +90,7 @@ pipeline { axes { axis { name 'CORE' - values 'TGC6B', 'TGC6C', 'TGC6D', 'TGC6E' + values 'TGC6B', 'TGC6C', 'TGC6D', 'TGC6E', 'RV64GC' } axis { name 'BACKEND' From abef96d93d3715ee6c6a88ca0674472cf263c9a2 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 14 Nov 2024 17:26:37 +0100 Subject: [PATCH 57/73] lowers CXX standard and elfio version --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f26b31a..e13795e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") option(WITH_LLVM "Build LLVM backend" OFF) option(WITH_ASMJIT "Build ASMJIT backend" OFF) - set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -85,7 +85,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") spdlog/1.9.2 boost/1.75.0 gsl-lite/0.37.0 - elfio/3.12 + elfio/3.11 lz4/1.9.3 yaml-cpp/0.7.0 jsoncpp/1.9.5 From 88ad16ec9442ecd2f875d28c496975dd74a86558 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Thu, 14 Nov 2024 17:27:50 +0100 Subject: [PATCH 58/73] updates submodules --- dbt-rise-tgc | 2 +- scc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index ad60449..ac818f3 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit ad604490738a9e5115804c3ab366b39c251f9137 +Subproject commit ac818f304d4e71ce5361684c10dbc8cabf3aefaf diff --git a/scc b/scc index 2c3c85a..66d3b8f 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 2c3c85ad83bbce00711fec27f8c5dff23b14147c +Subproject commit 66d3b8f9ee209d7343448bf259b93cc4ab85218b From fabceb7a93c909c1f4cb02bee61454ac4bbb1c23 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 6 Dec 2024 13:40:30 +0100 Subject: [PATCH 59/73] updates submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 99cf682..72a4673 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 99cf6823a9f565ecb6cc7f8fe2cef1e52830890b +Subproject commit 72a4673f395abf130295644479ca150d318306e9 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index ac818f3..21e1f79 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit ac818f304d4e71ce5361684c10dbc8cabf3aefaf +Subproject commit 21e1f791adbfc502f232c288cd1bcec5df0af7a0 diff --git a/scc b/scc index 66d3b8f..9daeaad 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 66d3b8f9ee209d7343448bf259b93cc4ab85218b +Subproject commit 9daeaadc357550f323f2198463b22dad4cb40ba4 From 8eed85377bf4e167d138140fd03356070ad90cc0 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 6 Dec 2024 15:51:12 +0100 Subject: [PATCH 60/73] updates dbt-rise-tgc --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 21e1f79..a6a6f51 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 21e1f791adbfc502f232c288cd1bcec5df0af7a0 +Subproject commit a6a6f51f0bbbd0cda2d33ed7696c307ed528987b From d063650904b2b97df99242710b77a4f6a1db2d7b Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 23 Dec 2024 16:49:25 +0100 Subject: [PATCH 61/73] updates scc --- scc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scc b/scc index 9daeaad..29bfdc5 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 9daeaadc357550f323f2198463b22dad4cb40ba4 +Subproject commit 29bfdc5e43c7f28ae2ddb3815978eb9cde6c85c4 From de4a6124e623942d09afbb3422a6c5b821acbd14 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 23 Dec 2024 20:15:32 +0100 Subject: [PATCH 62/73] updates SCC --- scc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scc b/scc index 29bfdc5..80ee472 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 29bfdc5e43c7f28ae2ddb3815978eb9cde6c85c4 +Subproject commit 80ee4721c9e1ddef9d71532b61b3221194efbbc8 From dfad1380102992e82395bca5371a22ad80243cdb Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 28 Dec 2024 13:11:41 +0100 Subject: [PATCH 63/73] update submodules --- dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 72a4673..2af9aee 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 72a4673f395abf130295644479ca150d318306e9 +Subproject commit 2af9aee4b715a06c31fb7c280b130055902a3986 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index a6a6f51..d443c89 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit a6a6f51f0bbbd0cda2d33ed7696c307ed528987b +Subproject commit d443c89c87f25aa6f7d73bda8714dd13907a5ba2 From dee78d12790e9621622bbc2513305d7968e53a46 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 8 Jan 2025 14:45:09 +0100 Subject: [PATCH 64/73] updates scc --- scc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scc b/scc index 80ee472..eea222f 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 80ee4721c9e1ddef9d71532b61b3221194efbbc8 +Subproject commit eea222fb630ebcac70af1857e62e6f2b41466724 From 2ff133732d84813bccf2c1ced088f7f89dfa7a7a Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Sat, 11 Jan 2025 12:03:55 +0100 Subject: [PATCH 65/73] forces clean build in Jenkins --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 2795458..f047755 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,6 +48,7 @@ pipeline { done ''' sh 'conan profile new default --detect --force' + sh 'rm -rf build' sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON' sh 'cmake --build build -j' sh 'build/dbt-rise-tgc/tgc-sim --isa ?' From b2f87e8fad7af2373001e88697e70b2cbb2d90d4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 3 Feb 2025 20:53:59 +0100 Subject: [PATCH 66/73] updates dbt-rise-core and scc --- dbt-rise-core | 2 +- scc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-core b/dbt-rise-core index 2af9aee..b9da8fa 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 2af9aee4b715a06c31fb7c280b130055902a3986 +Subproject commit b9da8fa4c10af7ba2e794934c0eee3581e3bd046 diff --git a/scc b/scc index eea222f..b6ddd9a 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit eea222fb630ebcac70af1857e62e6f2b41466724 +Subproject commit b6ddd9abc3c11722cf0b98a19f76200b0dd7b60d From 7d41bb9525886e6456c8b7ccf5b4fe1c60b30aee Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 12 Feb 2025 20:45:47 +0100 Subject: [PATCH 67/73] updates submodules --- dbt-rise-tgc | 2 +- scc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index d443c89..53de21e 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit d443c89c87f25aa6f7d73bda8714dd13907a5ba2 +Subproject commit 53de21eef9ebf6d794e0bceb0247802499808d6f diff --git a/scc b/scc index b6ddd9a..a37bde5 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit b6ddd9abc3c11722cf0b98a19f76200b0dd7b60d +Subproject commit a37bde57190bdba96b82e4f95869a09bc3773784 From 140c2d67b138d7f741c89b9735ec25a09155b95f Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 13 Feb 2025 13:41:38 +0100 Subject: [PATCH 68/73] updates dbt-rise-tgc --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 53de21e..9f5326c 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 53de21eef9ebf6d794e0bceb0247802499808d6f +Subproject commit 9f5326c1103700b4fdd97389b9a9ad431af845d2 From e192c71104fb06229b6555e1e409d62669494952 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 14 Mar 2025 07:15:21 +0100 Subject: [PATCH 69/73] updates submodules and adds cmake presets --- .gitignore | 1 + CMakePresets.json | 39 +++++++++++++++++++++++++++++++++++++++ dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 2 +- 5 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 CMakePresets.json diff --git a/.gitignore b/.gitignore index 577e7ef..7070260 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /.direnv /TGC_C_XRB/ /.envrc.eyck +/.cache \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..b782560 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,39 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 21, + "patch": 0 + }, + "configurePresets": [ + { + "name": "Debug", + "displayName": "Debug build", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "Release", + "displayName": "Release build", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + } + ], + "buildPresets": [ + { + "name": "Debug", + "description": "Debug build", + "displayName": "Debug" + } + ] +} \ No newline at end of file diff --git a/dbt-rise-core b/dbt-rise-core index b9da8fa..01d81b0 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit b9da8fa4c10af7ba2e794934c0eee3581e3bd046 +Subproject commit 01d81b03fbe6d5d3ed7f4655b88655a1e124df1f diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 9f5326c..2384274 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 9f5326c1103700b4fdd97389b9a9ad431af845d2 +Subproject commit 23842742a6a3ff449d75be688eaca41f3a69c46b diff --git a/scc b/scc index a37bde5..7960982 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit a37bde57190bdba96b82e4f95869a09bc3773784 +Subproject commit 7960982947592b1bd97b71c5615a5e2b82a920c0 From 5d78cdf4df0f807761f7600adf9b0ef6533724f0 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 14 Mar 2025 08:52:46 +0100 Subject: [PATCH 70/73] updates CMakeLists.txt and adds build config --- .cproject | 61 +++++++++++++++++++++++++++++++++++++++++++++++++- CMakeLists.txt | 17 +++++++++----- 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/.cproject b/.cproject index 23a37ba..699c8b9 100644 --- a/.cproject +++ b/.cproject @@ -128,7 +128,7 @@ - + @@ -175,6 +175,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CMakeLists.txt b/CMakeLists.txt index e13795e..d24d710 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") set(CORE_NAME TGC5C CACHE STRING "The core to build the ISS for" ) option(BUILD_COMMON_FW "Enable the automatic download and build of some firmware to run on the ISS" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) + option(ENABLE_GRPOF "Enable gprof instrumentation" OFF) option(ENABLE_CLANG_TIDY "Add clang-tidy and clang-format automatically to builds" OFF) option(WITH_TCC "Build TCC backend" OFF) option(WITH_LLVM "Build LLVM backend" OFF) @@ -40,10 +41,16 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") set(warnings "/W4 /WX /EHsc") endif() if(ENABLE_SANITIZER) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") + list(APPEND CMAKE_C_FLAGS "-fsanitize=address") + list(APPEND CMAKE_CXX_FLAGS "-fsanitize=address") + list(APPEND CMAKE_EXE_LINKER_FLAGS "-fsanitize=address") + list(APPEND CMAKE_SHARED_LINKER_FLAGS "-fsanitize=address") + endif() + if(ENABLE_GPROF) + list(APPEND CMAKE_C_FLAGS "-pg") + list(APPEND CMAKE_CXX_FLAGS "-pg") + list(APPEND CMAKE_EXE_LINKER_FLAGS "-pg") + list(APPEND CMAKE_SHARED_LINKER_FLAGS "-pg") endif() include(GNUInstallDirs) include(ConanInline) @@ -213,7 +220,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") FetchContent_Declare( riscvfw GIT_REPOSITORY https://git.minres.com/Firmware/Firmwares.git - GIT_TAG main + GIT_TAG develop GIT_SHALLOW OFF UPDATE_DISCONNECTED ON ) From 4a74a73bee355415728e8e524fc5e683e48f9e4f Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 14 Mar 2025 19:45:21 +0100 Subject: [PATCH 71/73] updates CMakeLists.txt and dbt-rise-tgc submodule --- CMakeLists.txt | 2 +- dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e13795e..fecd113 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,7 +213,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") FetchContent_Declare( riscvfw GIT_REPOSITORY https://git.minres.com/Firmware/Firmwares.git - GIT_TAG main + GIT_TAG develop GIT_SHALLOW OFF UPDATE_DISCONNECTED ON ) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 2384274..502f3e8 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 23842742a6a3ff449d75be688eaca41f3a69c46b +Subproject commit 502f3e8df9f4c44e79bb1b6fd8c2ec8e42c8de94 From 6fe60e03cdcba71888f44520ad3ddaf368058407 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 14 Mar 2025 20:04:01 +0100 Subject: [PATCH 72/73] updates submodule --- dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt-rise-tgc b/dbt-rise-tgc index 502f3e8..cfc980a 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 502f3e8df9f4c44e79bb1b6fd8c2ec8e42c8de94 +Subproject commit cfc980a069370cef79b709a9d67f623872d0b068 From bd3139b623b1ec5b39655ad14ae53d00ccb72df1 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 15 Mar 2025 06:55:46 +0100 Subject: [PATCH 73/73] removes scc submodule --- .cproject | 5 +- CMakeLists.txt | 26 +++------ cmake/ConanInline.cmake | 107 ++++++++++++++++++++++++++++++++++++ cmake/FindClangFormat.cmake | 34 ++++++++++++ cmake/clang-format.cmake | 40 ++++++++++++++ dbt-rise-core | 2 +- dbt-rise-tgc | 2 +- scc | 1 - 8 files changed, 195 insertions(+), 22 deletions(-) create mode 100644 cmake/ConanInline.cmake create mode 100644 cmake/FindClangFormat.cmake create mode 100644 cmake/clang-format.cmake delete mode 160000 scc diff --git a/.cproject b/.cproject index 699c8b9..d1ab12d 100644 --- a/.cproject +++ b/.cproject @@ -128,7 +128,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -172,6 +172,7 @@ + diff --git a/CMakeLists.txt b/CMakeLists.txt index d24d710..d246468 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.20) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) project(TGC-ISS VERSION 1.0.0 LANGUAGES CXX) @@ -15,8 +15,9 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") option(ENABLE_CLANG_TIDY "Add clang-tidy and clang-format automatically to builds" OFF) option(WITH_TCC "Build TCC backend" OFF) option(WITH_LLVM "Build LLVM backend" OFF) - option(WITH_ASMJIT "Build ASMJIT backend" OFF) - + option(WITH_ASMJIT "Build ASMJIT backend" ON) + option(PORTABLE "Build executable without platform specific optimizations" OFF) + set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) @@ -25,12 +26,9 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") set(CMAKE_INSTALL_RPATH "${ORIGIN}") include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE) - if(COMPILER_SUPPORTS_MARCH_NATIVE) - if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") - elseif(NOT(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") - endif() + if(COMPILER_SUPPORTS_MARCH_NATIVE AND NOT PORTABLE) + message(STATUS "Applying platform specific optimizations") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") @@ -102,7 +100,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") if(WITH_LLVM) list(APPEND CONAN_PACKAGE_LIST llvm-core/${LLVM_VERSION}) - list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=True) + list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=True llvm-code:targets=X85) endif() if(WITH_ASMJIT) list(APPEND CONAN_PACKAGE_LIST asmjit/cci.20240531) @@ -176,7 +174,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") # setup clang-format and clang-tidy ############################################################################### if (ENABLE_CLANG_TIDY) - set(CLANG_FORMAT_EXCLUDE_PATTERNS "scc" "install") + set(CLANG_FORMAT_EXCLUDE_PATTERNS "build" "install") find_package(ClangFormat) find_program (CLANG_TIDY_EXE NAMES "clang-tidy" PATHS /usr/bin ) if (CLANG_TIDY_EXE) @@ -232,12 +230,6 @@ if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS") endif() endif() -if(CMAKE_PROJECT_NAME STREQUAL "TGC-ISS" AND NOT USE_CWR_SYSTEMC) - set(SCC_CMAKE_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/scc) - add_subdirectory(scc/src/common) -else() - add_subdirectory(scc) -endif() add_subdirectory(dbt-rise-core) add_subdirectory(dbt-rise-tgc) if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dbt-rise-plugins) diff --git a/cmake/ConanInline.cmake b/cmake/ConanInline.cmake new file mode 100644 index 0000000..64a5d08 --- /dev/null +++ b/cmake/ConanInline.cmake @@ -0,0 +1,107 @@ + +set(CONAN_CMAKE_LIST_DIR ${CMAKE_CURRENT_BINARY_DIR}) + +macro(conan_check) + # for backwards compatibility + cmake_parse_arguments(MARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + + find_program(CONAN conan) + if(NOT EXISTS ${CONAN}) + message(FATAL_ERROR "Conan is required. Please see README.md") + return() + endif() + execute_process(COMMAND ${CONAN} --version + OUTPUT_VARIABLE CONAN_VERSION_OUTPUT) + string(REGEX MATCHALL "[0-9.]+" CONAN_VERSION ${CONAN_VERSION_OUTPUT}) + if (NOT (CONAN_VERSION VERSION_GREATER_EQUAL 1.36.0)) + message(FATAL_ERROR "Please upgrade your conan to a version greater or equal 1.36") + endif() + + if(NOT EXISTS ${CONAN_CMAKE_LIST_DIR}/conan.cmake) + message("Downloading conan.cmake to ${CONAN_CMAKE_LIST_DIR}") + set(URL https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake) + file(DOWNLOAD ${URL} ${CONAN_CMAKE_LIST_DIR}/conan.cmake TIMEOUT 60 STATUS DOWNLOAD_STATUS) + list(GET DOWNLOAD_STATUS 0 STATUS_CODE) + list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE) + if(NOT (${STATUS_CODE} EQUAL 0)) + # Exit CMake if the download failed, printing the error message. + message(FATAL_ERROR "Error occurred during download: ${ERROR_MESSAGE}") + endif() + if(NOT EXISTS ${CONAN_CMAKE_LIST_DIR}/conan.cmake) + message(FATAL_ERROR "Could not download conan.cmake. Please check your internet connection or proxy settings") + endif() + file (SIZE ${CONAN_CMAKE_LIST_DIR}/conan.cmake CONAN_CMAKE_SIZE) + if(${CONAN_CMAKE_SIZE} EQUAL 0) + message(FATAL_ERROR "Could not download conan.cmake. Please check your internet connection or proxy settings") + endif() + endif() + if("${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_BUILD_TYPE Release) + endif() + + + include(${CONAN_CMAKE_LIST_DIR}/conan.cmake) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR}) +endmacro() + +macro(conan_setup) + set(options TARGETS) + cmake_parse_arguments(MARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + + + set(conanfile_cmake_paths ${CMAKE_BINARY_DIR}/conan_paths.cmake) + + set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) + set(conanfile_cmake ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) + endif() + + if(EXISTS "${conanfile_cmake_paths}") + include(${conanfile_cmake_paths}) + elseif(EXISTS "${conanfile_cmake}") + include(${conanfile_cmake}) + if( MARGS_TARGETS) + conan_basic_setup(TARGETS) + else() + conan_basic_setup() + endif() + endif() +endmacro() + +function(conan_configure) + conan_cmake_generate_conanfile(OFF ${ARGV}) +endfunction() + +macro(conan_install) + set(options BUILD_TYPE BUILD) + set(oneValueArgs BUILD_TYPE BUILD) + cmake_parse_arguments(MARGS "" "${oneValueArgs}" "" ${ARGN} ) + if(MARGS_BUILD_TYPE) + conan_cmake_autodetect(settings BUILD_TYPE ${MARGS_BUILD_TYPE}) + else() + conan_cmake_autodetect(settings BUILD_TYPE) + endif() + if(CMAKE_CXX_STANDARD) + list(APPEND settings compiler.cppstd=${CMAKE_CXX_STANDARD}) + endif() + if(USE_NCSC_SYSTEMC) + list(APPEND settings compiler.libcxx=libstdc++) + endif() + if (NOT "$ENV{CONAN_PROFILE_NAME}" STREQUAL "") + set(CONAN_PROFILE "$ENV{CONAN_PROFILE_NAME}" CACHE INTERNAL "Copied from environment variable") + else() + set(CONAN_PROFILE "default" CACHE INTERNAL "Copied from environment variable") + endif() + + if(MARGS_BUILD) + conan_cmake_install(PATH_OR_REFERENCE . + BUILD ${MARGS_BUILD} + PROFILE_BUILD ${CONAN_PROFILE} + SETTINGS ${settings}) + else() + conan_cmake_install(PATH_OR_REFERENCE . + BUILD missing + PROFILE_BUILD ${CONAN_PROFILE} + SETTINGS ${settings}) + endif() +endmacro() diff --git a/cmake/FindClangFormat.cmake b/cmake/FindClangFormat.cmake new file mode 100644 index 0000000..aba73fe --- /dev/null +++ b/cmake/FindClangFormat.cmake @@ -0,0 +1,34 @@ +# Find Clang format +# +# +if(NOT CLANG_FORMAT_BIN_NAME) + set(CLANG_FORMAT_BIN_NAME clang-format) +endif() + +# if custom path check there first +if(CLANG_FORMAT_ROOT_DIR) + find_program(CLANG_FORMAT_BIN + NAMES + ${CLANG_FORMAT_BIN_NAME} + PATHS + "${CLANG_FORMAT_ROOT_DIR}" + NO_DEFAULT_PATH) +else() + find_program(CLANG_FORMAT_BIN NAMES ${CLANG_FORMAT_BIN_NAME}) +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + ClangFormat + DEFAULT_MSG + CLANG_FORMAT_BIN) + +mark_as_advanced( + CLANG_FORMAT_BIN) + +if(ClangFormat_FOUND) + # A CMake script to find all source files and setup clang-format targets for them + include(clang-format) +else() + message("clang-format not found. Not setting up format targets") +endif() \ No newline at end of file diff --git a/cmake/clang-format.cmake b/cmake/clang-format.cmake new file mode 100644 index 0000000..5388d00 --- /dev/null +++ b/cmake/clang-format.cmake @@ -0,0 +1,40 @@ +# additional target to perform clang-format run, requires clang-format + +set(CLANG_FORMAT_CXX_FILE_EXTENSIONS ${CLANG_FORMAT_CXX_FILE_EXTENSIONS} *.cpp *.h *.cxx *.hxx *.hpp *.cc *.ipp) +file(GLOB_RECURSE ALL_SOURCE_FILES ${CLANG_FORMAT_CXX_FILE_EXTENSIONS}) + +# Don't include some common build folders +set(CLANG_FORMAT_EXCLUDE_PATTERNS ${CLANG_FORMAT_EXCLUDE_PATTERNS} "/CMakeFiles/" "cmake") + +# get all project files file +foreach (SOURCE_FILE ${ALL_SOURCE_FILES}) + foreach (EXCLUDE_PATTERN ${CLANG_FORMAT_EXCLUDE_PATTERNS}) + string(FIND ${SOURCE_FILE} ${EXCLUDE_PATTERN} EXCLUDE_FOUND) + if (NOT ${EXCLUDE_FOUND} EQUAL -1) + list(REMOVE_ITEM ALL_SOURCE_FILES ${SOURCE_FILE}) + endif () + endforeach () +endforeach () + +set(FORMAT_TARGET_NAME format) +if(NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + set(FORMAT_TARGET_NAME format-${PROJECT_NAME}) +endif() + +add_custom_target(${FORMAT_TARGET_NAME} + COMMENT "Running clang-format to change files" + COMMAND ${CLANG_FORMAT_BIN} -style=file -i ${ALL_SOURCE_FILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + + +add_custom_target(${FORMAT_TARGET_NAME}-check + COMMENT "Checking clang-format changes" + # Use ! to negate the result for correct output + COMMAND ! + ${CLANG_FORMAT_BIN} + -style=file + -output-replacements-xml + ${ALL_SOURCE_FILES} + | grep -q "replacement offset" +) \ No newline at end of file diff --git a/dbt-rise-core b/dbt-rise-core index 01d81b0..dc4e0ca 160000 --- a/dbt-rise-core +++ b/dbt-rise-core @@ -1 +1 @@ -Subproject commit 01d81b03fbe6d5d3ed7f4655b88655a1e124df1f +Subproject commit dc4e0cadf330b4664ef6160b5a685df26e072109 diff --git a/dbt-rise-tgc b/dbt-rise-tgc index cfc980a..e238369 160000 --- a/dbt-rise-tgc +++ b/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit cfc980a069370cef79b709a9d67f623872d0b068 +Subproject commit e238369e1864ec70f21ad6e9c2f65a63f7c1e43e diff --git a/scc b/scc deleted file mode 160000 index 7960982..0000000 --- a/scc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7960982947592b1bd97b71c5615a5e2b82a920c0