2024-04-04 18:12:30 +00:00
|
|
|
include(ChiselBuild)
|
|
|
|
add_executable(V${TOPMODULE} config.cpp main.cpp)
|
2024-04-10 12:12:41 +00:00
|
|
|
target_link_libraries(V${TOPMODULE} PRIVATE sdb)
|
2024-04-04 18:12:30 +00:00
|
|
|
|
|
|
|
verilate(V${TOPMODULE} TRACE COVERAGE THREADS
|
|
|
|
TOP_MODULE ${TOPMODULE}
|
|
|
|
PREFIX V${TOPMODULE}
|
|
|
|
SOURCES ${CHISEL_OUTPUT_TOPMODULE} ${CHISEL_OUTPUT_VERILATOR_CONF}
|
|
|
|
INCLUDE_DIRS ${CHISEL_OUTPUT_DIR}
|
|
|
|
VERILATOR_ARGS
|
|
|
|
"--vpi" # Enable VPI
|
2024-04-09 09:03:21 +00:00
|
|
|
"-Wno-UNOPTFLAT"
|
2024-04-04 18:12:30 +00:00
|
|
|
)
|
2024-04-05 03:30:52 +00:00
|
|
|
|
|
|
|
add_test(
|
|
|
|
NAME V${TOPMODULE}
|
|
|
|
COMMAND V${TOPMODULE}
|
|
|
|
--no-bin -m ${PROJECT_SOURCE_DIR}/resource/addi.txt
|
|
|
|
--diff-lib ${DIFFTEST_LIB})
|