-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor project structure and CMake
- Loading branch information
Showing
219 changed files
with
210 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
*.o | ||
Makefile | ||
|
||
CMakeLists.txt.user* | ||
|
||
|
||
# Qt generated files | ||
moc_* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"cmake.buildDirectory": "C:/Users/Morten/Downloads/build-Ripes-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Allow linking parent libraries with libraries defined in subdirectories | ||
cmake_policy(SET CMP0079 NEW) | ||
|
||
macro(create_isa_lib isa) | ||
file(GLOB LIB_SOURCES ${isa}/*.cpp) | ||
file(GLOB LIB_HEADERS | ||
RipesVSRTLProcessor.h | ||
ripesvsrtlprocessor.h | ||
${isa}/*.h) | ||
add_library(${isa}_lib ${LIB_SOURCES} ${LIB_HEADERS}) | ||
endmacro() | ||
|
||
macro(create_vsrtl_processor isa name) | ||
file(GLOB LIB_SOURCES ${isa}/${name}/*.cpp) | ||
file(GLOB LIB_HEADERS RipesVSRTLProcessor.h ${isa}/${name}/*.h) | ||
add_library(${name} ${LIB_SOURCES} ${LIB_HEADERS}) | ||
target_link_libraries(${name} ${VSRTL_CORE_LIB} ${isa}_lib) | ||
target_include_directories(${name} PUBLIC ${isa}) | ||
target_include_directories(${name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
target_include_directories(${name} PUBLIC ${CMAKE_SOURCE_DIR}/external) | ||
target_compile_features(${name} PRIVATE cxx_std_17) | ||
endmacro() | ||
|
||
macro(create_verilator_processor | ||
SUBFOLDER | ||
PROCFOLDER | ||
SOURCES | ||
TOP | ||
ARGS | ||
) | ||
file(GLOB LIB_SOURCES ${SUBFOLDER}/*.cpp) | ||
file(GLOB LIB_HEADERS ${SUBFOLDER}/*.h) | ||
|
||
add_library(${SUBFOLDER} ${LIB_SOURCES} ${LIB_HEADERS}) | ||
target_compile_features(${SUBFOLDER} PRIVATE cxx_std_17) | ||
|
||
# Link processor against Verilator runtime library | ||
target_link_libraries(${SUBFOLDER} PUBLIC ${VERILATOR_LIB}) | ||
# Link Ripes lib against the processor library (Verilator processors are not header-only) | ||
target_link_libraries(${RIPES_LIB} PUBLIC ${SUBFOLDER}) | ||
|
||
verilate(${SUBFOLDER} | ||
TOP_MODULE ${TOP} | ||
SOURCES ${SOURCES} | ||
VERILATOR_ARGS ${ARGS}) | ||
|
||
endmacro() | ||
|
||
# RISC-V Processors | ||
create_isa_lib(RISC-V) | ||
create_vsrtl_processor(RISC-V rvss) | ||
create_vsrtl_processor(RISC-V rv5s) | ||
create_vsrtl_processor(RISC-V rv5s_no_fw_hz) | ||
create_vsrtl_processor(RISC-V rv5s_no_hz) | ||
create_vsrtl_processor(RISC-V rv5s_no_fw) | ||
create_vsrtl_processor(RISC-V rv6s_dual) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<RCC> | ||
<qresource prefix="/layouts"> | ||
<file>RISC-V/rvss/rv_ss_extended_layout.json</file> | ||
<file>RISC-V/rvss/rv_ss_standard_layout.json</file> | ||
<file>RISC-V/rv5s/rv5s_standard_layout.json</file> | ||
<file>RISC-V/rv5s/rv5s_extended_layout.json</file> | ||
<file>RISC-V/rv5s_no_fw_hz/rv5s_no_fw_hz_standard_layout.json</file> | ||
<file>RISC-V/rv5s_no_fw_hz/rv5s_no_fw_hz_extended_layout.json</file> | ||
<file>RISC-V/rv5s_no_hz/rv5s_no_hz_standard_layout.json</file> | ||
<file>RISC-V/rv5s_no_hz/rv5s_no_hz_extended_layout.json</file> | ||
<file>RISC-V/rv5s_no_fw/rv5s_no_fw_standard_layout.json</file> | ||
<file>RISC-V/rv5s_no_fw/rv5s_no_fw_extended_layout.json</file> | ||
<file>RISC-V/rv6s_dual/rv6s_dual_extended_layout.json</file> | ||
</qresource> | ||
</RCC> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#pragma once | ||
|
||
#include "program.h" | ||
#include "assembler/program.h" | ||
#include "ripessettings.h" | ||
#include <QDialog> | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define RIPES_GIT_VERSION "N/A" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
create_ripes_lib(assembler LINK_TO_RIPES_LIB) | ||
add_ripes_sources(assembler) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#include "parserutilities.h" | ||
|
||
#include "assembler/parserutilities.h" | ||
#include "binutils.h" | ||
|
||
namespace Ripes { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "program.h" | ||
#include "assembler/program.h" | ||
|
||
#include "processorhandler.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "symbolmap.h" | ||
#include "assembler/symbolmap.h" | ||
|
||
namespace Ripes { | ||
namespace Assembler { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
create_ripes_lib(cachesim LINK_TO_RIPES_LIB) | ||
add_ripes_sources(cachesim) |
Oops, something went wrong.