File tree Expand file tree Collapse file tree 4 files changed +96
-26
lines changed Expand file tree Collapse file tree 4 files changed +96
-26
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.27 )
2
2
3
- if (NOT SKIP_VCPKG AND NOT DEFINED CMAKE_TOOLCHAIN_FILE )
4
- include (FetchContent )
5
- FetchContent_Declare (
6
- vcpkg
7
- GIT_REPOSITORY https://github.com/microsoft/vcpkg.git
8
- GIT_TAG master
9
- GIT_SHALLOW TRUE
10
- )
11
- FetchContent_MakeAvailable (vcpkg )
12
- set (CMAKE_TOOLCHAIN_FILE
13
- ${vcpkg_SOURCE_DIR} /scripts/buildsystems/vcpkg.cmake
14
- CACHE FILEPATH "Vcpkg toolchain file"
15
- )
16
- set (VCPKG_ROOT_DIR ${vcpkg_SOURCE_DIR} CACHE PATH "Vcpkg Root Directory" )
17
- endif ()
18
-
19
- if (DEFINED VCPKG_ROOT_DIR )
20
- add_custom_target (UpdateVcpkgBaseline
21
- ${VCPKG_ROOT_DIR} /vcpkg x-update-baseline
22
- )
23
- endif ()
3
+ include (cmake/BootstrapVcpkg.cmake )
24
4
25
5
project (nyu-core VERSION 1.0.0 )
26
6
Original file line number Diff line number Diff line change
1
+ if (NOT SKIP_VCPKG AND NOT DEFINED CMAKE_TOOLCHAIN_FILE )
2
+ include (FetchContent )
3
+
4
+ if (WIN32 )
5
+ set (VCPKG vcpkg.exe )
6
+ elseif (LINUX )
7
+ if (EXISTS "/etc/alpine-release" )
8
+ set (VCPKG vcpkg-musl )
9
+ else ()
10
+ set (VCPKG vcpkg-glibc )
11
+ endif ()
12
+ elseif (APPLE )
13
+ set (VCPKG vcpkg-macos )
14
+ else ()
15
+ message (FATAL_ERROR "Cannot bootstrap vcpkg: Unsupported platform" )
16
+ endif ()
17
+
18
+ FetchContent_Declare (vcpkg
19
+ URL https://github.com/microsoft/vcpkg-tool/releases/latest/download/${VCPKG}
20
+ DOWNLOAD_NO_EXTRACT TRUE
21
+ )
22
+
23
+ FetchContent_MakeAvailable (vcpkg )
24
+ set (VCPKG ${vcpkg_SOURCE_DIR} /${VCPKG} )
25
+
26
+ file (CHMOD ${VCPKG} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE )
27
+ set (ENV{VCPKG_ROOT} ${vcpkg_SOURCE_DIR} )
28
+ execute_process (COMMAND ${VCPKG} bootstrap-standalone )
29
+
30
+ if (NOT WIN32 )
31
+ file (RENAME ${VCPKG} ${vcpkg_SOURCE_DIR} /vcpkg )
32
+ endif ()
33
+
34
+ set (CMAKE_TOOLCHAIN_FILE
35
+ ${vcpkg_SOURCE_DIR} /scripts/buildsystems/vcpkg.cmake
36
+ CACHE FILEPATH "Vcpkg toolchain file"
37
+ )
38
+ set (VCPKG_ROOT_DIR ${vcpkg_SOURCE_DIR} CACHE PATH "Vcpkg Root Directory" )
39
+ endif ()
40
+
41
+ if (DEFINED VCPKG_ROOT_DIR )
42
+ add_custom_target (UpdateVcpkgBaseline
43
+ ${VCPKG_ROOT_DIR} /vcpkg x-update-baseline
44
+ )
45
+ endif ()
Original file line number Diff line number Diff line change @@ -3,17 +3,62 @@ find_package(nyu-util REQUIRED CONFIG)
3
3
4
4
add_executable (tests )
5
5
target_sources (tests PRIVATE
6
+ alu.cpp
6
7
8
+ branch_addr_calc.cpp
9
+ branch_eval.cpp
10
+ branch_manager.cpp
11
+ branch_predictor.cpp
7
12
8
- con_id.cpp con_ex.cpp alu.cpp con_branch_cont.cpp branch_eval.cpp pc.cpp ifid.cpp memwb.cpp gpr.cpp exmem.cpp branch_addr_calc.cpp idex.cpp branch_predictor.cpp pipeline_reset.cpp branch_manager.cpp data_cache_manager.cpp l1_data_cache.cpp
13
+ con_branch_cont.cpp
14
+ con_ex.cpp
15
+ con_id.cpp
9
16
17
+ data_cache_manager.cpp
18
+ exmem.cpp
19
+
20
+ gpr.cpp
21
+ idex.cpp
22
+ ifid.cpp
23
+
24
+ # Failing
25
+ # l1_data_cache.cpp
26
+
27
+ memwb.cpp
28
+ pc.cpp
29
+ pipeline_reset.cpp
10
30
)
31
+
11
32
nyu_link_sv (tests PRIVATE core )
12
33
nyu_target_verilate (tests
13
- TOP_MODULES Con_ID Con_EX Alu Con_Branch_Cont Branch_Eval PC IFID MEMWB GPR EXMEM Branch_Addr_Calc IDEX Branch_Predictor Pipeline_Reset Branch_Manager Data_Cache_Manager L1_Data_Cache
14
-
15
34
ARGS COVERAGE TRACE_FST
35
+ TOP_MODULES
36
+ Alu
37
+
38
+ Branch_Addr_Calc
39
+ Branch_Eval
40
+ Branch_Manager
41
+ Branch_Predictor
42
+
43
+ Con_Branch_Cont
44
+ Con_EX
45
+ Con_ID
46
+
47
+ Data_Cache_Manager
48
+ EXMEM
49
+
50
+ GPR
51
+ IDEX
52
+ IFID
53
+
54
+ # Failing
55
+ # L1_Data_Cache
56
+
57
+ MEMWB
58
+ PC
59
+ Pipeline_Reset
16
60
)
61
+
17
62
target_link_libraries (tests PRIVATE Catch2::Catch2WithMain nyu::covrecorder )
18
63
target_compile_features (tests PRIVATE cxx_std_23 )
19
64
Original file line number Diff line number Diff line change 13
13
"vcpkg-configuration" : {
14
14
"default-registry" : {
15
15
"kind" : " git" ,
16
- "baseline" : " 326d8b43e365352ba3ccadf388d989082fe0f2a6 " ,
16
+ "baseline" : " 0f88ecb8528605f91980b90a2c5bad88e3cb565f " ,
17
17
"repository" : " https://github.com/microsoft/vcpkg.git"
18
18
},
19
19
"registries" : [
20
20
{
21
21
"kind" : " git" ,
22
- "baseline" : " 7a6b61ca47ca041f1c6558c649cbc2ddbf11d57a " ,
22
+ "baseline" : " 83a1b8ad4f7be3bf2e16d4397f58e6119e001ef6 " ,
23
23
"repository" : " https://github.com/NYU-Processor-Design/nyu-registry.git" ,
24
24
"packages" : [
25
25
" nyu-*"
You can’t perform that action at this time.
0 commit comments