diff --git a/.cproject b/.cproject index 69c22d9..f7648da 100644 --- a/.cproject +++ b/.cproject @@ -1,253 +1,502 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore index 2865d22..3dff9d4 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ language.settings.xml /.gdbinit /*.out /dump.json +/*.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c0372f..2fa7da2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.12) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake) project(RISCV-VP LANGUAGES CXX) @@ -9,12 +9,12 @@ set(ENABLE_SHARED TRUE CACHE BOOL "Build shared libraries") include(GitFunctions) get_branch_from_git() # if we are not on master or develop set the submodules to develop -IF(NOT ${GIT_BRANCH} MATCHES "master") - IF(NOT ${GIT_BRANCH} MATCHES "develop") - message(STATUS "main branch is '${GIT_BRANCH}', setting submodules to 'develop'") - set(GIT_BRANCH develop) - endif() -endif() +#IF(NOT ${GIT_BRANCH} MATCHES "master") +# IF(NOT ${GIT_BRANCH} MATCHES "develop") +# message(STATUS "main branch is '${GIT_BRANCH}', setting submodules to 'develop'") +# set(GIT_BRANCH develop) +# endif() +#endif() ### set the directory names of the submodules set(GIT_SUBMODULES elfio libGIS scc dbt-core) @@ -29,7 +29,7 @@ set(GIT_SUBMODULE_BRANCH_dbt-core ${GIT_BRANCH}) set(GIT_SUBMODULE_BRANCH_riscv ${GIT_BRANCH}) include(GNUInstallDirs) -include(Submodules) +#include(Submodules) include(Conan) #enable_testing() @@ -58,7 +58,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(warnings "/W4 /WX /EHsc") endif() -setup_conan() +setup_conan(TARGETS) # 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. @@ -76,7 +76,7 @@ set(BUILD_SHARED_LIBS 1) find_package(Threads) find_package(Tcmalloc) find_package(ZLIB) -find_package(SystemC) +find_package(OSCISystemC) if(SystemC_FOUND) message(STATUS "SystemC headers at ${SystemC_INCLUDE_DIRS}") message(STATUS "SystemC library at ${SystemC_LIBRARY_DIRS}") diff --git a/cmake/Conan.cmake b/cmake/Conan.cmake deleted file mode 100644 index 1ee45f6..0000000 --- a/cmake/Conan.cmake +++ /dev/null @@ -1,51 +0,0 @@ -macro(setup_conan) - find_program(conan conan) - if(NOT EXISTS ${conan}) - message(FATAL_ERROR "Conan is required. Please see README.md") - return() - endif() - - if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Darwin) - set(os Macos) - else() - set(os ${CMAKE_HOST_SYSTEM_NAME}) - endif() - - if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) - set(compiler gcc) - elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL AppleClang) - set(compiler apple-clang) - else() - message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") - endif() - - string(SUBSTRING ${CMAKE_CXX_COMPILER_VERSION} 0 3 compiler_version) - - set(conanfile ${CMAKE_SOURCE_DIR}/conanfile.txt) - set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) - set(compiler_libcxx libstdc++11) - - if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CONAN_BUILD_TYPE Debug) - elseif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") - set(CONAN_BUILD_TYPE Release) - else() - set(CONAN_BUILD_TYPE ${CMAKE_BUILD_TYPE}) - endif() - - if(${CMAKE_CXX_STANDARD} EQUAL 98) - execute_process(COMMAND ${conan} install --build=missing - -s build_type=${CONAN_BUILD_TYPE} -s compiler.libcxx=${compiler_libcxx} - ${CMAKE_SOURCE_DIR} RESULT_VARIABLE return_code) - else() - execute_process(COMMAND ${conan} install --build=missing -s build_type=${CONAN_BUILD_TYPE} - ${CMAKE_SOURCE_DIR} RESULT_VARIABLE return_code) - endif() - if(NOT ${return_code} EQUAL 0) - message(FATAL_ERROR "conan install command failed.") - endif() - - include(${conanfile_cmake}) - #conan_basic_setup(TARGETS) - conan_basic_setup() -endmacro() diff --git a/conanfile.txt b/conanfile.txt index 157cc85..976a535 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,11 +1,13 @@ [requires] gsl_microsoft/20180102@bincrafters/stable - fmt/5.2.1@bincrafters/stable + fmt/6.1.2 Seasocks/1.3.2@minres/stable SystemC/2.3.3@minres/stable SystemCVerification/2.0.1@minres/stable SystemC-CCI/1.0.0@minres/stable - + #fbrdb/0.1.0@minres/testing + tcc/0.9.27@minres/stable + [generators] cmake @@ -18,3 +20,5 @@ SystemCVerification:shared=True SystemC-CCI:stdcxx=11 SystemC-CCI:shared=True + #fbrdb:stdcxx=11 + diff --git a/dbt-core b/dbt-core index c81fd4c..a90eeef 160000 --- a/dbt-core +++ b/dbt-core @@ -1 +1 @@ -Subproject commit c81fd4c5d73722f5d37f594c02b99616b9fcd478 +Subproject commit a90eeef9d040366a333ed7497e11b68b486a3b63 diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 34c7ad1..6726dd1 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.12) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) # Set the name of your project here diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index 74867d9..9f7e56e 100644 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.12) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) # main (top) cmake dir set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # project specific cmake dir diff --git a/platform/src/CLIParser.cpp b/platform/src/CLIParser.cpp index e36a688..0d90798 100644 --- a/platform/src/CLIParser.cpp +++ b/platform/src/CLIParser.cpp @@ -75,7 +75,7 @@ CLIParser::CLIParser(int argc, char *argv[]) std::cerr << "ERROR: " << e.what() << std::endl << std::endl; std::cerr << desc << std::endl; } - auto log_level = vm_["verbose"].as(); + auto log_level = vm_["verbose"].as(); auto verbosity = !vm_["Verbose"].defaulted()?vm_["Verbose"].as():vm_["verbose"].as(); auto colored_output = vm_["Verbose"].defaulted(); auto dbg_level = std::min(logging::DBGTRACE, verbosity); @@ -104,7 +104,7 @@ void CLIParser::build() { // clang-format off desc.add_options() ("help,h", "Print help message") - ("verbose,v", po::value()->implicit_value(3), "Sets logging verbosity") + ("verbose,v", po::value()->implicit_value(3), "Sets logging verbosity") ("Verbose,V", po::value()->default_value(logging::INFO), "Debug output level as with --verbose but print non-colored") ("log-file", po::value(), "Sets default log file.") ("log-filter", po::value()->default_value(""), "log filter regular expression name") diff --git a/platform/src/CMakeLists.txt b/platform/src/CMakeLists.txt index ae0b6c4..6ae0877 100644 --- a/platform/src/CMakeLists.txt +++ b/platform/src/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries(${LIBRARY_NAME} riscv_sc) target_link_libraries(${LIBRARY_NAME} dbt-core) target_link_libraries(${LIBRARY_NAME} softfloat) target_link_libraries(${LIBRARY_NAME} scc) -target_link_libraries(${LIBRARY_NAME} ${CONAN_LIBS_SEASOCKS}) +target_link_libraries(${LIBRARY_NAME} CONAN_PKG::Seasocks) target_link_libraries(${LIBRARY_NAME} external) target_link_libraries(${LIBRARY_NAME} ${llvm_libs}) target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ) diff --git a/riscv b/riscv index f357e56..97a8ab1 160000 --- a/riscv +++ b/riscv @@ -1 +1 @@ -Subproject commit f357e563f29f5994b4eab783155ccead264e52eb +Subproject commit 97a8ab16806b77336ed329d138ec9829b3daec33 diff --git a/scc b/scc index fbe11cf..d3d7c9f 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit fbe11cf926d0078836d250910617b139e0581d5c +Subproject commit d3d7c9f590ea422ad8d47486fb1efcaeef208cce