diff --git a/.cproject b/.cproject index 1cb85cc..481c19d 100644 --- a/.cproject +++ b/.cproject @@ -16,7 +16,7 @@ - + @@ -41,21 +41,23 @@ - - + + + + - + - + - + diff --git a/.gitmodules b/.gitmodules index 587d5d6..f533ef3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "dbt-core"] path = dbt-core url = https://git.minres.com/DBT-RISE/DBT-RISE-Core.git +[submodule "coredsl"] + path = coredsl + url = https://git.minres.com/DBT-RISE/CoreDSL.git diff --git a/.project b/.project index bccc870..f624507 100644 --- a/.project +++ b/.project @@ -1,10 +1,15 @@ - TGFS-ISS + TGC-ISS + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder clean,full,incremental, @@ -23,5 +28,6 @@ org.eclipse.cdt.core.ccnature org.eclipse.cdt.managedbuilder.core.managedBuildNature org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + org.eclipse.xtext.ui.shared.xtextNature diff --git a/CMakeLists.txt b/CMakeLists.txt index 79d8ceb..cad36af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,12 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.16) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) project(TGFS-ISS VERSION 1.0.0 LANGUAGES CXX) +set(CORE_NAME TGC_C CACHE STRING "The core to build the ISS for" ) set(WITH_LLVM FALSE CACHE BOOL "Build LLVM based backend") include(GNUInstallDirs) -include(Conan) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -32,7 +32,60 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(warnings "/W4 /WX /EHsc") endif() -setup_conan(TARGETS) +include(ConanInline) + +set(CONAN_BOOST_OPTIONS +boost:fPIC=True +boost:shared=True +boost:header_only=False +boost:without_context=True +boost:without_contract=True +boost:without_coroutine=True +boost:without_fiber=True +boost:without_graph=True +boost:without_graph_parallel=True +boost:without_iostreams=True +boost:without_json=True +boost:without_locale=True +boost:without_log=True +boost:without_math=True +boost:without_mpi=True +boost:without_nowide=True +boost:without_python=True +boost:without_random=True +boost:without_regex=True +boost:without_serialization=True +boost:without_stacktrace=True +boost:without_test=True +boost:without_timer=True +boost:without_type_erasure=True +boost:without_wave=True +) +set(CONAN_PACKAGES fmt/6.1.2 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0 elfio/3.8 tcc/0.9.27) +set(CONAN_SETTINGS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) +if(NOT DEFINED ENV{SYSTEMC_HOME}) + set(CONAN_PACKAGES ${CONAN_PACKAGES} + systemc/2.3.3 + systemc-cci/1.0.0 + ) + set(CONAN_SETTINGS ${CONAN_SETTINGS} + #systemc:phase_cb=False + systemc-cci:shared=False + ) +endif() + +conan_check() +conan_add_remote(NAME minres URL https://artifactory.minres.com/artifactory/api/conan/oss) +conan_cmake_configure(REQUIRES ${CONAN_PACKAGES} + GENERATORS cmake_find_package + OPTIONS ${CONAN_SETTINGS} + ) +conan_install() + +find_package(tcc) +find_package(elfio) +find_package(fmt) +find_package(gsl-lite) # This line finds the boost lib and headers. set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install. @@ -54,7 +107,11 @@ if (ENABLE_CLANG_TIDY) set(CMAKE_CXX_CLANG_TIDY "" CACHE STRING "" FORCE) # delete it endif() endif() - + +include(CodeGen) +gen_coredsl(${CORE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/tgfs/gen_input/${CORE_NAME}.core_desc interp) + add_subdirectory(dbt-core) add_subdirectory(scc) add_subdirectory(tgfs) + diff --git a/Modulefile b/Modulefile new file mode 100644 index 0000000..f4576a5 --- /dev/null +++ b/Modulefile @@ -0,0 +1,33 @@ +#%Module###################################################################### +## +## Project Module +## +proc ModulesHelp { } { + puts stderr "\tThe TGFS-ISS Project Module\n" + puts stderr "\tThis module loads PATHs and variables for accessing Verilator." +} + + +set distro [exec /bin/lsb_release -i -s] +if { $distro == "CentOS" && ![info exists ::env(PROJECT)] && ![info exists ::env(PCP_DIR)] } { + puts stderr "Don't forget to execute 'scl enable devtoolset-7 bash'" +} + +if {![info exists ::env(PROJECT)] && [file exists $::env(HOME)/.sdkman/candidates/java/11.0.9.hs-adpt/] != 1} { + puts stderr "Please install java via 'sdk install java 11.0.9.hs-adpt'!" + prereq java/11.0.9 +} else { + prepend-path PATH $::env(HOME)/.sdkman/candidates/java/11.0.9.hs-adpt/bin +} + +if {![info exists ::env(PROJECT)] && [file exists $::env(HOME)/.sdkman/candidates/maven/3.6.3] != 1} { + puts stderr "Please install mvn via 'sdk install maven 3.6.3'!" + prereq maven/3.6.3 +} else { + prepend-path PATH $::env(HOME)/.sdkman/candidates/sbt/1.4.4/bin +} + +module load tools/cmake tools/gcc-riscv64/9.2.0 + +setenv PROJECT TGFS-ISS + diff --git a/cmake/CodeGen.cmake b/cmake/CodeGen.cmake new file mode 100644 index 0000000..920e30e --- /dev/null +++ b/cmake/CodeGen.cmake @@ -0,0 +1,113 @@ +cmake_minimum_required(VERSION 3.16) +option(ENABLE_CODEGEN "Enable code generation for supported cores" ON) + +set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/..) +set(DBT_CORE_TGC_DIR ${ROOT_DIR}/tgfs) + +#helper to setup code generation and generate outputs +set(GENERATOR_JAR ${ROOT_DIR}/coredsl/com.minres.coredsl.generator.repository/target/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar) + +if(EXISTS ${ROOT_DIR}/coredsl/pom.xml AND NOT EXISTS ${GENERATOR_JAR}) + execute_process( + COMMAND mvn package + WORKING_DIRECTORY ${ROOT_DIR}/coredsl + OUTPUT_VARIABLE StdOut + ERROR_VARIABLE StdErr + RESULT_VARIABLE Status + ERROR_QUIET) + if(Status AND NOT Status EQUAL 0) + message(STATUS "mvn package call failed: ${Status}, ${StdOut}, ${StdErr}") + endif() +endif() + +set(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) +set(GENERATOR java ${JAVA_OPTS} -jar ${GENERATOR_JAR}) + +set(INPUT_DIR ${DBT_CORE_TGC_DIR}/gen_input) +set(REPO_DIR ${DBT_CORE_TGC_DIR}/gen_input/CoreDSL-Instruction-Set-Description) +set(TMPL_DIR ${DBT_CORE_TGC_DIR}/gen_input/templates/) + +if(ENABLE_CODEGEN AND EXISTS ${GENERATOR_JAR}) + macro(gen_coredsl CORE_NAME INPUT_FILE BACKEND) + message(STATUS "Adding generation steps for ${CORE_NAME} in ${DBT_CORE_TGC_DIR} for ${BACKEND}") + + string(TOUPPER ${BACKEND} BE_UPPER) + string(TOLOWER ${CORE_NAME} CORE_NAMEL) + + if(EXISTS ${DBT_CORE_TGC_DIR}/generate.sh AND NOT EXISTS ${DBT_CORE_TGC_DIR}/incl/iss/arch/${CORE_NAMEL}.h) + # make sure source file exist initially + execute_process( + COMMAND /bin/bash ${DBT_CORE_TGC_DIR}/../generate.sh -c $CORE_NAME -b $BACKEND + WORKING_DIRECTORY ${DBT_CORE_TGC_DIR}/.. + RESULT_VARIABLE return_code) + endif() + + list(APPEND ${CORE_NAME}_MAPPING -m "${TMPL_DIR}/CORENAME.h.gtl:${DBT_CORE_TGC_DIR}/incl/iss/arch/${CORE_NAMEL}.h") + list(APPEND ${CORE_NAME}_MAPPING -m "${TMPL_DIR}/CORENAME.cpp.gtl:${DBT_CORE_TGC_DIR}/src/iss/${CORE_NAMEL}.cpp") + list(APPEND ${CORE_NAME}_MAPPING -m "${TMPL_DIR}/${BACKEND}/CORENAME.cpp.gtl:${DBT_CORE_TGC_DIR}/src/vm/interp/vm_${CORE_NAMEL}.cpp") + list(APPEND ${CORE_NAME}_MAPPING -m "${TMPL_DIR}/CORENAME_instr.yaml.gtl:${DBT_CORE_TGC_DIR}/${CORE_NAME}_instr.yaml") + + set(${CORE_NAME}_OUTPUT_FILES ${DBT_CORE_TGC_DIR}/incl/iss/arch/${CORE_NAMEL}.h ${DBT_CORE_TGC_DIR}/src/iss/${CORE_NAMEL}.cpp ${DBT_CORE_TGC_DIR}/src/vm/interp/vm_${CORE_NAMEL}.cpp) + #add_custom_command( + # COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE} + # DEPENDS ${GENERATOR_JAR} ${INPUT_FILE} ${TMPL_DIR}/CORENAME.h.gtl ${TMPL_DIR}/CORENAME.cpp.gtl ${TMPL_DIR}/${BACKEND}/CORENAME.cpp.gtl + # OUTPUT ${${CORE_NAME}_OUTPUT_FILES} + # COMMENT "Generating code for ${CORE_NAME}." + # USES_TERMINAL VERBATIM + #) + if(NOT DEFINED ENV{CI}) + add_custom_target(${CORE_NAME}_cpp + COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMENT "Generating ISS sources" + BYPRODUCTS ${${CORE_NAME}_OUTPUT_FILES} + USES_TERMINAL + ) + endif() + execute_process( + COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + RESULT_VARIABLE return_code) + endmacro() +else() + macro(gen_coredsl CORE_NAME INPUT_FILE BACKEND) + add_custom_target(${CORE_NAME}_cpp) + message(STATUS "Not adding generation steps for ${CORE_NAME}(${ENABLE_CODEGEN}, ${GENERATOR_JAR})") + if(NOT EXISTS ${GENERATOR_JAR}) + message(STATUS "CoreDSL Generator ${GENERATOR_JAR} does not exists") + endif() + endmacro() +endif() diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index ba30cd2..0000000 --- a/conanfile.txt +++ /dev/null @@ -1,26 +0,0 @@ -[requires] - gsl_microsoft/20180102@bincrafters/stable - fmt/6.1.2 -# SystemC/2.3.3@minres/stable -# SystemCVerification/2.0.1@minres/stable -# SystemC-CCI/1.0.0@minres/stable - tcc/0.9.27@minres/stable - boost/1.71.0@conan/stable - zlib/1.2.11 - elfio/3.4@minres/stable - -[generators] - cmake - -[options] - seasocks:shared=True - boost:fPIC=True - boost:shared=False - boost:header_only=False - fmt:header_only=True -# SystemC:stdcxx=11 -# SystemC:shared=True -# SystemCVerification:stdcxx=11 -# SystemCVerification:shared=True -# SystemC-CCI:stdcxx=11 -# SystemC-CCI:shared=True diff --git a/coredsl b/coredsl new file mode 160000 index 0000000..2258a1c --- /dev/null +++ b/coredsl @@ -0,0 +1 @@ +Subproject commit 2258a1cb004ddaaa839978b7044963355ad83bfb diff --git a/dbt-core b/dbt-core index d87dfff..d64b198 160000 --- a/dbt-core +++ b/dbt-core @@ -1 +1 @@ -Subproject commit d87dfff430e9ff3d394327bbf649a9f1bb05e396 +Subproject commit d64b1986626fd927f0b2a5e787f8941d6dd6aecd diff --git a/generate.sh b/generate.sh new file mode 100644 index 0000000..5d7bacd --- /dev/null +++ b/generate.sh @@ -0,0 +1,60 @@ +#!/bin/bash +## + +# Absolute path to this script, e.g. /home/user/bin/foo.sh +SCRIPT=`readlink -f "$0"` +# Absolute path this script is in, thus /home/user/bin +SCRIPTDIR=`dirname "$SCRIPT"` +SCRIPTNAME=`basename "$SCRIPT"` + +function print_help { + echo "Usage: $SCRIPTNAME [-h] -c -v " + echo "Generate ISS sources for TGC cores" + echo " -c core name" + echo " -b ISS backend for which sources are generated, interp,tcc, or llvm" + exit 0 +} + + +CORE_NAME= +BACKEND= +while getopts 'c:b:h' c +do + case $c in + c) CORE_NAME=$OPTARG ;; + b) BACKEND=$OPTARG ;; + h) print_help ;; + esac +done +shift $((OPTIND-1)) + +if [ -z "$CORE_NAME" ]; then + echo "core name missing!" + exit 1 +fi +if [ -z "$BACKEND" ]; then + echo "core variant missing!" + exit 1 +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 coredsl/com.minres.coredsl.generator.repository/target/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar " + +INPUT_FILE=$1 + +REPO_DIR=tgfs/gen_input/CoreDSL-Instruction-Set-Description +TMPL_DIR=tgfs/gen_input/templates +CORE_NAME_LC=`echo "$CORE_NAME" | tr '[:upper:]' '[:lower:]'` + +MAPPING="" +MAPPING="$MAPPING -m ${TMPL_DIR}/CORENAME.h.gtl:tgfs/incl/iss/arch/${CORE_NAME_LC}.h" +MAPPING="$MAPPING -m ${TMPL_DIR}/CORENAME.cpp.gtl:tgfs/src/iss/${CORE_NAME_LC}.cpp" +MAPPING="$MAPPING -m ${TMPL_DIR}/${BACKEND}/CORENAME.cpp.gtl:tgfs/src/vm/${BACKEND}/vm_${CORE_NAME_LC}.cpp" +MAPPING="$MAPPING -m ${TMPL_DIR}/CORENAME_instr.yaml.gtl:tgfs/${CORE_NAME_LC}_instr.yaml" + +[ -f coredsl/com.minres.coredsl.generator.repository/target/com.minres.coredsl.generator-2.0.0-SNAPSHOT.jar ] || (cd coredsl; mvn package) + +$GENERATOR -c $CORE_NAME -r $REPO_DIR $MAPPING $INPUT_FILE + diff --git a/scc b/scc index d0f2f55..7b2017a 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit d0f2f5599787149be8dbd1e17f5aa6caaa2e3140 +Subproject commit 7b2017a21dec666b1fb14650b3147fa11208c886 diff --git a/tgfs b/tgfs index d43b359..d5fa47e 160000 --- a/tgfs +++ b/tgfs @@ -1 +1 @@ -Subproject commit d43b35949e60c45e45ec43af1977478d0f93869d +Subproject commit d5fa47ef7f9395ae202442535624d99b58e290be