diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f61bce..82594ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,8 @@ include(clang-format) add_subdirectory(external) add_subdirectory(dbt-core) add_subdirectory(sc-components) +add_subdirectory(softfloat) +GET_DIRECTORY_PROPERTY(SOFTFLOAT_INCLUDE_DIRS DIRECTORY softfloat DEFINITION SOFTFLOAT_INCLUDE_DIRS) add_subdirectory(riscv) add_subdirectory(riscv.sc) diff --git a/riscv.sc/CMakeLists.txt b/riscv.sc/CMakeLists.txt index e022264..1351b5a 100644 --- a/riscv.sc/CMakeLists.txt +++ b/riscv.sc/CMakeLists.txt @@ -68,7 +68,7 @@ include_directories( add_dependent_subproject(dbt-core) add_dependent_subproject(sc-components) -add_dependent_header(util) +add_dependent_subproject(riscv) include_directories( ${PROJECT_SOURCE_DIR}/incl diff --git a/riscv.sc/src/CMakeLists.txt b/riscv.sc/src/CMakeLists.txt index 348b663..4e11fc5 100644 --- a/riscv.sc/src/CMakeLists.txt +++ b/riscv.sc/src/CMakeLists.txt @@ -41,6 +41,7 @@ add_executable(${APPLICATION_NAME} ${APP_SOURCES}) target_link_libraries(${APPLICATION_NAME} ${LIBRARY_NAME}) target_link_libraries(${APPLICATION_NAME} risc-v) target_link_libraries(${APPLICATION_NAME} dbt-core) +target_link_libraries(${APPLICATION_NAME} softfloat) target_link_libraries(${APPLICATION_NAME} sc-components) target_link_libraries(${APPLICATION_NAME} ${CONAN_LIBS_SEASOCKS}) target_link_libraries(${APPLICATION_NAME} external) diff --git a/riscv/CMakeLists.txt b/riscv/CMakeLists.txt index 8db683b..b07998d 100644 --- a/riscv/CMakeLists.txt +++ b/riscv/CMakeLists.txt @@ -41,30 +41,14 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") llvm_map_components_to_libnames(llvm_libs support core mcjit x86codegen x86asmparser) -find_package(SystemC) -if(SystemC_FOUND) - add_definitions(-DWITH_SYSTEMC) - include_directories(${SystemC_INCLUDE_DIRS}) - link_directories(${SystemC_LIBRARY_DIRS}) -else(SystemC_FOUND) - message( FATAL_ERROR "SystemC library not found." ) -endif(SystemC_FOUND) - -if(SCV_FOUND) - add_definitions(-DWITH_SCV) - link_directories(${SCV_LIBRARY_DIRS}) -endif(SCV_FOUND) - # This sets the include directory for the reference project. This is the -I flag in gcc. include_directories( ${PROJECT_SOURCE_DIR}/incl + ${SOFTFLOAT_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ) - add_dependent_subproject(dbt-core) add_dependent_subproject(sc-components) -add_dependent_header(util) - include_directories( ${PROJECT_SOURCE_DIR}/incl ${PROJECT_SOURCE_DIR}/../external/elfio diff --git a/riscv/src/CMakeLists.txt b/riscv/src/CMakeLists.txt index 8b73954..229b067 100644 --- a/riscv/src/CMakeLists.txt +++ b/riscv/src/CMakeLists.txt @@ -1,11 +1,11 @@ # library files FILE(GLOB RiscVHeaders *.h) +FILE(GLOB IssSources iss/*.cpp internal/*.cpp) + + set(LIB_HEADERS ${RiscVHeaders} ) set(LIB_SOURCES - iss/rv32imac.cpp - iss/rv64ia.cpp - internal/vm_rv32imac.cpp - internal/vm_rv64ia.cpp + ${IssSources} plugin/instruction_count.cpp plugin/cycle_estimate.cpp ) @@ -35,6 +35,7 @@ add_executable(${APPLICATION_NAME} ${APP_SOURCES}) # Links the target exe against the libraries target_link_libraries(${APPLICATION_NAME} ${LIBRARY_NAME}) target_link_libraries(${APPLICATION_NAME} dbt-core) +target_link_libraries(${APPLICATION_NAME} softfloat) target_link_libraries(${APPLICATION_NAME} sc-components) target_link_libraries(${APPLICATION_NAME} external) target_link_libraries(${APPLICATION_NAME} ${llvm_libs})