From bf5d40e7ffb3609f7568eb6b80732c1cf67e3b02 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 18 Jul 2022 11:49:51 +0200 Subject: [PATCH 01/48] adds MSVC compatibility fixes --- .gitignore | 1 + CMakeLists.txt | 6 +++--- scc | 2 +- src/sc_main.cpp | 5 +++++ src/tgc_vp/tb.cpp | 2 ++ src/tgc_vp/tb.h | 2 ++ tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 9 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 1c4ca24..a5ce291 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /coverage.info /output.txt /output.trc +CMakeSettings.json diff --git a/CMakeLists.txt b/CMakeLists.txt index c8ddc8c..e8db919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(ecosystem-vp LANGUAGES C CXX VERSION 1.0.0) option(ENABLE_SCV "Enable the use of SCV" ON) option(LIBS_ONLY "Just build the shared libraries needed to build the VP" OFF) -option(NO_FW_BUILD "Disable the automatic rebuild of firmware running on the VP" OFF) +option(FW_BUILD "Enable the automatic rebuild of firmware running on the VP" ON) option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) @@ -79,7 +79,7 @@ conan_cmake_autodetect(settings) conan_install() # needed when using CentOS devenv-7 or -8 and boost does not build because of missing GLIBCXX version #conan_install(BUILD b2 missing) -find_package(tcc) +find_package(tcc QUIET) find_package(elfio) find_package(fmt) find_package(gsl-lite) @@ -123,7 +123,7 @@ endif() if(NOT LIBS_ONLY) add_subdirectory(src) endif() -if(NOT NO_FW_BUILD) +if(FW_BUILD) add_custom_target(fw-hello-world ALL COMMAND make -C fw/hello-world USES_TERMINAL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endif() diff --git a/scc b/scc index 93a5676..bee44d8 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 93a5676fec9c1cb851b6a9cd4c462142de6dc144 +Subproject commit bee44d83d0b86d71e4e191c7150332e34cc2dd56 diff --git a/src/sc_main.cpp b/src/sc_main.cpp index 967af21..f4fbab3 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -16,8 +16,13 @@ #include #include +#include #include #include +#ifdef ERROR +#undef ERROR +#endif + const std::string core_path{"tb.top.core_complex"}; using namespace sysc; diff --git a/src/tgc_vp/tb.cpp b/src/tgc_vp/tb.cpp index da2d0a6..dbacd2d 100644 --- a/src/tgc_vp/tb.cpp +++ b/src/tgc_vp/tb.cpp @@ -15,8 +15,10 @@ tb::tb(const sc_core::sc_module_name &nm): sc_core::sc_module(nm) { gpio_s[i].in(top.pins_o[i]); top.pins_i[i](gpio_s[i].out); } +#ifndef WIN32 // terminal terminal.tx_o(gpio_s[16].in); gpio_s[17].out(terminal.rx_i); +#endif } } diff --git a/src/tgc_vp/tb.h b/src/tgc_vp/tb.h index 764e8c9..062905f 100644 --- a/src/tgc_vp/tb.h +++ b/src/tgc_vp/tb.h @@ -21,7 +21,9 @@ public: tgc_vp::rst_gen rst_gen{"rst_gen"}; sc_core::sc_vector> gpio_s{"gpio_s", 32}; sc_core::sc_signal rst_n{"rst_n"}; +#ifndef WIN32 // Seasocks not available under windows vpvper::generic::terminal terminal{"terminal"}; +#endif }; } /* namespace tgc_vp */ diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 44acf8a..159cabb 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 44acf8a55936d5eedb5daf8cae0799ec1616413f +Subproject commit 159cabb63cf2ac000a92ceb925da59369f5e8725 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index c054d75..4876f18 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit c054d75717dcefbc2048ab277fdfe1cb428640ef +Subproject commit 4876f18ba941f62176eeab8d902aaf7fa1211577 diff --git a/vpvper b/vpvper index 11e6dc5..74a5fff 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 11e6dc5926a4ee250dc1eb206c97445472049d80 +Subproject commit 74a5fffd1ac89e5db991f0d0e6305542583d4256 From 0076f0572f5e5ed5d2f055f5be9076999aae969e Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 6 Aug 2022 09:50:28 +0200 Subject: [PATCH 02/48] updates submodules --- .cproject | 9 ++++++++- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.cproject b/.cproject index 7d8ff25..ac5af9a 100644 --- a/.cproject +++ b/.cproject @@ -16,7 +16,7 @@ - + @@ -46,6 +46,12 @@ + + + + + + @@ -103,6 +109,7 @@ + diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 159cabb..d40069a 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 159cabb63cf2ac000a92ceb925da59369f5e8725 +Subproject commit d40069a26170c3026c74f83cdf7ece2177afa914 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 4876f18..e60fa3d 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 4876f18ba941f62176eeab8d902aaf7fa1211577 +Subproject commit e60fa3d5e6b873742ab9e7a0130ccdb4df25f34b diff --git a/vpvper b/vpvper index 74a5fff..9982e81 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 74a5fffd1ac89e5db991f0d0e6305542583d4256 +Subproject commit 9982e812f3b590b27baa33c37087fb825055a75a From 10e8cec06fa956b7f6f6518a7afae5699abccaa4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 6 Aug 2022 09:53:41 +0200 Subject: [PATCH 03/48] updates dbt-rise-tgc --- tgc-iss/dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index e60fa3d..1ad66a7 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit e60fa3d5e6b873742ab9e7a0130ccdb4df25f34b +Subproject commit 1ad66a71d8e706b37b4d3b2868ac9917c712b00a From a05ef0ba40a847bfa568c3ae621817b2a5b847ff Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 19 Feb 2023 12:03:26 +0100 Subject: [PATCH 04/48] updates conan remote setting --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8db919..6cfffd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME endif() conan_check() -conan_add_remote(NAME minres URL https://artifactory.minres.com/artifactory/api/conan/oss) +conan_add_remote(NAME minres URL https://git.minres.com/api/packages/Tooling/conan) conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST} GENERATORS cmake_find_package OPTIONS ${CONAN_PACKAGE_OPTIONS} From aed51b65a7764d845ec164e1b803812361543ebf Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 28 Feb 2023 14:56:36 +0100 Subject: [PATCH 05/48] updates build system --- .cproject | 2 +- CMakeLists.txt | 11 ++++++++++- scc | 2 +- src/tgc_vp/system.cpp | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.cproject b/.cproject index ac5af9a..81be607 100644 --- a/.cproject +++ b/.cproject @@ -12,7 +12,7 @@ - + diff --git a/CMakeLists.txt b/CMakeLists.txt index e8db919..bbac218 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,15 @@ if (UNIX) list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True boost:shared=True) endif (UNIX) -set(CONAN_PACKAGE_LIST fmt/8.0.1 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0 elfio/3.8) +set(CONAN_PACKAGE_LIST + fmt/8.0.1 + spdlog/1.9.2 + boost/1.75.0 + gsl-lite/0.37.0 + elfio/3.8 + yaml-cpp/0.7.0 + jsoncpp/1.9.5 +) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True lua:compile_as_cpp=False) @@ -82,6 +90,7 @@ conan_install() find_package(tcc QUIET) find_package(elfio) find_package(fmt) +find_package(spdlog) find_package(gsl-lite) set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install. diff --git a/scc b/scc index bee44d8..e0c3b9a 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit bee44d83d0b86d71e4e191c7150332e34cc2dd56 +Subproject commit e0c3b9ab6a4e2fe1a3a3c87d84a617a9d674941d diff --git a/src/tgc_vp/system.cpp b/src/tgc_vp/system.cpp index 4525174..900e90d 100644 --- a/src/tgc_vp/system.cpp +++ b/src/tgc_vp/system.cpp @@ -77,7 +77,7 @@ system::system(sc_core::sc_module_name nm) core_complex.sw_irq_i(msie_int_s); core_complex.timer_irq_i(mtime_int_s); - core_complex.global_irq_i(core_int_s); + core_complex.ext_irq_i(core_int_s); core_complex.local_irq_i(local_int_s); pins_i(gpio0.pins_i); diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index d40069a..8a2fe18 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit d40069a26170c3026c74f83cdf7ece2177afa914 +Subproject commit 8a2fe18cba1e799aebd018d0d5434fb00d94b29f diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 1ad66a7..ec55efd 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 1ad66a71d8e706b37b4d3b2868ac9917c712b00a +Subproject commit ec55efd3229b201dde1778d5b7f6e68876d2c99f diff --git a/vpvper b/vpvper index 9982e81..55f81f2 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 9982e812f3b590b27baa33c37087fb825055a75a +Subproject commit 55f81f21494eba59e30925527d3d2cf4cde7b884 From c5b6eaecea5ca8ea766df74ab34c37584f686212 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 2 Mar 2023 10:59:49 +0100 Subject: [PATCH 06/48] fixes generator script --- tgc-iss/generate.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tgc-iss/generate.sh b/tgc-iss/generate.sh index d735c0c..b9bfb77 100644 --- a/tgc-iss/generate.sh +++ b/tgc-iss/generate.sh @@ -1,10 +1,17 @@ #!/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 /scratch/eyck/workarea/RISC-V/TGFS-VERIF/tgfs_iss/coredsl/com.minres.coredsl.generator.repository/target/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar " +GENERATOR="java $JAVA_OPTS -jar ${GENERATOR_LOC}/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar " CORE_NAME=$1 BACKEND=$2 @@ -15,11 +22,11 @@ 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/incl/iss/arch/${CORE_NAME_LC}.h" -MAPPING="$MAPPING -m ${TMPL_DIR}/CORENAME.cpp.gtl:dbt-rise-tgc/src/iss/${CORE_NAME_LC}.cpp" -MAPPING="$MAPPING -m ${TMPL_DIR}/${BACKEND}/CORENAME.cpp.gtl:dbt-rise-tgc/src/vm/${BACKEND}/vm_${CORE_NAME_LC}.cpp" +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 /scratch/eyck/workarea/RISC-V/TGFS-VERIF/tgfs_iss/coredsl/com.minres.coredsl.generator.repository/target/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar ] || (cd /scratch/eyck/workarea/RISC-V/TGFS-VERIF/tgfs_iss/coredsl; mvn package) +[ -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 From 2d220181e8d8a9c78064f111ea7b7ea0ca14a57a Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 13 Mar 2023 10:48:13 +0000 Subject: [PATCH 07/48] conan inline does not support connan version 2.0 --- .gitpod.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 6dc3178..2cd58d0 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -9,7 +9,7 @@ tasks: python3 -m venv /workspace/venv python3 -m pip install --upgrade pip source /workspace/venv/bin/activate - pip install conan + pip install conan==1.59 command: | source /workspace/venv/bin/activate cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON @@ -18,3 +18,5 @@ vscode: extensions: - ms-python.python - webfreak.debug + - twxs.cmake + - ms-vscode.cmake-tools From 5c09ed24fb483d32179d30b8535924d90cd699c4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 28 Jun 2023 09:03:30 +0200 Subject: [PATCH 08/48] updates submodules and adapts design to changes --- .cproject | 7 ++++--- CMakeLists.txt | 8 ++++++-- fw/hello-world/Makefile | 1 - scc | 2 +- src/tgc_vp/gen/platform_mmap.h | 2 +- src/tgc_vp/system.cpp | 5 +++-- src/tgc_vp/system.h | 4 ++-- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 10 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.cproject b/.cproject index 81be607..de923df 100644 --- a/.cproject +++ b/.cproject @@ -12,11 +12,11 @@ - + - + @@ -46,10 +46,11 @@ - + + diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ed48f7..6a4e233 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) option(ENABLE_CLANGTIDY "Enable static analysis with clang-tidy." OFF) +option(ENABLE_TCC "Enable the use of TCC" ON) set(SCC_LIB_ONLY ON) set(CMAKE_CXX_STANDARD 14) @@ -67,9 +68,12 @@ set(CONAN_PACKAGE_LIST jsoncpp/1.9.5 ) -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ENABLE_TCC) list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True lua:compile_as_cpp=False) - list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27 seasocks/1.4.4 lua/5.4.3) + if(ENABLE_TCC) + list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) + endif() + list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 lua/5.4.3) endif() set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME}) diff --git a/fw/hello-world/Makefile b/fw/hello-world/Makefile index c8ea51e..6e7d998 100644 --- a/fw/hello-world/Makefile +++ b/fw/hello-world/Makefile @@ -13,6 +13,5 @@ LDFLAGS := -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) compiler := $(shell which riscv32-unknown-elf-gcc) TOOL_DIR=$(dir $(compiler)) -TRIPLET=riscv32-unknown-elf BSP_BASE = ../bsp include $(BSP_BASE)/env/common-gcc.mk diff --git a/scc b/scc index e0c3b9a..fbc21a0 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit e0c3b9ab6a4e2fe1a3a3c87d84a617a9d674941d +Subproject commit fbc21a0509e01f3697a16dc407eaa40b9d6a5cbb diff --git a/src/tgc_vp/gen/platform_mmap.h b/src/tgc_vp/gen/platform_mmap.h index a821ba4..ddf5500 100644 --- a/src/tgc_vp/gen/platform_mmap.h +++ b/src/tgc_vp/gen/platform_mmap.h @@ -7,7 +7,7 @@ #define _PLATFORM_MMAP_H_ // need double braces, see // https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191 -const std::array, 13> platfrom_mmap = {{ +const std::array, 13> platfrom_mmap = {{ {clint.socket, 0x2000000, 0xc000}, {plic.socket, 0xc000000, 0x200008}, {aon.socket, 0x10000000, 0x150}, diff --git a/src/tgc_vp/system.cpp b/src/tgc_vp/system.cpp index 900e90d..178a017 100644 --- a/src/tgc_vp/system.cpp +++ b/src/tgc_vp/system.cpp @@ -13,7 +13,7 @@ using namespace sysc::tgfs; system::system(sc_core::sc_module_name nm) : sc_core::sc_module(nm) -, NAMED(router, platfrom_mmap.size() + 2, 1) +, NAMED(router, platfrom_mmap.size() + 2, 2) , NAMEDC(qspi0_ptr, spi, spi_impl::beh) , NAMEDC(qspi1_ptr, spi, spi_impl::beh) , NAMEDC(qspi2_ptr, spi, spi_impl::beh) @@ -24,7 +24,8 @@ system::system(sc_core::sc_module_name nm) auto& qspi0 = *qspi0_ptr; auto& qspi1 = *qspi1_ptr; auto& qspi2 = *qspi2_ptr; - core_complex.initiator(router.target[0]); + core_complex.ibus(router.target[0]); + core_complex.dbus(router.target[1]); size_t i = 0; for (const auto &e : platfrom_mmap) { router.initiator.at(i)(e.target); diff --git a/src/tgc_vp/system.h b/src/tgc_vp/system.h index ae19a4c..70577d0 100644 --- a/src/tgc_vp/system.h +++ b/src/tgc_vp/system.h @@ -52,9 +52,9 @@ private: vpvper::sifive::prci prci{"prci"}; vpvper::sifive::clint clint{"clint"}; - using mem_qspi_t = scc::memory<512_MB, 32>; + using mem_qspi_t = scc::memory<512_MB, scc::LT>; mem_qspi_t mem_qspi{"mem_qspi"}; - using mem_ram_t = scc::memory<128_kB, 32>; + using mem_ram_t = scc::memory<128_kB, scc::LT>; mem_ram_t mem_ram{"mem_ram"}; sc_core::sc_signal tlclk_s{"tlclk_s"}; diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 8a2fe18..c669f78 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 8a2fe18cba1e799aebd018d0d5434fb00d94b29f +Subproject commit c669f78a90084d55b6a04d41cf7f92558d73e75a diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index ec55efd..4dbc743 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit ec55efd3229b201dde1778d5b7f6e68876d2c99f +Subproject commit 4dbc7433a5ce58e367d2e740e191929df50e39ef diff --git a/vpvper b/vpvper index 55f81f2..755a9a3 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 55f81f21494eba59e30925527d3d2cf4cde7b884 +Subproject commit 755a9a3f19cd6c3364a17ac15c521c09de71341d From 27e7f79b4002a2a52ad920c06553ab75f2ae09a1 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 28 Jun 2023 09:11:58 +0200 Subject: [PATCH 09/48] adds hierarchy dumper --- src/CLIParser.cpp | 2 ++ src/sc_main.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index 788db58..fcbfabb 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -76,6 +76,8 @@ void CLIParser::build() { "enable gdb server and specify port to use") ("dump-ir", "dump the intermediate representation") + ("dump-structure", po::value(), + "dump model structure to ELK file") ("quantum", po::value(), "SystemC quantum time in ns") ("reset,r", po::value(), diff --git a/src/sc_main.cpp b/src/sc_main.cpp index f4fbab3..2d875ae 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -78,6 +79,9 @@ int sc_main(int argc, char *argv[]) { if (of.is_open()) cfg.dump_configuration(of); } cfg.configure(); + std::unique_ptr dumper; + if(parser.is_set("dump-structure")) + dumper.reset(new scc::hierarchy_dumper(parser.get("dump-structure"), scc::hierarchy_dumper::D3JSON)); /////////////////////////////////////////////////////////////////////////// // overwrite config with command line settings /////////////////////////////////////////////////////////////////////////// From a7d33ca1866803f235df95a186974c9fa0c4ade4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 28 Jun 2023 15:55:36 +0200 Subject: [PATCH 10/48] connects missing pins in system --- contrib/eclipse_launch/TGC-VP.launch | 5 +++-- scc | 2 +- src/tgc_vp/system.cpp | 6 ++---- src/tgc_vp/system.h | 3 --- vpvper | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/contrib/eclipse_launch/TGC-VP.launch b/contrib/eclipse_launch/TGC-VP.launch index 56a52c7..f28407a 100644 --- a/contrib/eclipse_launch/TGC-VP.launch +++ b/contrib/eclipse_launch/TGC-VP.launch @@ -16,13 +16,14 @@ - - + + + diff --git a/scc b/scc index fbc21a0..76f36cc 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit fbc21a0509e01f3697a16dc407eaa40b9d6a5cbb +Subproject commit 76f36cc6068e2e586675289e4d48559146560ec0 diff --git a/src/tgc_vp/system.cpp b/src/tgc_vp/system.cpp index 178a017..0ad1ef1 100644 --- a/src/tgc_vp/system.cpp +++ b/src/tgc_vp/system.cpp @@ -97,8 +97,8 @@ system::system(sc_core::sc_module_name nm) qspi1.irq_o(global_int_s[6]); qspi2.irq_o(global_int_s[7]); - s_dummy_sck_i[0](uart1.tx_o); - uart1.rx_i(s_dummy_sck_o[0]); + gpio0.iof0_i[16](uart1.tx_o); + uart1.rx_i(gpio0.iof0_o[17]); uart1.irq_o(global_int_s[4]); gpio0.iof1_i[0](pwm0.cmpgpio_o[0]); @@ -130,8 +130,6 @@ system::system(sc_core::sc_module_name nm) pwm2.cmpip_o[1](global_int_s[49]); pwm2.cmpip_o[2](global_int_s[50]); pwm2.cmpip_o[3](global_int_s[51]); - - for (auto &sock : s_dummy_sck_i) sock.error_if_no_callback = false; } } /* namespace sysc */ diff --git a/src/tgc_vp/system.h b/src/tgc_vp/system.h index 70577d0..ff41cbd 100644 --- a/src/tgc_vp/system.h +++ b/src/tgc_vp/system.h @@ -65,9 +65,6 @@ private: sc_core::sc_vector> global_int_s{"global_int_s", 256}, local_int_s{"local_int_s", 16}; sc_core::sc_signal core_int_s{"core_int_s"}; - sc_core::sc_vector s_dummy_sck_i{"s_dummy_sck_i", 16}; - sc_core::sc_vector s_dummy_sck_o{"s_dummy_sck_o", 16}; - protected: void gen_reset(); vpvper::sifive::spi& qspi0; diff --git a/vpvper b/vpvper index 755a9a3..ce00e1b 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 755a9a3f19cd6c3364a17ac15c521c09de71341d +Subproject commit ce00e1bb0a8dfa019287072c0c35f96195f377e0 From 50e30852bcaf720864cde6108e9587ad2489c33a Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 6 Jul 2023 07:54:27 +0200 Subject: [PATCH 11/48] updates submodules and adapts to changes there --- .gitignore | 1 + CMakeLists.txt | 60 +++++++++++++++++++++++----------- src/tgc_vp/gen/platform_mmap.h | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 6 files changed, 46 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index a5ce291..07dbbb3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /output.txt /output.trc CMakeSettings.json +/.venv diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a4e233..00d82f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,11 @@ cmake_minimum_required(VERSION 3.16) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) -include(ConanInline) - project(ecosystem-vp LANGUAGES C CXX VERSION 1.0.0) option(ENABLE_SCV "Enable the use of SCV" ON) option(LIBS_ONLY "Just build the shared libraries needed to build the VP" OFF) -option(FW_BUILD "Enable the automatic rebuild of firmware running on the VP" ON) +option(FW_BUILD "Enable the automatic rebuild of firmware running on the VP" OFF) option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) @@ -32,7 +30,17 @@ endif() if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_compile_options(/vmg /wd26812) # suppress Warnung C26812: "enum class" gegenüber "enum" (Enum.3) bevorzugen endif() + +include(ConanInline) +if(BUILD_SHARED_LIBS) + set(SHARED_FLAG "True") +else() + set(SHARED_FLAG "False") +endif() + set(CONAN_BOOST_OPTIONS +boost:fPIC=True +boost:shared=${SHARED_FLAG} boost:header_only=False boost:without_contract=True boost:without_fiber=True @@ -54,42 +62,56 @@ boost:without_timer=True boost:without_type_erasure=True boost:without_wave=True ) -if (UNIX) - list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True boost:shared=True) -endif (UNIX) +set(B2_VERSION 4.9.3) set(CONAN_PACKAGE_LIST fmt/8.0.1 spdlog/1.9.2 boost/1.75.0 gsl-lite/0.37.0 elfio/3.8 + tcc/0.9.27 + lz4/1.9.3 yaml-cpp/0.7.0 jsoncpp/1.9.5 ) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ENABLE_TCC) - list(APPEND CONAN_BOOST_OPTIONS boost:fPIC=True lua:compile_as_cpp=False) - if(ENABLE_TCC) - list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) - endif() - list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 lua/5.4.3) + list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) endif() -set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) +list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 lua/5.4.3) +set(CONAN_PACKAGE_OPTIONS fmt:header_only=True lua:compile_as_cpp=False ${CONAN_BOOST_OPTIONS}) + if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME}) - set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 systemc-cci/1.0.0) - set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} systemc:shared=True systemc-cci:shared=True systemc:disable_virtual_bind=False) + set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} + systemc/2.3.3 + systemc-cci/1.0.0 + ) + set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} + systemc:shared=${SHARED_FLAG} + systemc-cci:shared=${SHARED_FLAG} + systemc:disable_virtual_bind=False) endif() -conan_check() +conan_check() conan_add_remote(NAME minres URL https://git.minres.com/api/packages/Tooling/conan) +# Boost on CentOS 7 quirks: the b2 of conan-center is build against a newer libstdc++ and therefore does not run +# with the oooooold libs on CentOS 7. Therefore we build our own version of b2 if it is not there +set(B2_META $ENV{HOME}/.conan/data/b2/${B2_VERSION}/_/_/metadata.json) +if(DEFINED ENV{CONAN_USER_HOME}) + set(B2_META $ENV{CONAN_USER_HOME}/.conan/data/b2/${B2_VERSION}/_/_/metadata.json) +endif() +if(NOT EXISTS ${B2_META}) + conan_configure(REQUIRES b2/${B2_VERSION}) + conan_cmake_autodetect(settings) + conan_cmake_install(PATH_OR_REFERENCE . BUILD b2 SETTINGS ${settings}) +endif() +# Boost on CentOS 7 quirks end conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST} GENERATORS cmake_find_package OPTIONS ${CONAN_PACKAGE_OPTIONS} ) conan_cmake_autodetect(settings) -# needed when using CentOS devenv-7 or -8 and boost does not build because of missing GLIBCXX version -#conan_install(BUILD b2 missing) conan_install() set(CONAN_CMAKE_SILENT_OUTPUT ON) @@ -131,9 +153,9 @@ endif () add_subdirectory(scc) add_subdirectory(tgc-iss/dbt-rise-core) add_subdirectory(tgc-iss/dbt-rise-tgc) -if(NOT USE_CWR_SYSTEMC) +#if(NOT USE_CWR_SYSTEMC) add_subdirectory(vpvper) -endif() +#endif() if(NOT LIBS_ONLY) add_subdirectory(src) endif() diff --git a/src/tgc_vp/gen/platform_mmap.h b/src/tgc_vp/gen/platform_mmap.h index ddf5500..9f8b352 100644 --- a/src/tgc_vp/gen/platform_mmap.h +++ b/src/tgc_vp/gen/platform_mmap.h @@ -7,7 +7,7 @@ #define _PLATFORM_MMAP_H_ // need double braces, see // https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191 -const std::array, 13> platfrom_mmap = {{ +const std::array, 13> platfrom_mmap = {{ {clint.socket, 0x2000000, 0xc000}, {plic.socket, 0xc000000, 0x200008}, {aon.socket, 0x10000000, 0x150}, diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index c669f78..bb85be4 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit c669f78a90084d55b6a04d41cf7f92558d73e75a +Subproject commit bb85be481cfd71c9fdaad5217a044b207465f4c4 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 4dbc743..0b719a4 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 4dbc7433a5ce58e367d2e740e191929df50e39ef +Subproject commit 0b719a4b576a3ea1520193ab5a28442a939a5e4b diff --git a/vpvper b/vpvper index ce00e1b..b35f68e 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit ce00e1bb0a8dfa019287072c0c35f96195f377e0 +Subproject commit b35f68e35c2e5c254ab04008abe4fe0a279eb4d1 From 11bbf7ebeea6113a70ae3c2945d35daabc40d582 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 9 Jul 2023 22:21:49 +0200 Subject: [PATCH 12/48] updates submodules --- CMakeLists.txt | 15 ++++---- .../eclipse_launch/TGC-VP with pctrace.launch | 35 +++++++++++++++++++ 2 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 contrib/eclipse_launch/TGC-VP with pctrace.launch diff --git a/CMakeLists.txt b/CMakeLists.txt index 00d82f5..874005e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,18 +70,19 @@ set(CONAN_PACKAGE_LIST boost/1.75.0 gsl-lite/0.37.0 elfio/3.8 - tcc/0.9.27 lz4/1.9.3 yaml-cpp/0.7.0 jsoncpp/1.9.5 ) - -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ENABLE_TCC) - list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) +set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 lua/5.4.3) + list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False ) + if(ENABLE_TCC) + list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) + endif() endif() -list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 lua/5.4.3) -set(CONAN_PACKAGE_OPTIONS fmt:header_only=True lua:compile_as_cpp=False ${CONAN_BOOST_OPTIONS}) - + if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME}) set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 diff --git a/contrib/eclipse_launch/TGC-VP with pctrace.launch b/contrib/eclipse_launch/TGC-VP with pctrace.launch new file mode 100644 index 0000000..7f1e781 --- /dev/null +++ b/contrib/eclipse_launch/TGC-VP with pctrace.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 448866f0f6dd806864508a9e7b7d536f56186ce7 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 14 Jul 2023 12:55:00 +0200 Subject: [PATCH 13/48] adds update dbt-rise modules --- .cproject | 5 +++-- CMakeLists.txt | 1 - contrib/eclipse_launch/TGC-VP.launch | 8 ++++---- scc | 2 +- src/CMakeLists.txt | 6 ++++-- tgc-iss/dbt-rise-tgc | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.cproject b/.cproject index de923df..28139f2 100644 --- a/.cproject +++ b/.cproject @@ -46,11 +46,11 @@ - + - + @@ -106,6 +106,7 @@ + diff --git a/CMakeLists.txt b/CMakeLists.txt index 874005e..b6d9da5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,7 +122,6 @@ find_package(fmt) find_package(spdlog) find_package(gsl-lite) set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install. - find_package(Boost REQUIRED COMPONENTS program_options QUIET) set(CLANG_FORMAT_EXCLUDE_PATTERNS "scc") diff --git a/contrib/eclipse_launch/TGC-VP.launch b/contrib/eclipse_launch/TGC-VP.launch index f28407a..9b2a268 100644 --- a/contrib/eclipse_launch/TGC-VP.launch +++ b/contrib/eclipse_launch/TGC-VP.launch @@ -12,17 +12,17 @@ - + - - + + - + diff --git a/scc b/scc index 76f36cc..dc31600 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 76f36cc6068e2e586675289e4d48559146560ec0 +Subproject commit dc3160065b24cfbb1aec570b64070a8f6b7bdc59 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f848d17..2d73139 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,9 +4,10 @@ # SPDX-License-Identifier: Apache-2.0 # cmake_minimum_required(VERSION 3.12) - project(tgc-vp LANGUAGES C CXX VERSION 0.0.1) +include(flink) + find_package(Boost COMPONENTS program_options thread REQUIRED) ############################################################################### # SiFive @@ -18,7 +19,8 @@ add_executable(${PROJECT_NAME} tgc_vp/system.cpp ) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR}) -target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc_sc vpvper_generic vpvper_sifive ${BOOST_program_options_LIBRARY}) +target_force_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc_sc) +target_link_libraries(${PROJECT_NAME} PUBLIC vpvper_generic vpvper_sifive ${BOOST_program_options_LIBRARY}) if(TARGET Boost::program_options) target_link_libraries(${PROJECT_NAME} PUBLIC Boost::program_options Boost::thread) else() diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 0b719a4..720236e 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 0b719a4b576a3ea1520193ab5a28442a939a5e4b +Subproject commit 720236ec3faf87246d15252278532a054c042875 From 0f88596af5fa3773aba9d5302c62db4597b0ca41 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 31 Jul 2023 12:57:29 +0200 Subject: [PATCH 14/48] updates to use TCC and LLVM in TGC_VP --- .gitignore | 2 ++ CMakeLists.txt | 26 +++++++++----- .../{TGC-VP.launch => TGC-VP interp.launch} | 0 contrib/eclipse_launch/TGC-VP tcc.launch | 35 +++++++++++++++++++ src/CLIParser.cpp | 9 +++++ src/sc_main.cpp | 1 + tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 8 files changed, 66 insertions(+), 11 deletions(-) rename contrib/eclipse_launch/{TGC-VP.launch => TGC-VP interp.launch} (100%) create mode 100644 contrib/eclipse_launch/TGC-VP tcc.launch diff --git a/.gitignore b/.gitignore index 07dbbb3..8d194cb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ /output.trc CMakeSettings.json /.venv +/src-gen/ +/*.json diff --git a/CMakeLists.txt b/CMakeLists.txt index b6d9da5..f8b6c58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,6 @@ option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) option(ENABLE_CLANGTIDY "Enable static analysis with clang-tidy." OFF) -option(ENABLE_TCC "Enable the use of TCC" ON) set(SCC_LIB_ONLY ON) set(CMAKE_CXX_STANDARD 14) @@ -63,7 +62,7 @@ boost:without_type_erasure=True boost:without_wave=True ) -set(B2_VERSION 4.9.3) +set(B2_VERSION 4.9.6) set(CONAN_PACKAGE_LIST fmt/8.0.1 spdlog/1.9.2 @@ -76,13 +75,19 @@ set(CONAN_PACKAGE_LIST ) set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 lua/5.4.3) + list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 tcc/0.9.27) list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False ) - if(ENABLE_TCC) - list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) - endif() + set(WITH_TCC ON) endif() - +if(WITH_LLVM) + list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0) + list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=True) +endif() +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tgc-iss/dbt-rise-plugins) + list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False) + list(APPEND CONAN_PACKAGE_LIST lua/5.4.3) +endif() + if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME}) set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 @@ -153,9 +158,12 @@ endif () add_subdirectory(scc) add_subdirectory(tgc-iss/dbt-rise-core) add_subdirectory(tgc-iss/dbt-rise-tgc) -#if(NOT USE_CWR_SYSTEMC) +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tgc-iss//dbt-rise-plugins) + add_subdirectory(tgc-iss/dbt-rise-plugins) +endif() +if(NOT USE_CWR_SYSTEMC) add_subdirectory(vpvper) -#endif() +endif() if(NOT LIBS_ONLY) add_subdirectory(src) endif() diff --git a/contrib/eclipse_launch/TGC-VP.launch b/contrib/eclipse_launch/TGC-VP interp.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP.launch rename to contrib/eclipse_launch/TGC-VP interp.launch diff --git a/contrib/eclipse_launch/TGC-VP tcc.launch b/contrib/eclipse_launch/TGC-VP tcc.launch new file mode 100644 index 0000000..d854972 --- /dev/null +++ b/contrib/eclipse_launch/TGC-VP tcc.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index fcbfabb..f94518c 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -10,12 +10,16 @@ #include #include #include +#include #ifdef ERROR #undef ERROR #endif namespace po = boost::program_options; using namespace sc_core; +namespace { +std::unordered_set backend_opts = {"interp", "tcc"}; +} CLIParser::CLIParser(int argc, char *argv[]) : desc("Options") , valid(false) { @@ -28,9 +32,12 @@ CLIParser::CLIParser(int argc, char *argv[]) } po::notify(vm_); // throws on error, so do after help in case there are any problems valid = true; + if(backend_opts.find(vm_["backend"].as())== std::end(backend_opts)) + throw po::error("Illegal value for switch backend"); } catch (po::error &e) { std::cerr << "ERROR: " << e.what() << std::endl << std::endl; std::cerr << desc << std::endl; + exit(-1); } auto log_level = vm_["verbose"].as(); auto log_level_num = static_cast(log_level); @@ -74,6 +81,8 @@ void CLIParser::build() { "ELF file to load") ("gdb-port,g", po::value()->default_value(0), "enable gdb server and specify port to use") + ("backend", po::value()->default_value("interp"), + "the ISS backend to use, options are: interp, tcc") ("dump-ir", "dump the intermediate representation") ("dump-structure", po::value(), diff --git a/src/sc_main.cpp b/src/sc_main.cpp index 2d875ae..193ca75 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -87,6 +87,7 @@ int sc_main(int argc, char *argv[]) { /////////////////////////////////////////////////////////////////////////// cfg.set_value(core_path + ".gdb_server_port", parser.get("gdb-port")); cfg.set_value(core_path + ".dump_ir", parser.is_set("dump-ir")); + cfg.set_value(core_path + ".backend", parser.get("backend")); if(parser.is_set("plugin")){ auto plugins = util::join(parser.get>("plugin"),","); cfg.set_value(core_path + ".plugins", plugins); diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index bb85be4..e256725 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit bb85be481cfd71c9fdaad5217a044b207465f4c4 +Subproject commit e2567254a3bf6c93f68bd1d8a40e9ba7cb2e0f53 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 720236e..e151416 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 720236ec3faf87246d15252278532a054c042875 +Subproject commit e151416f5878ccc2bfca00e7e7c86084c46e40bd From a0cbb1dcfa40de13db79b35043f26dc35777f8f3 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 4 Aug 2023 13:17:58 +0200 Subject: [PATCH 15/48] updates dbt-rise submodules --- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index e256725..22a0503 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit e2567254a3bf6c93f68bd1d8a40e9ba7cb2e0f53 +Subproject commit 22a0503f2ebe36fa44a5ef1c86950e2dc621848c diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index e151416..20e9203 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit e151416f5878ccc2bfca00e7e7c86084c46e40bd +Subproject commit 20e920338c43c7e8960c158877904b6ab9abb1a3 From 79a0749fbe5b7af5613d745a33da0c13e5db9d26 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 15 Aug 2023 13:50:22 +0200 Subject: [PATCH 16/48] updates dbt-rise-tgc --- .cproject | 32 ++++++++++++++++++++++---------- tgc-iss/dbt-rise-tgc | 2 +- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.cproject b/.cproject index 28139f2..f59de53 100644 --- a/.cproject +++ b/.cproject @@ -69,7 +69,7 @@ - + @@ -99,6 +99,12 @@ + + + + + + @@ -114,15 +120,6 @@ - - - - - - - - - @@ -151,4 +148,19 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 20e9203..18e08cf 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 20e920338c43c7e8960c158877904b6ab9abb1a3 +Subproject commit 18e08cfc50c91ac68bd9cfb3aa5cfe92b1f0777c From 1be480576d09736bb842f1cdb14d4e2fbfa0e072 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 15 Aug 2023 13:54:13 +0200 Subject: [PATCH 17/48] updates launch config and FW build --- .cproject | 3 +- CMakeLists.txt | 19 +++++++--- .../TGC-VP interp dhrystone.launch | 35 +++++++++++++++++++ ...terp.launch => TGC-VP interp hello.launch} | 0 .../TGC-VP tcc dhrystone.launch | 35 +++++++++++++++++++ ...-VP tcc.launch => TGC-VP tcc hello.launch} | 0 6 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 contrib/eclipse_launch/TGC-VP interp dhrystone.launch rename contrib/eclipse_launch/{TGC-VP interp.launch => TGC-VP interp hello.launch} (100%) create mode 100644 contrib/eclipse_launch/TGC-VP tcc dhrystone.launch rename contrib/eclipse_launch/{TGC-VP tcc.launch => TGC-VP tcc hello.launch} (100%) diff --git a/.cproject b/.cproject index f59de53..1382e75 100644 --- a/.cproject +++ b/.cproject @@ -46,11 +46,12 @@ - + + diff --git a/CMakeLists.txt b/CMakeLists.txt index f8b6c58..958d1a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(ecosystem-vp LANGUAGES C CXX VERSION 1.0.0) option(ENABLE_SCV "Enable the use of SCV" ON) option(LIBS_ONLY "Just build the shared libraries needed to build the VP" OFF) -option(FW_BUILD "Enable the automatic rebuild of firmware running on the VP" OFF) +option(FW_BUILD "Enable the automatic download and build of some firmware to run on the VP" OFF) option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) @@ -77,7 +77,7 @@ set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 tcc/0.9.27) list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False ) - set(WITH_TCC ON) + option(WITH_TCC "Build TCC backend" ON) endif() if(WITH_LLVM) list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0) @@ -167,9 +167,20 @@ endif() if(NOT LIBS_ONLY) add_subdirectory(src) endif() + if(FW_BUILD) - add_custom_target(fw-hello-world ALL COMMAND make -C fw/hello-world - USES_TERMINAL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + include(FetchContent) + set(FETCHCONTENT_BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}/..) + FetchContent_Declare( + riscvfw + GIT_REPOSITORY https://git.minres.com/VP/Firmwares.git + GIT_TAG main + ) + FetchContent_GetProperties(riscvfw) + if(NOT riscvfw_POPULATED) + FetchContent_Populate(riscvfw) + add_subdirectory(${riscvfw_SOURCE_DIR}) + endif() endif() # CTest is a testing tool that can be used to test your project. diff --git a/contrib/eclipse_launch/TGC-VP interp dhrystone.launch b/contrib/eclipse_launch/TGC-VP interp dhrystone.launch new file mode 100644 index 0000000..a1bc0d0 --- /dev/null +++ b/contrib/eclipse_launch/TGC-VP interp dhrystone.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/eclipse_launch/TGC-VP interp.launch b/contrib/eclipse_launch/TGC-VP interp hello.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP interp.launch rename to contrib/eclipse_launch/TGC-VP interp hello.launch diff --git a/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch b/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch new file mode 100644 index 0000000..1c02e04 --- /dev/null +++ b/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/eclipse_launch/TGC-VP tcc.launch b/contrib/eclipse_launch/TGC-VP tcc hello.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP tcc.launch rename to contrib/eclipse_launch/TGC-VP tcc hello.launch From f0660235edabf83ec515749c6048249769d4c4fd Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 20 Aug 2023 16:47:47 +0200 Subject: [PATCH 18/48] fixes fw add subdir --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 958d1a8..2bf61b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,8 +179,8 @@ if(FW_BUILD) FetchContent_GetProperties(riscvfw) if(NOT riscvfw_POPULATED) FetchContent_Populate(riscvfw) - add_subdirectory(${riscvfw_SOURCE_DIR}) endif() + add_subdirectory(${riscvfw_SOURCE_DIR}) endif() # CTest is a testing tool that can be used to test your project. From 7503a4df2f0d9373fe8fc7c9e4c5c90a72671a16 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 15 Oct 2023 10:02:31 +0200 Subject: [PATCH 19/48] updates dbt-rise components --- CMakeLists.txt | 10 ++++++---- scc | 2 +- src/CLIParser.cpp | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bf61b2..9504951 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.16) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/tgc-iss/dbt-rise-tgc/cmake/) project(ecosystem-vp LANGUAGES C CXX VERSION 1.0.0) @@ -10,6 +11,7 @@ option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) option(ENABLE_CLANGTIDY "Enable static analysis with clang-tidy." OFF) +option(WITH_TCC "Build TCC backend" ON) set(SCC_LIB_ONLY ON) set(CMAKE_CXX_STANDARD 14) @@ -71,13 +73,12 @@ set(CONAN_PACKAGE_LIST elfio/3.8 lz4/1.9.3 yaml-cpp/0.7.0 - jsoncpp/1.9.5 + jsoncpp/1.9.5 ) set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND WITH_TCC) list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 tcc/0.9.27) list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False ) - option(WITH_TCC "Build TCC backend" ON) endif() if(WITH_LLVM) list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0) @@ -126,6 +127,7 @@ find_package(elfio) find_package(fmt) find_package(spdlog) find_package(gsl-lite) +find_package(yaml-cpp) set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install. find_package(Boost REQUIRED COMPONENTS program_options QUIET) diff --git a/scc b/scc index dc31600..da124c3 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit dc3160065b24cfbb1aec570b64070a8f6b7bdc59 +Subproject commit da124c34e8943072254418dbdbee9ea18211123b diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index f94518c..9b68e15 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -28,7 +28,7 @@ CLIParser::CLIParser(int argc, char *argv[]) po::store(po::parse_command_line(argc, argv, desc), vm_); // can throw // --help option if (vm_.count("help")) { - std::cout << "DBT-RISE-RiscV simulator for RISC-V" << std::endl << desc << std::endl; + std::cout << "DBT-RISE-TGC based virtual platform of TGC cores" << std::endl << desc << std::endl; } po::notify(vm_); // throws on error, so do after help in case there are any problems valid = true; diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 22a0503..ac18f84 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 22a0503f2ebe36fa44a5ef1c86950e2dc621848c +Subproject commit ac18f84077690def42aa6235756a85ca29cf0739 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 18e08cf..ae4322c 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 18e08cfc50c91ac68bd9cfb3aa5cfe92b1f0777c +Subproject commit ae4322c1b967e7d9e98ff30a3cb7bd94476e9ada diff --git a/vpvper b/vpvper index b35f68e..2a3ec57 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit b35f68e35c2e5c254ab04008abe4fe0a279eb4d1 +Subproject commit 2a3ec57906b8c5a1ab1cb146f214fe0b19aed564 From f38560662c01b4e2fef879de474a319fb4ed06b3 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 15 Oct 2023 11:11:20 +0200 Subject: [PATCH 20/48] adds VP install step --- src/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2d73139..7061602 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,4 +25,12 @@ if(TARGET Boost::program_options) target_link_libraries(${PROJECT_NAME} PUBLIC Boost::program_options Boost::thread) else() target_link_libraries(${PROJECT_NAME} PUBLIC ${BOOST_program_options_LIBRARY}) -endif() \ No newline at end of file +endif() +install(TARGETS ${PROJECT_NAME} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # static lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # binaries + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # shared lib + FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR} # for mac + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} # headers for mac (note the different component -> different package) + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # headers +) From 2e478adcfc4449cef09c546da0fc6be177462e31 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 18 Oct 2023 11:24:11 +0200 Subject: [PATCH 21/48] adds rpath setting to install process --- src/CMakeLists.txt | 4 +++- tgc-iss/dbt-rise-tgc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7061602..778f9bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,8 +10,9 @@ include(flink) find_package(Boost COMPONENTS program_options thread REQUIRED) ############################################################################### -# SiFive +# TGC ############################################################################### +set(CMAKE_INSTALL_RPATH $ORIGIN/../${CMAKE_INSTALL_LIBDIR}) add_executable(${PROJECT_NAME} sc_main.cpp CLIParser.cpp @@ -26,6 +27,7 @@ if(TARGET Boost::program_options) else() target_link_libraries(${PROJECT_NAME} PUBLIC ${BOOST_program_options_LIBRARY}) endif() + install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # static lib RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # binaries diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index ae4322c..aa12e93 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit ae4322c1b967e7d9e98ff30a3cb7bd94476e9ada +Subproject commit aa12e93177eadbf5e4131a9768056c1b14e7fa8c From 024f3666d55c9a907c014450ff54ac8cde4e9331 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 19 Oct 2023 08:02:34 +0200 Subject: [PATCH 22/48] updates dbt-rise-core --- tgc-iss/dbt-rise-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index ac18f84..8857cd8 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit ac18f84077690def42aa6235756a85ca29cf0739 +Subproject commit 8857cd84a73f35dfaa0046b225f499811100856e From 53e6b24a9e90a2dc29327b61a37e5267df380e6e Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 19 Oct 2023 19:21:52 +0200 Subject: [PATCH 23/48] updates scc --- scc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scc b/scc index da124c3..0f3e408 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit da124c34e8943072254418dbdbee9ea18211123b +Subproject commit 0f3e408816863f2a8b866ef6da111c6fdfbec952 From 4573e2bfe2b9eeb407f1bda398a4a4c7f02b1299 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 20 Oct 2023 19:49:48 +0200 Subject: [PATCH 24/48] adds gitignore in tgc-iss --- tgc-iss/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 tgc-iss/.gitignore diff --git a/tgc-iss/.gitignore b/tgc-iss/.gitignore new file mode 100644 index 0000000..098c3ef --- /dev/null +++ b/tgc-iss/.gitignore @@ -0,0 +1 @@ +/dbt-rise-plugins From afd92d10d4761319cab309b6ba1fb1f673274dc3 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 21 Oct 2023 15:09:26 +0200 Subject: [PATCH 25/48] updates submodules and fixes contrib files --- contrib/TGC5C_instr.yaml | 532 ++++++++++++++++++++++++++++ contrib/TGC_C_cycles.json | 724 -------------------------------------- scc | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 5 files changed, 535 insertions(+), 727 deletions(-) create mode 100644 contrib/TGC5C_instr.yaml delete mode 100644 contrib/TGC_C_cycles.json diff --git a/contrib/TGC5C_instr.yaml b/contrib/TGC5C_instr.yaml new file mode 100644 index 0000000..8f14fe9 --- /dev/null +++ b/contrib/TGC5C_instr.yaml @@ -0,0 +1,532 @@ + +RV32I: + LUI: + encoding: 0b00000000000000000000000000110111 + mask: 0b00000000000000000000000001111111 + size: 32 + branch: false + delay: 1 + AUIPC: + encoding: 0b00000000000000000000000000010111 + mask: 0b00000000000000000000000001111111 + size: 32 + branch: false + delay: 1 + JAL: + encoding: 0b00000000000000000000000001101111 + mask: 0b00000000000000000000000001111111 + size: 32 + branch: true + delay: 1 + JALR: + encoding: 0b00000000000000000000000001100111 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + BEQ: + encoding: 0b00000000000000000000000001100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + BNE: + encoding: 0b00000000000000000001000001100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + BLT: + encoding: 0b00000000000000000100000001100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + BGE: + encoding: 0b00000000000000000101000001100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + BLTU: + encoding: 0b00000000000000000110000001100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + BGEU: + encoding: 0b00000000000000000111000001100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: true + delay: [1,1] + LB: + encoding: 0b00000000000000000000000000000011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + LH: + encoding: 0b00000000000000000001000000000011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + LW: + encoding: 0b00000000000000000010000000000011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + LBU: + encoding: 0b00000000000000000100000000000011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + LHU: + encoding: 0b00000000000000000101000000000011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + SB: + encoding: 0b00000000000000000000000000100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + SH: + encoding: 0b00000000000000000001000000100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + SW: + encoding: 0b00000000000000000010000000100011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + ADDI: + encoding: 0b00000000000000000000000000010011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + SLTI: + encoding: 0b00000000000000000010000000010011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + SLTIU: + encoding: 0b00000000000000000011000000010011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + XORI: + encoding: 0b00000000000000000100000000010011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + ORI: + encoding: 0b00000000000000000110000000010011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + ANDI: + encoding: 0b00000000000000000111000000010011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + SLLI: + encoding: 0b00000000000000000001000000010011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SRLI: + encoding: 0b00000000000000000101000000010011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SRAI: + encoding: 0b01000000000000000101000000010011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + ADD: + encoding: 0b00000000000000000000000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SUB: + encoding: 0b01000000000000000000000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SLL: + encoding: 0b00000000000000000001000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SLT: + encoding: 0b00000000000000000010000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SLTU: + encoding: 0b00000000000000000011000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + XOR: + encoding: 0b00000000000000000100000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SRL: + encoding: 0b00000000000000000101000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + SRA: + encoding: 0b01000000000000000101000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + OR: + encoding: 0b00000000000000000110000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + AND: + encoding: 0b00000000000000000111000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + FENCE: + encoding: 0b00000000000000000000000000001111 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + ECALL: + encoding: 0b00000000000000000000000001110011 + mask: 0b11111111111111111111111111111111 + size: 32 + branch: false + delay: 1 + EBREAK: + encoding: 0b00000000000100000000000001110011 + mask: 0b11111111111111111111111111111111 + size: 32 + branch: false + delay: 1 + MRET: + encoding: 0b00110000001000000000000001110011 + mask: 0b11111111111111111111111111111111 + attributes: [[name:no_cont]] + size: 32 + branch: false + delay: 1 + WFI: + encoding: 0b00010000010100000000000001110011 + mask: 0b11111111111111111111111111111111 + size: 32 + branch: false + delay: 1 +Zicsr: + CSRRW: + encoding: 0b00000000000000000001000001110011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + CSRRS: + encoding: 0b00000000000000000010000001110011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + CSRRC: + encoding: 0b00000000000000000011000001110011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + CSRRWI: + encoding: 0b00000000000000000101000001110011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + CSRRSI: + encoding: 0b00000000000000000110000001110011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 + CSRRCI: + encoding: 0b00000000000000000111000001110011 + mask: 0b00000000000000000111000001111111 + size: 32 + branch: false + delay: 1 +Zifencei: + FENCE_I: + encoding: 0b00000000000000000001000000001111 + mask: 0b00000000000000000111000001111111 + attributes: [[name:flush]] + size: 32 + branch: false + delay: 1 +RV32M: + MUL: + encoding: 0b00000010000000000000000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + MULH: + encoding: 0b00000010000000000001000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + MULHSU: + encoding: 0b00000010000000000010000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + MULHU: + encoding: 0b00000010000000000011000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + DIV: + encoding: 0b00000010000000000100000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + DIVU: + encoding: 0b00000010000000000101000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + REM: + encoding: 0b00000010000000000110000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 + REMU: + encoding: 0b00000010000000000111000000110011 + mask: 0b11111110000000000111000001111111 + size: 32 + branch: false + delay: 1 +RV32IC: + C__ADDI4SPN: + encoding: 0b0000000000000000 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__LW: + encoding: 0b0100000000000000 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__SW: + encoding: 0b1100000000000000 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__ADDI: + encoding: 0b0000000000000001 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__NOP: + encoding: 0b0000000000000001 + mask: 0b1110111110000011 + size: 16 + branch: false + delay: 1 + C__JAL: + encoding: 0b0010000000000001 + mask: 0b1110000000000011 + size: 16 + branch: true + delay: 1 + C__LI: + encoding: 0b0100000000000001 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__LUI: + encoding: 0b0110000000000001 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__ADDI16SP: + encoding: 0b0110000100000001 + mask: 0b1110111110000011 + size: 16 + branch: false + delay: 1 + __reserved_clui: + encoding: 0b0110000000000001 + mask: 0b1111000001111111 + size: 16 + branch: false + delay: 1 + C__SRLI: + encoding: 0b1000000000000001 + mask: 0b1111110000000011 + size: 16 + branch: false + delay: 1 + C__SRAI: + encoding: 0b1000010000000001 + mask: 0b1111110000000011 + size: 16 + branch: false + delay: 1 + C__ANDI: + encoding: 0b1000100000000001 + mask: 0b1110110000000011 + size: 16 + branch: false + delay: 1 + C__SUB: + encoding: 0b1000110000000001 + mask: 0b1111110001100011 + size: 16 + branch: false + delay: 1 + C__XOR: + encoding: 0b1000110000100001 + mask: 0b1111110001100011 + size: 16 + branch: false + delay: 1 + C__OR: + encoding: 0b1000110001000001 + mask: 0b1111110001100011 + size: 16 + branch: false + delay: 1 + C__AND: + encoding: 0b1000110001100001 + mask: 0b1111110001100011 + size: 16 + branch: false + delay: 1 + C__J: + encoding: 0b1010000000000001 + mask: 0b1110000000000011 + size: 16 + branch: true + delay: 1 + C__BEQZ: + encoding: 0b1100000000000001 + mask: 0b1110000000000011 + size: 16 + branch: true + delay: [1,1] + C__BNEZ: + encoding: 0b1110000000000001 + mask: 0b1110000000000011 + size: 16 + branch: true + delay: [1,1] + C__SLLI: + encoding: 0b0000000000000010 + mask: 0b1111000000000011 + attributes: [[name:enable, value:1]] + size: 16 + branch: false + delay: 1 + C__LWSP: + encoding: 0b0100000000000010 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + C__MV: + encoding: 0b1000000000000010 + mask: 0b1111000000000011 + size: 16 + branch: false + delay: 1 + C__JR: + encoding: 0b1000000000000010 + mask: 0b1111000001111111 + size: 16 + branch: true + delay: 1 + __reserved_cmv: + encoding: 0b1000000000000010 + mask: 0b1111111111111111 + size: 16 + branch: false + delay: 1 + C__ADD: + encoding: 0b1001000000000010 + mask: 0b1111000000000011 + size: 16 + branch: false + delay: 1 + C__JALR: + encoding: 0b1001000000000010 + mask: 0b1111000001111111 + size: 16 + branch: true + delay: 1 + C__EBREAK: + encoding: 0b1001000000000010 + mask: 0b1111111111111111 + size: 16 + branch: false + delay: 1 + C__SWSP: + encoding: 0b1100000000000010 + mask: 0b1110000000000011 + size: 16 + branch: false + delay: 1 + DII: + encoding: 0b0000000000000000 + mask: 0b1111111111111111 + size: 16 + branch: false + delay: 1 + diff --git a/contrib/TGC_C_cycles.json b/contrib/TGC_C_cycles.json deleted file mode 100644 index 61bc4ee..0000000 --- a/contrib/TGC_C_cycles.json +++ /dev/null @@ -1,724 +0,0 @@ -{ - "TGC_C" : [ - { - "name" : "LUI", - "size" : 32, - "encoding": "0b00000000000000000000000000110111", - "mask": "0b00000000000000000000000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "AUIPC", - "size" : 32, - "encoding": "0b00000000000000000000000000010111", - "mask": "0b00000000000000000000000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "JAL", - "size" : 32, - "encoding": "0b00000000000000000000000001101111", - "mask": "0b00000000000000000000000001111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "JALR", - "size" : 32, - "encoding": "0b00000000000000000000000001100111", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "BEQ", - "size" : 32, - "encoding": "0b00000000000000000000000001100011", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "BNE", - "size" : 32, - "encoding": "0b00000000000000000001000001100011", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "BLT", - "size" : 32, - "encoding": "0b00000000000000000100000001100011", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "BGE", - "size" : 32, - "encoding": "0b00000000000000000101000001100011", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "BLTU", - "size" : 32, - "encoding": "0b00000000000000000110000001100011", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "BGEU", - "size" : 32, - "encoding": "0b00000000000000000111000001100011", - "mask": "0b00000000000000000111000001111111", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "LB", - "size" : 32, - "encoding": "0b00000000000000000000000000000011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "LH", - "size" : 32, - "encoding": "0b00000000000000000001000000000011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "LW", - "size" : 32, - "encoding": "0b00000000000000000010000000000011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "LBU", - "size" : 32, - "encoding": "0b00000000000000000100000000000011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "LHU", - "size" : 32, - "encoding": "0b00000000000000000101000000000011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SB", - "size" : 32, - "encoding": "0b00000000000000000000000000100011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SH", - "size" : 32, - "encoding": "0b00000000000000000001000000100011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SW", - "size" : 32, - "encoding": "0b00000000000000000010000000100011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "ADDI", - "size" : 32, - "encoding": "0b00000000000000000000000000010011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SLTI", - "size" : 32, - "encoding": "0b00000000000000000010000000010011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SLTIU", - "size" : 32, - "encoding": "0b00000000000000000011000000010011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "XORI", - "size" : 32, - "encoding": "0b00000000000000000100000000010011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "ORI", - "size" : 32, - "encoding": "0b00000000000000000110000000010011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "ANDI", - "size" : 32, - "encoding": "0b00000000000000000111000000010011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SLLI", - "size" : 32, - "encoding": "0b00000000000000000001000000010011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SRLI", - "size" : 32, - "encoding": "0b00000000000000000101000000010011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SRAI", - "size" : 32, - "encoding": "0b01000000000000000101000000010011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "ADD", - "size" : 32, - "encoding": "0b00000000000000000000000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SUB", - "size" : 32, - "encoding": "0b01000000000000000000000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SLL", - "size" : 32, - "encoding": "0b00000000000000000001000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SLT", - "size" : 32, - "encoding": "0b00000000000000000010000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SLTU", - "size" : 32, - "encoding": "0b00000000000000000011000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "XOR", - "size" : 32, - "encoding": "0b00000000000000000100000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SRL", - "size" : 32, - "encoding": "0b00000000000000000101000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "SRA", - "size" : 32, - "encoding": "0b01000000000000000101000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "OR", - "size" : 32, - "encoding": "0b00000000000000000110000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "AND", - "size" : 32, - "encoding": "0b00000000000000000111000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "FENCE", - "size" : 32, - "encoding": "0b00000000000000000000000000001111", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "ECALL", - "size" : 32, - "encoding": "0b00000000000000000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "EBREAK", - "size" : 32, - "encoding": "0b00000000000100000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "URET", - "size" : 32, - "encoding": "0b00000000001000000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "SRET", - "size" : 32, - "encoding": "0b00010000001000000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "MRET", - "size" : 32, - "encoding": "0b00110000001000000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "WFI", - "size" : 32, - "encoding": "0b00010000010100000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "DRET", - "size" : 32, - "encoding": "0b01111011001000000000000001110011", - "mask": "0b11111111111111111111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "CSRRW", - "size" : 32, - "encoding": "0b00000000000000000001000001110011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRRS", - "size" : 32, - "encoding": "0b00000000000000000010000001110011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRRC", - "size" : 32, - "encoding": "0b00000000000000000011000001110011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRRWI", - "size" : 32, - "encoding": "0b00000000000000000101000001110011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRRSI", - "size" : 32, - "encoding": "0b00000000000000000110000001110011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRRCI", - "size" : 32, - "encoding": "0b00000000000000000111000001110011", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "FENCE_I", - "size" : 32, - "encoding": "0b00000000000000000001000000001111", - "mask": "0b00000000000000000111000001111111", - "branch": false, - "delay" : 2 - }, - { - "name" : "MUL", - "size" : 32, - "encoding": "0b00000010000000000000000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "MULH", - "size" : 32, - "encoding": "0b00000010000000000001000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "MULHSU", - "size" : 32, - "encoding": "0b00000010000000000010000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "MULHU", - "size" : 32, - "encoding": "0b00000010000000000011000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "DIV", - "size" : 32, - "encoding": "0b00000010000000000100000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "DIVU", - "size" : 32, - "encoding": "0b00000010000000000101000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "REM", - "size" : 32, - "encoding": "0b00000010000000000110000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "REMU", - "size" : 32, - "encoding": "0b00000010000000000111000000110011", - "mask": "0b11111110000000000111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CADDI4SPN", - "size" : 16, - "encoding": "0b0000000000000000", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CLW", - "size" : 16, - "encoding": "0b0100000000000000", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSW", - "size" : 16, - "encoding": "0b1100000000000000", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CADDI", - "size" : 16, - "encoding": "0b0000000000000001", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CNOP", - "size" : 16, - "encoding": "0b0000000000000001", - "mask": "0b1110111110000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CJAL", - "size" : 16, - "encoding": "0b0010000000000001", - "mask": "0b1110000000000011", - "branch": true, - "delay" : 2 - }, - { - "name" : "CLI", - "size" : 16, - "encoding": "0b0100000000000001", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CLUI", - "size" : 16, - "encoding": "0b0110000000000001", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CADDI16SP", - "size" : 16, - "encoding": "0b0110000100000001", - "mask": "0b1110111110000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "__reserved_clui", - "size" : 16, - "encoding": "0b0110000000000001", - "mask": "0b1111000001111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRLI", - "size" : 16, - "encoding": "0b1000000000000001", - "mask": "0b1111110000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSRAI", - "size" : 16, - "encoding": "0b1000010000000001", - "mask": "0b1111110000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CANDI", - "size" : 16, - "encoding": "0b1000100000000001", - "mask": "0b1110110000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CSUB", - "size" : 16, - "encoding": "0b1000110000000001", - "mask": "0b1111110001100011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CXOR", - "size" : 16, - "encoding": "0b1000110000100001", - "mask": "0b1111110001100011", - "branch": false, - "delay" : 1 - }, - { - "name" : "COR", - "size" : 16, - "encoding": "0b1000110001000001", - "mask": "0b1111110001100011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CAND", - "size" : 16, - "encoding": "0b1000110001100001", - "mask": "0b1111110001100011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CJ", - "size" : 16, - "encoding": "0b1010000000000001", - "mask": "0b1110000000000011", - "branch": true, - "delay" : 2 - }, - { - "name" : "CBEQZ", - "size" : 16, - "encoding": "0b1100000000000001", - "mask": "0b1110000000000011", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "CBNEZ", - "size" : 16, - "encoding": "0b1110000000000001", - "mask": "0b1110000000000011", - "branch": true, - "delay" : [2,1] - }, - { - "name" : "CSLLI", - "size" : 16, - "encoding": "0b0000000000000010", - "mask": "0b1111000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CLWSP", - "size" : 16, - "encoding": "0b0100000000000010", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CMV", - "size" : 16, - "encoding": "0b1000000000000010", - "mask": "0b1111000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CJR", - "size" : 16, - "encoding": "0b1000000000000010", - "mask": "0b1111000001111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "__reserved_cmv", - "size" : 16, - "encoding": "0b1000000000000010", - "mask": "0b1111111111111111", - "branch": false, - "delay" : 1 - }, - { - "name" : "CADD", - "size" : 16, - "encoding": "0b1001000000000010", - "mask": "0b1111000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "CJALR", - "size" : 16, - "encoding": "0b1001000000000010", - "mask": "0b1111000001111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "CEBREAK", - "size" : 16, - "encoding": "0b1001000000000010", - "mask": "0b1111111111111111", - "branch": true, - "delay" : 2 - }, - { - "name" : "CSWSP", - "size" : 16, - "encoding": "0b1100000000000010", - "mask": "0b1110000000000011", - "branch": false, - "delay" : 1 - }, - { - "name" : "DII", - "size" : 16, - "encoding": "0b0000000000000000", - "mask": "0b1111111111111111", - "branch": false, - "delay" : 1 - } - ] -} \ No newline at end of file diff --git a/scc b/scc index 0f3e408..12e2782 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 0f3e408816863f2a8b866ef6da111c6fdfbec952 +Subproject commit 12e2782b61f4e254e46157e25720754771ecced7 diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 8857cd8..803414f 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 8857cd84a73f35dfaa0046b225f499811100856e +Subproject commit 803414fa8c1bb1a73571e24e81ddc5f5fa42e218 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index aa12e93..74ff1d4 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit aa12e93177eadbf5e4131a9768056c1b14e7fa8c +Subproject commit 74ff1d455a43d83929c28017a31f14247077dfa8 From 08ecead971a742e0012aefab7d22bfe5f1b644bd Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 21 Oct 2023 17:26:51 +0200 Subject: [PATCH 26/48] updates submodules and does some cleanup if directory structure --- .clang-format | 96 ++++ .../FW-Debug.launch | 0 .../TGC-VP interp dhrystone.launch | 0 .../TGC-VP interp hello.launch | 0 .../TGC-VP tcc dhrystone.launch | 0 .../TGC-VP tcc hello.launch | 0 .../TGC-VP with pctrace.launch | 0 .../TGC-VP-FW-Debug.launch | 0 .../TGC-VP-GDBServer.launch | 0 contrib/TGC5C_instr.yaml | 532 ------------------ tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 12 files changed, 98 insertions(+), 534 deletions(-) create mode 100644 .clang-format rename {contrib/eclipse_launch => .launch}/FW-Debug.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP interp dhrystone.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP interp hello.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP tcc dhrystone.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP tcc hello.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP with pctrace.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP-FW-Debug.launch (100%) rename {contrib/eclipse_launch => .launch}/TGC-VP-GDBServer.launch (100%) delete mode 100644 contrib/TGC5C_instr.yaml diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..48c14b9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,96 @@ +Language: Cpp +# BasedOnStyle: LLVM +# should be in line with IndentWidth +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlinesLeft: false +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: true +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 120 +CommentPragmas: '^( IWYU pragma:| @suppress)' +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 0 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +IncludeCategories: + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' + Priority: 2 + - Regex: '^(<|"(gtest|isl|json)/)' + Priority: 3 + - Regex: '.*' + Priority: 1 +IncludeIsMainRegex: '$' +IndentCaseLabels: false +IndentWidth: 4 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +ReflowComments: true +SortIncludes: true +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: Never +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 4 +UseTab: Never +... + diff --git a/contrib/eclipse_launch/FW-Debug.launch b/.launch/FW-Debug.launch similarity index 100% rename from contrib/eclipse_launch/FW-Debug.launch rename to .launch/FW-Debug.launch diff --git a/contrib/eclipse_launch/TGC-VP interp dhrystone.launch b/.launch/TGC-VP interp dhrystone.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP interp dhrystone.launch rename to .launch/TGC-VP interp dhrystone.launch diff --git a/contrib/eclipse_launch/TGC-VP interp hello.launch b/.launch/TGC-VP interp hello.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP interp hello.launch rename to .launch/TGC-VP interp hello.launch diff --git a/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch b/.launch/TGC-VP tcc dhrystone.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP tcc dhrystone.launch rename to .launch/TGC-VP tcc dhrystone.launch diff --git a/contrib/eclipse_launch/TGC-VP tcc hello.launch b/.launch/TGC-VP tcc hello.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP tcc hello.launch rename to .launch/TGC-VP tcc hello.launch diff --git a/contrib/eclipse_launch/TGC-VP with pctrace.launch b/.launch/TGC-VP with pctrace.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP with pctrace.launch rename to .launch/TGC-VP with pctrace.launch diff --git a/contrib/eclipse_launch/TGC-VP-FW-Debug.launch b/.launch/TGC-VP-FW-Debug.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP-FW-Debug.launch rename to .launch/TGC-VP-FW-Debug.launch diff --git a/contrib/eclipse_launch/TGC-VP-GDBServer.launch b/.launch/TGC-VP-GDBServer.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP-GDBServer.launch rename to .launch/TGC-VP-GDBServer.launch diff --git a/contrib/TGC5C_instr.yaml b/contrib/TGC5C_instr.yaml deleted file mode 100644 index 8f14fe9..0000000 --- a/contrib/TGC5C_instr.yaml +++ /dev/null @@ -1,532 +0,0 @@ - -RV32I: - LUI: - encoding: 0b00000000000000000000000000110111 - mask: 0b00000000000000000000000001111111 - size: 32 - branch: false - delay: 1 - AUIPC: - encoding: 0b00000000000000000000000000010111 - mask: 0b00000000000000000000000001111111 - size: 32 - branch: false - delay: 1 - JAL: - encoding: 0b00000000000000000000000001101111 - mask: 0b00000000000000000000000001111111 - size: 32 - branch: true - delay: 1 - JALR: - encoding: 0b00000000000000000000000001100111 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - BEQ: - encoding: 0b00000000000000000000000001100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - BNE: - encoding: 0b00000000000000000001000001100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - BLT: - encoding: 0b00000000000000000100000001100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - BGE: - encoding: 0b00000000000000000101000001100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - BLTU: - encoding: 0b00000000000000000110000001100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - BGEU: - encoding: 0b00000000000000000111000001100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: true - delay: [1,1] - LB: - encoding: 0b00000000000000000000000000000011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - LH: - encoding: 0b00000000000000000001000000000011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - LW: - encoding: 0b00000000000000000010000000000011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - LBU: - encoding: 0b00000000000000000100000000000011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - LHU: - encoding: 0b00000000000000000101000000000011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - SB: - encoding: 0b00000000000000000000000000100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - SH: - encoding: 0b00000000000000000001000000100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - SW: - encoding: 0b00000000000000000010000000100011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - ADDI: - encoding: 0b00000000000000000000000000010011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - SLTI: - encoding: 0b00000000000000000010000000010011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - SLTIU: - encoding: 0b00000000000000000011000000010011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - XORI: - encoding: 0b00000000000000000100000000010011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - ORI: - encoding: 0b00000000000000000110000000010011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - ANDI: - encoding: 0b00000000000000000111000000010011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - SLLI: - encoding: 0b00000000000000000001000000010011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SRLI: - encoding: 0b00000000000000000101000000010011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SRAI: - encoding: 0b01000000000000000101000000010011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - ADD: - encoding: 0b00000000000000000000000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SUB: - encoding: 0b01000000000000000000000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SLL: - encoding: 0b00000000000000000001000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SLT: - encoding: 0b00000000000000000010000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SLTU: - encoding: 0b00000000000000000011000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - XOR: - encoding: 0b00000000000000000100000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SRL: - encoding: 0b00000000000000000101000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - SRA: - encoding: 0b01000000000000000101000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - OR: - encoding: 0b00000000000000000110000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - AND: - encoding: 0b00000000000000000111000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - FENCE: - encoding: 0b00000000000000000000000000001111 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - ECALL: - encoding: 0b00000000000000000000000001110011 - mask: 0b11111111111111111111111111111111 - size: 32 - branch: false - delay: 1 - EBREAK: - encoding: 0b00000000000100000000000001110011 - mask: 0b11111111111111111111111111111111 - size: 32 - branch: false - delay: 1 - MRET: - encoding: 0b00110000001000000000000001110011 - mask: 0b11111111111111111111111111111111 - attributes: [[name:no_cont]] - size: 32 - branch: false - delay: 1 - WFI: - encoding: 0b00010000010100000000000001110011 - mask: 0b11111111111111111111111111111111 - size: 32 - branch: false - delay: 1 -Zicsr: - CSRRW: - encoding: 0b00000000000000000001000001110011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - CSRRS: - encoding: 0b00000000000000000010000001110011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - CSRRC: - encoding: 0b00000000000000000011000001110011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - CSRRWI: - encoding: 0b00000000000000000101000001110011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - CSRRSI: - encoding: 0b00000000000000000110000001110011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 - CSRRCI: - encoding: 0b00000000000000000111000001110011 - mask: 0b00000000000000000111000001111111 - size: 32 - branch: false - delay: 1 -Zifencei: - FENCE_I: - encoding: 0b00000000000000000001000000001111 - mask: 0b00000000000000000111000001111111 - attributes: [[name:flush]] - size: 32 - branch: false - delay: 1 -RV32M: - MUL: - encoding: 0b00000010000000000000000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - MULH: - encoding: 0b00000010000000000001000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - MULHSU: - encoding: 0b00000010000000000010000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - MULHU: - encoding: 0b00000010000000000011000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - DIV: - encoding: 0b00000010000000000100000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - DIVU: - encoding: 0b00000010000000000101000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - REM: - encoding: 0b00000010000000000110000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 - REMU: - encoding: 0b00000010000000000111000000110011 - mask: 0b11111110000000000111000001111111 - size: 32 - branch: false - delay: 1 -RV32IC: - C__ADDI4SPN: - encoding: 0b0000000000000000 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__LW: - encoding: 0b0100000000000000 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__SW: - encoding: 0b1100000000000000 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__ADDI: - encoding: 0b0000000000000001 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__NOP: - encoding: 0b0000000000000001 - mask: 0b1110111110000011 - size: 16 - branch: false - delay: 1 - C__JAL: - encoding: 0b0010000000000001 - mask: 0b1110000000000011 - size: 16 - branch: true - delay: 1 - C__LI: - encoding: 0b0100000000000001 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__LUI: - encoding: 0b0110000000000001 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__ADDI16SP: - encoding: 0b0110000100000001 - mask: 0b1110111110000011 - size: 16 - branch: false - delay: 1 - __reserved_clui: - encoding: 0b0110000000000001 - mask: 0b1111000001111111 - size: 16 - branch: false - delay: 1 - C__SRLI: - encoding: 0b1000000000000001 - mask: 0b1111110000000011 - size: 16 - branch: false - delay: 1 - C__SRAI: - encoding: 0b1000010000000001 - mask: 0b1111110000000011 - size: 16 - branch: false - delay: 1 - C__ANDI: - encoding: 0b1000100000000001 - mask: 0b1110110000000011 - size: 16 - branch: false - delay: 1 - C__SUB: - encoding: 0b1000110000000001 - mask: 0b1111110001100011 - size: 16 - branch: false - delay: 1 - C__XOR: - encoding: 0b1000110000100001 - mask: 0b1111110001100011 - size: 16 - branch: false - delay: 1 - C__OR: - encoding: 0b1000110001000001 - mask: 0b1111110001100011 - size: 16 - branch: false - delay: 1 - C__AND: - encoding: 0b1000110001100001 - mask: 0b1111110001100011 - size: 16 - branch: false - delay: 1 - C__J: - encoding: 0b1010000000000001 - mask: 0b1110000000000011 - size: 16 - branch: true - delay: 1 - C__BEQZ: - encoding: 0b1100000000000001 - mask: 0b1110000000000011 - size: 16 - branch: true - delay: [1,1] - C__BNEZ: - encoding: 0b1110000000000001 - mask: 0b1110000000000011 - size: 16 - branch: true - delay: [1,1] - C__SLLI: - encoding: 0b0000000000000010 - mask: 0b1111000000000011 - attributes: [[name:enable, value:1]] - size: 16 - branch: false - delay: 1 - C__LWSP: - encoding: 0b0100000000000010 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - C__MV: - encoding: 0b1000000000000010 - mask: 0b1111000000000011 - size: 16 - branch: false - delay: 1 - C__JR: - encoding: 0b1000000000000010 - mask: 0b1111000001111111 - size: 16 - branch: true - delay: 1 - __reserved_cmv: - encoding: 0b1000000000000010 - mask: 0b1111111111111111 - size: 16 - branch: false - delay: 1 - C__ADD: - encoding: 0b1001000000000010 - mask: 0b1111000000000011 - size: 16 - branch: false - delay: 1 - C__JALR: - encoding: 0b1001000000000010 - mask: 0b1111000001111111 - size: 16 - branch: true - delay: 1 - C__EBREAK: - encoding: 0b1001000000000010 - mask: 0b1111111111111111 - size: 16 - branch: false - delay: 1 - C__SWSP: - encoding: 0b1100000000000010 - mask: 0b1110000000000011 - size: 16 - branch: false - delay: 1 - DII: - encoding: 0b0000000000000000 - mask: 0b1111111111111111 - size: 16 - branch: false - delay: 1 - diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 74ff1d4..82c26ac 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 74ff1d455a43d83929c28017a31f14247077dfa8 +Subproject commit 82c26acfc871c0ba82a69481f8383733ad174509 diff --git a/vpvper b/vpvper index 2a3ec57..b35f68e 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 2a3ec57906b8c5a1ab1cb146f214fe0b19aed564 +Subproject commit b35f68e35c2e5c254ab04008abe4fe0a279eb4d1 From cd8e24549327b93c3f7128cbd88b01c44f508f68 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 21 Oct 2023 21:30:48 +0200 Subject: [PATCH 27/48] 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 - From f1f60dda8b5924edc9e43bf0f8e466a6808e8887 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 22 Oct 2023 08:59:50 +0200 Subject: [PATCH 28/48] updates dbt-rise-tgc --- tgc-iss/dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 82c26ac..4c3a738 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 82c26acfc871c0ba82a69481f8383733ad174509 +Subproject commit 4c3a7386b0481dc117fef9e3639748d60e72a4c7 From 0f55f352ff52e31ac05625d302309612cd946cfc Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 22 Oct 2023 22:12:24 +0200 Subject: [PATCH 29/48] updates dbt-rise submodules --- .launch/TGC-VP tcc hello.launch | 2 ++ tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.launch/TGC-VP tcc hello.launch b/.launch/TGC-VP tcc hello.launch index 8664d4f..e8c7187 100644 --- a/.launch/TGC-VP tcc hello.launch +++ b/.launch/TGC-VP tcc hello.launch @@ -30,6 +30,8 @@ + + diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 1d76c89..4a60414 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 1d76c895dba794d706f246e42d6e64224abec2a6 +Subproject commit 4a604141c94f2fe9bd5c7ae39469067f79765af0 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 4c3a738..ffe7302 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 4c3a7386b0481dc117fef9e3639748d60e72a4c7 +Subproject commit ffe730219d5ca5d732b9d1f2aa6b2fc1bdb99b12 From a4d4ed589851069f6557140c34733c5764eb71d9 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 22 Oct 2023 23:21:02 +0200 Subject: [PATCH 30/48] updates submodules --- CMakeLists.txt | 4 ++++ tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fb1e73..af21bab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,10 @@ if(WITH_LLVM) list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0) list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=True) endif() +if(WITH_ASMJIT) + list(APPEND CONAN_PACKAGE_LIST asmjit/cci.20230325) + list(APPEND CONAN_PACKAGE_OPTIONS asmjit:shared=False) +endif() if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tgc-iss/dbt-rise-plugins) list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False) list(APPEND CONAN_PACKAGE_LIST lua/5.4.3) diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 4a60414..5092a71 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 4a604141c94f2fe9bd5c7ae39469067f79765af0 +Subproject commit 5092a713d8c568d140772302ab373bd394c77571 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index ffe7302..bf4a6de 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit ffe730219d5ca5d732b9d1f2aa6b2fc1bdb99b12 +Subproject commit bf4a6deb86f7626f08248e30a3e2cf03b330e488 From fdb96cbdb8e6c48dba09b79873c96eb6acd50877 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 23 Oct 2023 10:19:16 +0200 Subject: [PATCH 31/48] adds asmjit support --- .cproject | 2 +- .launch/TGC-VP asmjit hello.launch | 37 ++++++++++++++++++++++++++++++ CMakeLists.txt | 2 ++ src/CLIParser.cpp | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 6 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 .launch/TGC-VP asmjit hello.launch diff --git a/.cproject b/.cproject index 0737b1b..1382e75 100644 --- a/.cproject +++ b/.cproject @@ -12,7 +12,7 @@ - + diff --git a/.launch/TGC-VP asmjit hello.launch b/.launch/TGC-VP asmjit hello.launch new file mode 100644 index 0000000..36b6a1e --- /dev/null +++ b/.launch/TGC-VP asmjit hello.launch @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CMakeLists.txt b/CMakeLists.txt index af21bab..844dd70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) option(ENABLE_CLANGTIDY "Enable static analysis with clang-tidy." OFF) option(WITH_TCC "Build TCC backend" ON) +option(WITH_LLVM "Build LLVM backend" OFF) +option(WITH_ASMJIT "Build ASMJIT backend" ON) set(SCC_LIB_ONLY ON) set(CMAKE_CXX_STANDARD 14) diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index 9b68e15..418e0ae 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -18,7 +18,7 @@ namespace po = boost::program_options; using namespace sc_core; namespace { -std::unordered_set backend_opts = {"interp", "tcc"}; +std::unordered_set backend_opts = {"interp", "tcc", "asmjit"}; } CLIParser::CLIParser(int argc, char *argv[]) : desc("Options") diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 5092a71..5984e0c 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 5092a713d8c568d140772302ab373bd394c77571 +Subproject commit 5984e0c37cc7475439ba51efef8fa761db85c064 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index bf4a6de..b747896 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit bf4a6deb86f7626f08248e30a3e2cf03b330e488 +Subproject commit b7478965ab65ea14eb5c72c88b89528dcf18e265 From 191b0274b0e4ae649db4559187be3f55113f6dab Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 25 Oct 2023 20:40:17 +0200 Subject: [PATCH 32/48] updates dbt-rise-* and adds a few launch configs --- .../TGC-VP interp dhrystone ce fast.launch | 35 +++++++++++++++++++ .../TGC-VP interp dhrystone ce slow.launch | 35 +++++++++++++++++++ ...VP interp hello cycle-estimate fast.launch | 35 +++++++++++++++++++ ...VP interp hello cycle-estimate slow.launch | 35 +++++++++++++++++++ .launch/TGC-VP interp hello pctrace.launch | 35 +++++++++++++++++++ .launch/TGC-VP interp hello.launch | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 8 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 .launch/TGC-VP interp dhrystone ce fast.launch create mode 100644 .launch/TGC-VP interp dhrystone ce slow.launch create mode 100644 .launch/TGC-VP interp hello cycle-estimate fast.launch create mode 100644 .launch/TGC-VP interp hello cycle-estimate slow.launch create mode 100644 .launch/TGC-VP interp hello pctrace.launch diff --git a/.launch/TGC-VP interp dhrystone ce fast.launch b/.launch/TGC-VP interp dhrystone ce fast.launch new file mode 100644 index 0000000..af4bb02 --- /dev/null +++ b/.launch/TGC-VP interp dhrystone ce fast.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP interp dhrystone ce slow.launch b/.launch/TGC-VP interp dhrystone ce slow.launch new file mode 100644 index 0000000..1904fbd --- /dev/null +++ b/.launch/TGC-VP interp dhrystone ce slow.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP interp hello cycle-estimate fast.launch b/.launch/TGC-VP interp hello cycle-estimate fast.launch new file mode 100644 index 0000000..3ae3e7b --- /dev/null +++ b/.launch/TGC-VP interp hello cycle-estimate fast.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP interp hello cycle-estimate slow.launch b/.launch/TGC-VP interp hello cycle-estimate slow.launch new file mode 100644 index 0000000..cf33089 --- /dev/null +++ b/.launch/TGC-VP interp hello cycle-estimate slow.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP interp hello pctrace.launch b/.launch/TGC-VP interp hello pctrace.launch new file mode 100644 index 0000000..7f6f140 --- /dev/null +++ b/.launch/TGC-VP interp hello pctrace.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP interp hello.launch b/.launch/TGC-VP interp hello.launch index 7f6f140..d632e2e 100644 --- a/.launch/TGC-VP interp hello.launch +++ b/.launch/TGC-VP interp hello.launch @@ -18,7 +18,7 @@ - + diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 5984e0c..dd49af2 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 5984e0c37cc7475439ba51efef8fa761db85c064 +Subproject commit dd49af2893df8ef768de3e1e72a182908dd68b66 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index b747896..980c803 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit b7478965ab65ea14eb5c72c88b89528dcf18e265 +Subproject commit 980c8031c30cc42f75525d0f796486e77c907da4 From c06fe03993cb6f7229c161805ddfbe41bd6e9ef8 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 26 Oct 2023 06:52:30 +0200 Subject: [PATCH 33/48] fixes LLVM setup for VP --- .cproject | 8 +++--- .launch/TGC-VP interp dhrystone.launch | 2 +- .launch/TGC-VP llvm dhrystone.launch | 35 ++++++++++++++++++++++++ .launch/TGC-VP llvm hello.launch | 37 ++++++++++++++++++++++++++ .launch/TGC-VP tcc dhrystone.launch | 2 +- .launch/TGC-VP tcc hello.launch | 2 +- CMakeLists.txt | 6 +++-- src/CLIParser.cpp | 2 +- src/sc_main.cpp | 9 +++++++ tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 11 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 .launch/TGC-VP llvm dhrystone.launch create mode 100644 .launch/TGC-VP llvm hello.launch diff --git a/.cproject b/.cproject index 1382e75..448b21e 100644 --- a/.cproject +++ b/.cproject @@ -46,12 +46,13 @@ - + + @@ -66,7 +67,7 @@ - + @@ -100,10 +101,11 @@ - + + diff --git a/.launch/TGC-VP interp dhrystone.launch b/.launch/TGC-VP interp dhrystone.launch index c2be0be..b2db581 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 llvm dhrystone.launch b/.launch/TGC-VP llvm dhrystone.launch new file mode 100644 index 0000000..240fd47 --- /dev/null +++ b/.launch/TGC-VP llvm dhrystone.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP llvm hello.launch b/.launch/TGC-VP llvm hello.launch new file mode 100644 index 0000000..8430b30 --- /dev/null +++ b/.launch/TGC-VP llvm hello.launch @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.launch/TGC-VP tcc dhrystone.launch b/.launch/TGC-VP tcc dhrystone.launch index 33341c6..e1ef794 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 e8c7187..45071a4 100644 --- a/.launch/TGC-VP tcc hello.launch +++ b/.launch/TGC-VP tcc hello.launch @@ -18,7 +18,7 @@ - + diff --git a/CMakeLists.txt b/CMakeLists.txt index 844dd70..0546968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,8 @@ set(CONAN_PACKAGE_LIST elfio/3.8 lz4/1.9.3 yaml-cpp/0.7.0 - jsoncpp/1.9.5 + jsoncpp/1.9.5 + zlib/1.2.13 ) set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND WITH_TCC) @@ -84,7 +85,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND WITH_TCC) endif() if(WITH_LLVM) list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0) - list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=True) + list(APPEND CONAN_PACKAGE_OPTIONS libiconv:shared=False) endif() if(WITH_ASMJIT) list(APPEND CONAN_PACKAGE_LIST asmjit/cci.20230325) @@ -190,6 +191,7 @@ if(FW_BUILD) if(NOT riscvfw_POPULATED) FetchContent_Populate(riscvfw) endif() + set(BOARD tgc-vp) add_subdirectory(${riscvfw_SOURCE_DIR}) endif() diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index 418e0ae..25e6924 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -18,7 +18,7 @@ namespace po = boost::program_options; using namespace sc_core; namespace { -std::unordered_set backend_opts = {"interp", "tcc", "asmjit"}; +std::unordered_set backend_opts = {"interp", "tcc", "llvm", "asmjit"}; } CLIParser::CLIParser(int argc, char *argv[]) : desc("Options") diff --git a/src/sc_main.cpp b/src/sc_main.cpp index 193ca75..a3e8228 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -14,6 +14,9 @@ #include #include #include +#ifdef WITH_LLVM +#include +#endif #include #include @@ -47,6 +50,12 @@ int sc_main(int argc, char *argv[]) { if (!parser.is_valid()) return ERRORR_IN_COMMAND_LINE; scc::stream_redirection cout_redir(std::cout, scc::log::INFO); scc::stream_redirection cerr_redir(std::cerr, scc::log::ERROR); + /////////////////////////////////////////////////////////////////////////// + // set up infrastructure + /////////////////////////////////////////////////////////////////////////// +#ifdef WITH_LLVM + iss::init_jit_debug(argc, argv); +#endif /////////////////////////////////////////////////////////////////////////// // create the performance estimation module /////////////////////////////////////////////////////////////////////////// diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index dd49af2..61382ae 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit dd49af2893df8ef768de3e1e72a182908dd68b66 +Subproject commit 61382ae53b86a21654f48cf37e5e3bede8657b63 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 980c803..09db0cd 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 980c8031c30cc42f75525d0f796486e77c907da4 +Subproject commit 09db0cd35d1324c81f697af7e6abfb902f64d96f From 1f53023787129e0c771f42ec0bf506a827dab938 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 26 Oct 2023 11:39:04 +0200 Subject: [PATCH 34/48] adds elf file installation --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0546968..3f3fc38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,6 +195,8 @@ if(FW_BUILD) add_subdirectory(${riscvfw_SOURCE_DIR}) endif() +install(FILES ${CMAKE_CURRENT_LIST_DIR}/fw/hello-world/prebuilt/hello.elf DESTINATION share/tgc-vp) + # CTest is a testing tool that can be used to test your project. enable_testing() add_test(NAME tgc-vp-hello-world From 02804840adde6e95da740f637a5f469caadf9d34 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 27 Oct 2023 21:18:09 +0200 Subject: [PATCH 35/48] adds clk connection of memories --- .launch/TGC-VP interp hello cycle-estimate fast.launch | 2 +- .launch/TGC-VP interp hello.launch | 2 +- .launch/TGC-VP tcc hello.launch | 2 +- scc | 2 +- src/sc_main.cpp | 2 +- src/tgc_vp/system.cpp | 2 ++ tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.launch/TGC-VP interp hello cycle-estimate fast.launch b/.launch/TGC-VP interp hello cycle-estimate fast.launch index 3ae3e7b..7699356 100644 --- a/.launch/TGC-VP interp hello cycle-estimate fast.launch +++ b/.launch/TGC-VP interp hello cycle-estimate fast.launch @@ -18,7 +18,7 @@ - + diff --git a/.launch/TGC-VP interp hello.launch b/.launch/TGC-VP interp hello.launch index d632e2e..0f536f1 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 hello.launch b/.launch/TGC-VP tcc hello.launch index 45071a4..b93fed4 100644 --- a/.launch/TGC-VP tcc hello.launch +++ b/.launch/TGC-VP tcc hello.launch @@ -18,7 +18,7 @@ - + diff --git a/scc b/scc index 12e2782..b2b62ba 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 12e2782b61f4e254e46157e25720754771ecced7 +Subproject commit b2b62baaf01d9cc5377d3cc2bf61746549366799 diff --git a/src/sc_main.cpp b/src/sc_main.cpp index a3e8228..b05e224 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -85,7 +85,7 @@ int sc_main(int argc, char *argv[]) { /////////////////////////////////////////////////////////////////////////// if (parser.get("dump-config").size() > 0) { std::ofstream of{parser.get("dump-config")}; - if (of.is_open()) cfg.dump_configuration(of); + if (of.is_open()) cfg.dump_configuration(of, true); } cfg.configure(); std::unique_ptr dumper; diff --git a/src/tgc_vp/system.cpp b/src/tgc_vp/system.cpp index 0ad1ef1..94a59a4 100644 --- a/src/tgc_vp/system.cpp +++ b/src/tgc_vp/system.cpp @@ -52,6 +52,8 @@ system::system(sc_core::sc_module_name nm) clint.tlclk_i(tlclk_s); clint.lfclk_i(lfclk_s); core_complex.clk_i(tlclk_s); + mem_qspi.clk_i(tlclk_s); + mem_ram.clk_i(tlclk_s); uart0.rst_i(rst_s); uart1.rst_i(rst_s); diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 09db0cd..e6f1108 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 09db0cd35d1324c81f697af7e6abfb902f64d96f +Subproject commit e6f11081eba931b8d2a783939fa13f60448e6404 diff --git a/vpvper b/vpvper index b35f68e..2df18a1 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit b35f68e35c2e5c254ab04008abe4fe0a279eb4d1 +Subproject commit 2df18a17549559131f52f9bcc90d3cef44aa4f5d From 2db00edabdeb183e798fe1d1b4122c74ccd50736 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 27 Oct 2023 22:15:24 +0200 Subject: [PATCH 36/48] updates CLI to support core selection --- src/CLIParser.cpp | 2 ++ src/sc_main.cpp | 1 + tgc-iss/dbt-rise-tgc | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index 25e6924..02e81ff 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -83,6 +83,8 @@ void CLIParser::build() { "enable gdb server and specify port to use") ("backend", po::value()->default_value("interp"), "the ISS backend to use, options are: interp, tcc") + ("isa", po::value()->default_value("tgc5c"), + "core or isa name to use for simulation, use '?' to get list") ("dump-ir", "dump the intermediate representation") ("dump-structure", po::value(), diff --git a/src/sc_main.cpp b/src/sc_main.cpp index b05e224..d0d8f6a 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -97,6 +97,7 @@ int sc_main(int argc, char *argv[]) { cfg.set_value(core_path + ".gdb_server_port", parser.get("gdb-port")); cfg.set_value(core_path + ".dump_ir", parser.is_set("dump-ir")); cfg.set_value(core_path + ".backend", parser.get("backend")); + cfg.set_value(core_path + ".core_type", parser.get("isa")); if(parser.is_set("plugin")){ auto plugins = util::join(parser.get>("plugin"),","); cfg.set_value(core_path + ".plugins", plugins); diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index e6f1108..7001b69 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit e6f11081eba931b8d2a783939fa13f60448e6404 +Subproject commit 7001b693ae6cdd14671df5d42bde13b4cfb48028 From 541c08329052a177335c2da900b8acb96dd0b664 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 28 Oct 2023 17:07:18 +0200 Subject: [PATCH 37/48] updates dbt-rise-tgc --- tgc-iss/dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 7001b69..2bea95c 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 7001b693ae6cdd14671df5d42bde13b4cfb48028 +Subproject commit 2bea95c1a7a034cd23f45d210dc4a9b8f269c30e From 03018b445346c1019a5e5b406877c48b6cda3039 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 28 Oct 2023 17:36:48 +0200 Subject: [PATCH 38/48] updates .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8d194cb..9c5c39e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ CMakeSettings.json /.venv /src-gen/ /*.json +/cfg.yaml From f8c7821840d7727bbb11b8f745e4d1539c155ed4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 5 Nov 2023 14:47:51 +0100 Subject: [PATCH 39/48] updates submodules --- tgc-iss/dbt-rise-tgc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 2bea95c..458c773 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 2bea95c1a7a034cd23f45d210dc4a9b8f269c30e +Subproject commit 458c773e19f73d6caee4131987970b8746ff9900 From 3790077f09673b782429131509b57b9f4cad5be8 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 20 Nov 2023 16:08:22 +0100 Subject: [PATCH 40/48] updates submodules to latest --- .gitignore | 3 +++ CMakeLists.txt | 1 + scc | 2 +- tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9c5c39e..40e5fa7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,11 @@ *.o *.a *.lib +/*.log /*.txlog /*.vcd +/*.ftr +/*.fst /.vs /out /coverage.info diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f3fc38..6861e16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,7 @@ find_package(gsl-lite) find_package(yaml-cpp) set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install. find_package(Boost REQUIRED COMPONENTS program_options QUIET) +include(SystemCPackage) set(CLANG_FORMAT_EXCLUDE_PATTERNS "scc") find_package(ClangFormat) diff --git a/scc b/scc index b2b62ba..7cf3d94 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit b2b62baaf01d9cc5377d3cc2bf61746549366799 +Subproject commit 7cf3d94c133b000e9dd5d29b5b7da670a15f0859 diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 61382ae..5ccc4eb 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 61382ae53b86a21654f48cf37e5e3bede8657b63 +Subproject commit 5ccc4eb9f804bf9933d6ed40d7c7964679107240 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 458c773..4418fa7 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 458c773e19f73d6caee4131987970b8746ff9900 +Subproject commit 4418fa7e4fd6af9884bf06ba67e40bad254a1aee diff --git a/vpvper b/vpvper index 2df18a1..2a3ec57 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 2df18a17549559131f52f9bcc90d3cef44aa4f5d +Subproject commit 2a3ec57906b8c5a1ab1cb146f214fe0b19aed564 From 0dfc5467a8cb7788372bcaafde967c689778271d Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 29 Oct 2023 16:10:12 +0100 Subject: [PATCH 41/48] updates submodules --- vpvper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpvper b/vpvper index 2a3ec57..2df18a1 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 2a3ec57906b8c5a1ab1cb146f214fe0b19aed564 +Subproject commit 2df18a17549559131f52f9bcc90d3cef44aa4f5d From a88eb938ee95191661118a3af3318951770c39d0 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 20 Nov 2023 17:45:27 +0100 Subject: [PATCH 42/48] update tracer setup --- .cproject | 6 +++--- src/CLIParser.cpp | 2 +- src/sc_main.cpp | 18 ++++++++++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.cproject b/.cproject index 448b21e..a7806bc 100644 --- a/.cproject +++ b/.cproject @@ -12,7 +12,7 @@ - + @@ -46,13 +46,13 @@ - + - + diff --git a/src/CLIParser.cpp b/src/CLIParser.cpp index 02e81ff..e80ed7d 100644 --- a/src/CLIParser.cpp +++ b/src/CLIParser.cpp @@ -94,7 +94,7 @@ void CLIParser::build() { ("reset,r", po::value(), "reset address") ("trace-level,t", po::value()->default_value(0), - "enable tracing, or combination of 1=signals and 2=TX text, 4=TX compressed text, 6=TX in SQLite") + "enable tracing, or combination of 1=signals and 2=TX") ("trace-default-on", "enables tracing for all unspecified modules") ("trace-file", po::value()->default_value("system"), diff --git a/src/sc_main.cpp b/src/sc_main.cpp index d0d8f6a..acc45ba 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -67,11 +67,17 @@ int sc_main(int argc, char *argv[]) { /////////////////////////////////////////////////////////////////////////// // set up tracing & transaction recording /////////////////////////////////////////////////////////////////////////// - auto trace_level = parser.get("trace-level"); - scc::configurable_tracer trace(parser.get("trace-file"), - static_cast(trace_level >> 1), // bit3-bit1 define the kind of transaction trace - (trace_level&0x1) != 0, // bit0 enables vcd - parser.is_set("trace-default-on")); + + std::unique_ptr tracer; + if( auto trace_level = parser.get("trace-level")) { + auto file_name = parser.get("trace-file"); + auto enable_sig_trace = (trace_level&0x1) != 0;// bit0 enables sig trace + auto tx_trace_type = static_cast(trace_level >> 1); // bit3-bit1 define the kind of transaction trace + auto trace_default_on = parser.is_set("trace-default-on"); + cfg.set_value("*.tx_trace_type", static_cast(scc::tracer::file_type::FTR)); + cfg.set_value("*.sig_trace_type", static_cast(scc::tracer::file_type::SC_VCD)); + tracer = scc::make_unique(file_name, tx_trace_type, enable_sig_trace, trace_default_on); + } /////////////////////////////////////////////////////////////////////////// // instantiate top level /////////////////////////////////////////////////////////////////////////// @@ -79,7 +85,7 @@ int sc_main(int argc, char *argv[]) { /////////////////////////////////////////////////////////////////////////// // add non-implemented 'enableTracing' properties /////////////////////////////////////////////////////////////////////////// - trace.add_control(); + if(tracer) tracer->add_control(); /////////////////////////////////////////////////////////////////////////// // dump configuration if requested /////////////////////////////////////////////////////////////////////////// From dc8a74d7873f79bdd310660f4af69b147557cb3a Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 20 Nov 2023 18:25:07 +0100 Subject: [PATCH 43/48] adds proper tracing setup --- .launch/TGC-VP interp hello.launch | 2 +- src/sc_main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.launch/TGC-VP interp hello.launch b/.launch/TGC-VP interp hello.launch index 0f536f1..d7bcc0c 100644 --- a/.launch/TGC-VP interp hello.launch +++ b/.launch/TGC-VP interp hello.launch @@ -18,7 +18,7 @@ - + diff --git a/src/sc_main.cpp b/src/sc_main.cpp index acc45ba..a6e97cb 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -74,8 +74,8 @@ int sc_main(int argc, char *argv[]) { auto enable_sig_trace = (trace_level&0x1) != 0;// bit0 enables sig trace auto tx_trace_type = static_cast(trace_level >> 1); // bit3-bit1 define the kind of transaction trace auto trace_default_on = parser.is_set("trace-default-on"); - cfg.set_value("*.tx_trace_type", static_cast(scc::tracer::file_type::FTR)); - cfg.set_value("*.sig_trace_type", static_cast(scc::tracer::file_type::SC_VCD)); + cfg.set_value("$$$scc_tracer$$$.tx_trace_type", static_cast(scc::tracer::file_type::FTR)); + cfg.set_value("$$$scc_tracer$$$.sig_trace_type", static_cast(scc::tracer::file_type::SC_VCD)); tracer = scc::make_unique(file_name, tx_trace_type, enable_sig_trace, trace_default_on); } /////////////////////////////////////////////////////////////////////////// From d0a24e9946e0269ae9f72fd29037ba298c0bb7e4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 2 Dec 2023 10:27:47 +0100 Subject: [PATCH 44/48] adds Jenkinsfile --- Jenkinsfile | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..0ac83e2 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,93 @@ +def getBranch() { + if (env.BRANCH_NAME != null && !env.BRANCH_NAME.isEmpty() ) { + return env.BRANCH_NAME + } else { + return 'develop' + } +} + +void checkout_tgc_vp() { + checkout([ + $class: 'GitSCM', + branches: [ + [name: 'refs/heads/' + getBranch()] + ], + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'SubmoduleOption', + disableSubmodules: false, + recursiveSubmodules: true, + trackingSubmodules: false, + parentCredentials: true, + shallow: true + ] + ], + submoduleCfg: [], + userRemoteConfigs: [ + [url: 'https://github.com/Minres/TGC-VP.git'] + ] + ]) +} + +void build_tgc_vp() { + try { + sh("conan profile new default --detect --force") + sh("conan profile update settings.compiler.libcxx=libstdc++11 default") + sh("conan remote add minres https://git.minres.com/api/packages/Tooling/conan --force") + sh("cmake --version") + } + catch (exc) { + echo 'Conan configured' + } + sh("rm -rf TGC-VP/build") + sh("mkdir -p TGC-VP/build") + sh("cd TGC-VP && git submodule update --recursive") + sh("cmake -S . -B build && cmake --build build -j16") + fingerprint 'TGC-VP/build/src/tgc-vp' +} + +pipeline { + agent none + + options { + // using the Timestamper plugin we can add timestamps to the console log + timestamps() + skipStagesAfterUnstable() + } + + stages { + stage('tgc-VP pipeline') { + parallel { + stage('ubuntu20'){ + agent {docker { image 'ubuntu-20.04' } } + stages { + stage('Checkout on Ubuntu20.04') { steps { checkout_tgc_vp() }} + stage('Build') { steps { build_tgc_vp() } } + } + } + stage('ubuntu22'){ + agent {docker { image 'ubuntu-22.04' } } + stages { + stage('Checkout on Ubuntu22.04') { steps { checkout_tgc_vp() }} + stage('Build') { steps { build_tgc_vp() } } + } + } + stage('Fedora28'){ + agent {docker { image 'fedora28' } } + stages { + stage('Checkout on Fedora') { steps {checkout_tgc_vp()}} + stage('Build') { steps {build_tgc_vp() }} + } + } + stage('CentOS7'){ + agent {docker { image 'centos7' } } + stages { + stage('Checkout on Ubuntu') { steps {checkout_tgc_vp()}} + stage('Build') { steps {build_tgc_vp()} + } + } + } + } + } + } +} \ No newline at end of file From 993324f1303be8173fa7fd3b247539554dd18f41 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 2 Dec 2023 10:36:54 +0100 Subject: [PATCH 45/48] disables TCC in CI --- CMakeLists.txt | 5 ++++- Jenkinsfile | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6861e16..229ec83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,7 +80,10 @@ set(CONAN_PACKAGE_LIST ) set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND WITH_TCC) - list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 tcc/0.9.27) + list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4) + if(WITH_TCC) + list(APPEND CONAN_PACKAGE_LIST tcc/0.9.27) + endif() list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False ) endif() if(WITH_LLVM) diff --git a/Jenkinsfile b/Jenkinsfile index 0ac83e2..7bd630d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,11 +39,10 @@ void build_tgc_vp() { catch (exc) { echo 'Conan configured' } - sh("rm -rf TGC-VP/build") - sh("mkdir -p TGC-VP/build") - sh("cd TGC-VP && git submodule update --recursive") - sh("cmake -S . -B build && cmake --build build -j16") - fingerprint 'TGC-VP/build/src/tgc-vp' + sh("rm -rf build") + sh("git submodule update --recursive") + sh("cmake -S . -B build -DWITH_TCC=OFF && cmake --build build -j16") + fingerprint 'build/src/tgc-vp' } pipeline { From 833b12752a8a98c141726386c9d0a1495c39d125 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 2 Dec 2023 11:08:59 +0100 Subject: [PATCH 46/48] adds RockyLinux8 to Jenkins --- Jenkinsfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7bd630d..2fbc01b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ void build_tgc_vp() { sh("conan profile new default --detect --force") sh("conan profile update settings.compiler.libcxx=libstdc++11 default") sh("conan remote add minres https://git.minres.com/api/packages/Tooling/conan --force") - sh("cmake --version") + sh("conan --version && cmake --version") } catch (exc) { echo 'Conan configured' @@ -86,6 +86,14 @@ pipeline { } } } + stage('RockyLinux8'){ + agent {docker { image 'rocky8' } } + stages { + stage('Checkout on Ubuntu') { steps {checkout_tgc_vp()}} + stage('Build') { steps {build_tgc_vp()} + } + } + } } } } From cb4e04b634b62f157438c88c5b8c1f1d9483d373 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 2 Dec 2023 11:12:28 +0100 Subject: [PATCH 47/48] fixes CentOS7 build and RL8 image name --- CMakeLists.txt | 8 ++++---- Jenkinsfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 229ec83..80bfd10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,6 @@ boost:without_type_erasure=True boost:without_wave=True ) -set(B2_VERSION 4.9.6) set(CONAN_PACKAGE_LIST fmt/8.0.1 spdlog/1.9.2 @@ -114,12 +113,13 @@ conan_check() conan_add_remote(NAME minres URL https://git.minres.com/api/packages/Tooling/conan) # Boost on CentOS 7 quirks: the b2 of conan-center is build against a newer libstdc++ and therefore does not run # with the oooooold libs on CentOS 7. Therefore we build our own version of b2 if it is not there -set(B2_META $ENV{HOME}/.conan/data/b2/${B2_VERSION}/_/_/metadata.json) +execute_process(COMMAND bash -c "conan search -r all b2 | tail -1" OUTPUT_VARIABLE B2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) +set(B2_META $ENV{HOME}/.conan/data/${B2_VERSION}/_/_/metadata.json) if(DEFINED ENV{CONAN_USER_HOME}) - set(B2_META $ENV{CONAN_USER_HOME}/.conan/data/b2/${B2_VERSION}/_/_/metadata.json) + set(B2_META $ENV{CONAN_USER_HOME}/.conan/data/${B2_VERSION}/_/_/metadata.json) endif() if(NOT EXISTS ${B2_META}) - conan_configure(REQUIRES b2/${B2_VERSION}) + conan_configure(REQUIRES ${B2_VERSION}) conan_cmake_autodetect(settings) conan_cmake_install(PATH_OR_REFERENCE . BUILD b2 SETTINGS ${settings}) endif() diff --git a/Jenkinsfile b/Jenkinsfile index 2fbc01b..00afe21 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -87,7 +87,7 @@ pipeline { } } stage('RockyLinux8'){ - agent {docker { image 'rocky8' } } + agent {docker { image 'rockylinux8' } } stages { stage('Checkout on Ubuntu') { steps {checkout_tgc_vp()}} stage('Build') { steps {build_tgc_vp()} From 1f076cb04a0a2830de7cead29103c6906870d367 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 2 Dec 2023 11:32:35 +0100 Subject: [PATCH 48/48] updates submodules --- Modulefile | 1 + tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Modulefile b/Modulefile index 1ece628..b4395ea 100644 --- a/Modulefile +++ b/Modulefile @@ -14,3 +14,4 @@ if { $distro == "CentOS" && ![info exists ::env(PROJECT)] && ![info exists ::env module load tools/gcc-riscv32-unknown-elf/11 module load tools/cmake +module load tools/utilities \ No newline at end of file diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 5ccc4eb..039aad4 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 5ccc4eb9f804bf9933d6ed40d7c7964679107240 +Subproject commit 039aad46939353ed31cd801f978853835a4f6c6d diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index 4418fa7..bc4ea30 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit 4418fa7e4fd6af9884bf06ba67e40bad254a1aee +Subproject commit bc4ea30815e77651ded4c51d97d7452c7ad005bb