Browse Source

Added softfloat library into top level build system

Eyck Jentzsch 1 year ago
parent
commit
bc7450dad2
5 changed files with 10 additions and 22 deletions
  1. 2
    0
      CMakeLists.txt
  2. 1
    1
      riscv.sc/CMakeLists.txt
  3. 1
    0
      riscv.sc/src/CMakeLists.txt
  4. 1
    17
      riscv/CMakeLists.txt
  5. 5
    4
      riscv/src/CMakeLists.txt

+ 2
- 0
CMakeLists.txt View File

@@ -51,6 +51,8 @@ include(clang-format)
51 51
 add_subdirectory(external)
52 52
 add_subdirectory(dbt-core)
53 53
 add_subdirectory(sc-components)
54
+add_subdirectory(softfloat)
55
+GET_DIRECTORY_PROPERTY(SOFTFLOAT_INCLUDE_DIRS DIRECTORY softfloat DEFINITION SOFTFLOAT_INCLUDE_DIRS)
54 56
 add_subdirectory(riscv)
55 57
 add_subdirectory(riscv.sc)
56 58
 

+ 1
- 1
riscv.sc/CMakeLists.txt View File

@@ -68,7 +68,7 @@ include_directories(
68 68
 
69 69
 add_dependent_subproject(dbt-core)
70 70
 add_dependent_subproject(sc-components)
71
-add_dependent_header(util)
71
+add_dependent_subproject(riscv)
72 72
 
73 73
 include_directories(
74 74
     ${PROJECT_SOURCE_DIR}/incl

+ 1
- 0
riscv.sc/src/CMakeLists.txt View File

@@ -41,6 +41,7 @@ add_executable(${APPLICATION_NAME} ${APP_SOURCES})
41 41
 target_link_libraries(${APPLICATION_NAME} ${LIBRARY_NAME})
42 42
 target_link_libraries(${APPLICATION_NAME} risc-v)
43 43
 target_link_libraries(${APPLICATION_NAME} dbt-core)
44
+target_link_libraries(${APPLICATION_NAME} softfloat)
44 45
 target_link_libraries(${APPLICATION_NAME} sc-components)
45 46
 target_link_libraries(${APPLICATION_NAME} ${CONAN_LIBS_SEASOCKS})
46 47
 target_link_libraries(${APPLICATION_NAME} external)

+ 1
- 17
riscv/CMakeLists.txt View File

@@ -41,30 +41,14 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
41 41
 message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
42 42
 llvm_map_components_to_libnames(llvm_libs support core mcjit x86codegen x86asmparser)
43 43
 
44
-find_package(SystemC)
45
-if(SystemC_FOUND)
46
-    add_definitions(-DWITH_SYSTEMC)
47
-    include_directories(${SystemC_INCLUDE_DIRS})
48
-    link_directories(${SystemC_LIBRARY_DIRS})
49
-else(SystemC_FOUND)
50
-    message( FATAL_ERROR "SystemC library not found." )
51
-endif(SystemC_FOUND)
52
-
53
-if(SCV_FOUND)   
54
-    add_definitions(-DWITH_SCV)
55
-    link_directories(${SCV_LIBRARY_DIRS})
56
-endif(SCV_FOUND)
57
-
58 44
 # This sets the include directory for the reference project. This is the -I flag in gcc.
59 45
 include_directories(
60 46
     ${PROJECT_SOURCE_DIR}/incl
47
+	${SOFTFLOAT_INCLUDE_DIRS}
61 48
     ${LLVM_INCLUDE_DIRS}
62 49
 )
63
-
64 50
 add_dependent_subproject(dbt-core)
65 51
 add_dependent_subproject(sc-components)
66
-add_dependent_header(util)
67
-
68 52
 include_directories(
69 53
     ${PROJECT_SOURCE_DIR}/incl
70 54
     ${PROJECT_SOURCE_DIR}/../external/elfio

+ 5
- 4
riscv/src/CMakeLists.txt View File

@@ -1,11 +1,11 @@
1 1
 # library files
2 2
 FILE(GLOB RiscVHeaders *.h)
3
+FILE(GLOB IssSources iss/*.cpp internal/*.cpp) 
4
+
5
+
3 6
 set(LIB_HEADERS ${RiscVHeaders} )
4 7
 set(LIB_SOURCES
5
-    iss/rv32imac.cpp
6
-    iss/rv64ia.cpp
7
-    internal/vm_rv32imac.cpp
8
-    internal/vm_rv64ia.cpp
8
+    ${IssSources}
9 9
     plugin/instruction_count.cpp
10 10
     plugin/cycle_estimate.cpp
11 11
 )
@@ -35,6 +35,7 @@ add_executable(${APPLICATION_NAME} ${APP_SOURCES})
35 35
 # Links the target exe against the libraries
36 36
 target_link_libraries(${APPLICATION_NAME} ${LIBRARY_NAME})
37 37
 target_link_libraries(${APPLICATION_NAME} dbt-core)
38
+target_link_libraries(${APPLICATION_NAME} softfloat)
38 39
 target_link_libraries(${APPLICATION_NAME} sc-components)
39 40
 target_link_libraries(${APPLICATION_NAME} external)
40 41
 target_link_libraries(${APPLICATION_NAME} ${llvm_libs})