Skip to content

Commit de3914c

Browse files
authored
Merge pull request #1907 from antmicro/acom/fpga-interchange-initial-arch-reading
FPGA Interchange: Initial interchange device reading
2 parents c918007 + d2b73ee commit de3914c

24 files changed

+1094
-558
lines changed

.github/scripts/install_dependencies.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sudo apt install -y \
1010
binutils \
1111
binutils-gold \
1212
build-essential \
13+
capnproto \
1314
cmake \
1415
ctags \
1516
curl \
@@ -20,6 +21,7 @@ sudo apt install -y \
2021
git \
2122
gperf \
2223
libcairo2-dev \
24+
libcapnp-dev \
2325
libgtk-3-dev \
2426
libevent-dev \
2527
libfontconfig1-dev \
@@ -54,3 +56,9 @@ sudo apt install -y \
5456
# libtbb-dev
5557

5658
pip install -r requirements.txt
59+
60+
git clone https://github.com/capnproto/capnproto-java.git $GITHUB_WORKSPACE/env/capnproto-java
61+
pushd $GITHUB_WORKSPACE/env/capnproto-java
62+
make
63+
sudo make install
64+
popd

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ option(VTR_ENABLE_CAPNPROTO "Enable capnproto binary serialization support in VP
4040
#Allow the user to enable/disable VPR analytic placement
4141
#VPR option --enable_analytic_placer is also required for Analytic Placement
4242
option(VPR_ANALYTIC_PLACE "Enable analytic placement in VPR." ON)
43+
option(VPR_ENABLE_INTERCHANGE "Enable FPGA interchange." ON)
4344

4445
option(WITH_BLIFEXPLORER "Enable build with blifexplorer" OFF)
4546

@@ -121,6 +122,11 @@ endif()
121122
# Build type flags
122123
#
123124

125+
set(EXTRA_FLAGS "")
126+
if(VPR_ENABLE_INTERCHANGE)
127+
set(EXTRA_FLAGS "-lz")
128+
endif()
129+
124130
if(NOT MSVC)
125131
# for GCC and Clang
126132
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3")
@@ -295,7 +301,7 @@ endif()
295301
# Set final flags
296302
#
297303
separate_arguments(
298-
ADDITIONAL_FLAGS UNIX_COMMAND "${SANITIZE_FLAGS} ${PROFILING_FLAGS} ${COVERAGE_FLAGS} ${LOGGING_FLAGS} ${COLORED_COMPILE}"
304+
ADDITIONAL_FLAGS UNIX_COMMAND "${SANITIZE_FLAGS} ${PROFILING_FLAGS} ${COVERAGE_FLAGS} ${LOGGING_FLAGS} ${COLORED_COMPILE} ${EXTRA_FLAGS}"
299305
)
300306
separate_arguments(
301307
WARN_FLAGS UNIX_COMMAND "${WARN_FLAGS}"
@@ -366,7 +372,6 @@ if (VPR_USE_EZGL STREQUAL "auto")
366372
endif()
367373
endif()
368374

369-
370375
#Add the various sub-projects
371376
if(${WITH_ABC})
372377
add_subdirectory(abc)

libs/EXTERNAL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ add_subdirectory(libblifparse)
88
add_subdirectory(libtatum)
99
add_subdirectory(libcatch2)
1010

11-
#VPR_USE_EZGL is initialized in the root CMakeLists.
11+
#VPR_USE_EZGL is initialized in the root CMakeLists.
1212
#compile libezgl only if the user asks for or has its dependencies installed.
1313
if(VPR_USE_EZGL STREQUAL "on")
1414
add_subdirectory(libezgl)

libs/libarchfpga/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@ list(REMOVE_ITEM LIB_SOURCES ${EXEC_SOURCES})
1212

1313
#Create the library
1414
add_library(libarchfpga STATIC
15-
${LIB_HEADERS}
16-
${LIB_SOURCES})
15+
${LIB_HEADERS}
16+
${LIB_SOURCES}
17+
)
18+
1719
target_include_directories(libarchfpga PUBLIC ${LIB_INCLUDE_DIRS})
20+
1821
set_target_properties(libarchfpga PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
1922

2023
#Specify link-time dependancies
2124
target_link_libraries(libarchfpga
2225
libvtrutil
2326
libpugixml
24-
libpugiutil)
27+
libpugiutil
28+
libvtrcapnproto
29+
)
30+
31+
target_compile_definitions(libarchfpga PUBLIC ${INTERCHANGE_SCHEMA_HEADERS})
2532

2633
#Create the test executable
2734
add_executable(read_arch ${EXEC_SOURCES})

0 commit comments

Comments
 (0)