Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SoftFloat Library as a Submodule #35

Merged
merged 13 commits into from
Dec 20, 2024
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "elfio"]
path = elfio
url = [email protected]:serge1/ELFIO.git
[submodule "softfloat"]
path = softfloat
url = [email protected]:sparcians/berkeley-softfloat-3
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ include_directories(${CMAKE_SOURCE_DIR})

# Mavis
include_directories(SYSTEM mavis)
add_subdirectory(mavis)

# SoftFloat
include_directories(SYSTEM softfloat)
add_subdirectory(softfloat)

# ELFIO
include_directories(SYSTEM elfio)
Expand All @@ -107,7 +112,6 @@ include_directories(SYSTEM elfio)
add_compile_definitions(REG32_JSON_DIR="${SIM_BASE}/arch/rv32")
add_compile_definitions(REG64_JSON_DIR="${SIM_BASE}/arch/rv64")

add_subdirectory(mavis)
add_subdirectory(arch)
add_subdirectory(core)
add_subdirectory(core/inst_handlers)
Expand Down
4 changes: 4 additions & 0 deletions core/inst_handlers/f/RvfInsts.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "core/inst_handlers/f/RvfInsts.hpp"
#include "include/ActionTags.hpp"
#include "core/ActionGroup.hpp"
extern "C"
{
#include "source/include/softfloat.h"
}

namespace atlas
{
Expand Down
1 change: 1 addition & 0 deletions cosim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target_link_libraries(atlascosimlib
atlassim
atlascore
atlasinsts
softfloat
atlassys
${SPARTA_LIBS}
mavis
Expand Down
2 changes: 1 addition & 1 deletion sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_library(atlassim
# Atlas simulator
add_executable(atlas atlas.cpp)

target_link_libraries(atlas atlassim atlascore atlasinsts atlassys ${SPARTA_LIBS} mavis)
target_link_libraries(atlas atlassim atlascore atlasinsts softfloat softfloat atlassys ${SPARTA_LIBS} mavis)

file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../arch ${CMAKE_CURRENT_BINARY_DIR}/arch SYMBOLIC)
file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../mavis/json ${CMAKE_CURRENT_BINARY_DIR}/mavis_json SYMBOLIC)
1 change: 1 addition & 0 deletions softfloat
Submodule softfloat added at a08bb6
2 changes: 1 addition & 1 deletion test/actions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(Actions_Test)

add_executable(Actions_test Actions_test.cpp)
target_link_libraries(Actions_test atlascore atlasinsts ${SPARTA_LIBS} mavis)
target_link_libraries(Actions_test atlascore atlasinsts softfloat ${SPARTA_LIBS} mavis)

sparta_named_test(Actions_test_run Actions_test)
2 changes: 1 addition & 1 deletion test/core/atlas_state/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../mavis/json ${CMAK
file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../core/inst_handlers/rv64 ${CMAKE_CURRENT_BINARY_DIR}/rv64 SYMBOLIC)

add_executable(AtlasState_test AtlasState_test.cpp)
target_link_libraries(AtlasState_test atlascore atlasinsts atlassys atlassim ${SPARTA_LIBS} mavis)
target_link_libraries(AtlasState_test atlascore atlasinsts softfloat atlassys atlassim ${SPARTA_LIBS} mavis)

sparta_named_test(AtlasState_test_run AtlasState_test)
2 changes: 1 addition & 1 deletion test/core/execute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../mavis/json ${CMAK
file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../core/inst_handlers/rv64 ${CMAKE_CURRENT_BINARY_DIR}/rv64 SYMBOLIC)

add_executable(Execute_test Execute_test.cpp)
target_link_libraries(Execute_test atlascore atlasinsts atlassys atlassim ${SPARTA_LIBS} mavis)
target_link_libraries(Execute_test atlascore atlasinsts softfloat atlassys atlassim ${SPARTA_LIBS} mavis)

sparta_named_test(Execute_test_run Execute_test)
2 changes: 1 addition & 1 deletion test/core/fetch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../mavis/json ${CMAK
file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../core/inst_handlers/rv64 ${CMAKE_CURRENT_BINARY_DIR}/rv64 SYMBOLIC)

add_executable(Fetch_test Fetch_test.cpp)
target_link_libraries(Fetch_test atlascore atlasinsts atlassys atlassim ${SPARTA_LIBS} mavis)
target_link_libraries(Fetch_test atlascore atlasinsts softfloat atlassys atlassim ${SPARTA_LIBS} mavis)

sparta_named_test(Fetch_test_run Fetch_test)
2 changes: 1 addition & 1 deletion test/core/translate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../mavis/json ${CMAK
file (CREATE_LINK ${PROJECT_SOURCE_DIR}/../../../core/inst_handlers/rv64 ${CMAKE_CURRENT_BINARY_DIR}/rv64 SYMBOLIC)

add_executable(Translate_test Translate_test.cpp)
target_link_libraries(Translate_test atlassim atlascore atlasinsts atlassys ${SPARTA_LIBS} mavis)
target_link_libraries(Translate_test atlassim atlascore atlasinsts softfloat atlassys ${SPARTA_LIBS} mavis)

sparta_named_test(Translate_test_run Translate_test)
2 changes: 1 addition & 1 deletion test/register/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(AtlasRegister_Test)

add_executable(AtlasRegister_test Register_test.cpp)
target_link_libraries(AtlasRegister_test atlascore atlasinsts ${SPARTA_LIBS} mavis)
target_link_libraries(AtlasRegister_test atlascore atlasinsts softfloat ${SPARTA_LIBS} mavis)

sparta_named_test(Register_test_run AtlasRegister_test)
sparta_copy(AtlasRegister_test *.json)
Expand Down
2 changes: 1 addition & 1 deletion test/register/macros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(AtlasRegisterMacros_Test)

add_executable(AtlasRegisterMacros_test RegisterMacros_test.cpp)
target_link_libraries(AtlasRegisterMacros_test atlassim atlascore atlasinsts atlassys ${SPARTA_LIBS} mavis)
target_link_libraries(AtlasRegisterMacros_test atlassim atlascore atlasinsts softfloat atlassys ${SPARTA_LIBS} mavis)

sparta_named_test(RegisterMacros_test_run AtlasRegisterMacros_test)

Expand Down
2 changes: 1 addition & 1 deletion test/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(Utils_Test)

add_executable(ByteVector_test ByteVector_test.cpp)
target_link_libraries(ByteVector_test atlascore atlasinsts ${SPARTA_LIBS} mavis)
target_link_libraries(ByteVector_test atlascore atlasinsts softfloat ${SPARTA_LIBS} mavis)

sparta_named_test(ByteVector_test_run ByteVector_test)