fix stand-alone ISS compilation to include all generated cores
This commit is contained in:
parent
6f8595759e
commit
07d5af1dde
|
@ -146,15 +146,11 @@ if(SystemC_FOUND)
|
||||||
add_library(${PROJECT_NAME} src/sysc/core_complex.cpp)
|
add_library(${PROJECT_NAME} src/sysc/core_complex.cpp)
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC WITH_SYSTEMC)
|
target_compile_definitions(${PROJECT_NAME} PUBLIC WITH_SYSTEMC)
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_${CORE_NAME})
|
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_${CORE_NAME})
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_b.h)
|
foreach(F IN LISTS TGC_SOURCES)
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_TGC_B)
|
string(REGEX REPLACE ".*/([^/]*)\.cpp" "\\1" CORE_NAME_LC ${F})
|
||||||
endif()
|
string(TOUPPER ${CORE_NAME_LC} CORE_NAME)
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_c.h)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_${CORE_NAME})
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_TGC_C)
|
endforeach()
|
||||||
endif()
|
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss/arch/tgc_d.h)
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE CORE_TGC_D)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc scc)
|
target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc scc)
|
||||||
if(WITH_LLVM)
|
if(WITH_LLVM)
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs})
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs})
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
"name" : "${instr.name}",
|
"name" : "${instr.name}",
|
||||||
"size" : ${instr.length},
|
"size" : ${instr.length},
|
||||||
"delay" : ${generator.hasAttribute(instr.instruction, com.minres.coredsl.coreDsl.InstrAttribute.COND)?[1,1]:1}
|
"delay" : ${instr.isConditional?"[1,1]":"1"}
|
||||||
}<%}%>
|
}<%}%>
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -57,6 +57,11 @@ using tgc_d_plat_type = iss::arch::riscv_hart_mu_p<iss::arch::tgc_d, iss::arch::
|
||||||
#include "iss/arch/tgc_d_xrb_mac.h"
|
#include "iss/arch/tgc_d_xrb_mac.h"
|
||||||
using tgc_d_xrb_mac_plat_type = iss::arch::riscv_hart_mu_p<iss::arch::tgc_d_xrb_mac, iss::arch::FEAT_PMP>;
|
using tgc_d_xrb_mac_plat_type = iss::arch::riscv_hart_mu_p<iss::arch::tgc_d_xrb_mac, iss::arch::FEAT_PMP>;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CORE_TGC_D_XRB_NN
|
||||||
|
#include "iss/arch/riscv_hart_mu_p.h"
|
||||||
|
#include "iss/arch/tgc_d_xrb_nn.h"
|
||||||
|
using tgc_d_xrb_nn_plat_type = iss::arch::riscv_hart_mu_p<iss::arch::tgc_d_xrb_nn, iss::arch::FEAT_PMP>;
|
||||||
|
#endif
|
||||||
#include <scc/report.h>
|
#include <scc/report.h>
|
||||||
#include <util/ities.h>
|
#include <util/ities.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -303,8 +308,11 @@ public:
|
||||||
#ifdef CORE_TGC_D
|
#ifdef CORE_TGC_D
|
||||||
CREATE_CORE(tgc_d)
|
CREATE_CORE(tgc_d)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CORE_TGC_D_XRB_MACD
|
#ifdef CORE_TGC_D_XRB_MAC
|
||||||
CREATE_CORE(tgc_d_xrb_mac)
|
CREATE_CORE(tgc_d_xrb_mac)
|
||||||
|
#endif
|
||||||
|
#ifdef CORE_TGC_D_XRB_NN
|
||||||
|
CREATE_CORE(tgc_d_xrb_nn)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
LOG(ERR) << "Illegal argument value for core type: " << type << std::endl;
|
LOG(ERR) << "Illegal argument value for core type: " << type << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue