aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/family.cmake
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-22 17:46:00 -0700
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-23 08:16:50 -0700
commit8d1eb0a1950816d4dcaae40fb230acff0d1afeef (patch)
tree4c0fac8969789f144c2296e4a3208565a57597f7 /fpga_interchange/family.cmake
parent9ef412c2cc623ef84d8fb866734f3892fc6f127c (diff)
downloadnextpnr-8d1eb0a1950816d4dcaae40fb230acff0d1afeef.tar.gz
nextpnr-8d1eb0a1950816d4dcaae40fb230acff0d1afeef.tar.bz2
nextpnr-8d1eb0a1950816d4dcaae40fb230acff0d1afeef.zip
Initial lookahead for FPGA interchange.
Currently the lookahead is disabled by default because of the time to compute and RAM usage. However it does appear to work reasonably well in testing. Further effort is required to lower RAM usage after initial computation, and explore trade-off for cheaper time to compute. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/family.cmake')
-rw-r--r--fpga_interchange/family.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/fpga_interchange/family.cmake b/fpga_interchange/family.cmake
index c288736c..2b78b75c 100644
--- a/fpga_interchange/family.cmake
+++ b/fpga_interchange/family.cmake
@@ -24,14 +24,31 @@ add_custom_target(all-${family}-archcheck-tests)
add_subdirectory(${family}/examples/devices)
add_subdirectory(${family}/examples/tests)
+set(PROTOS lookahead.capnp)
+set(CAPNP_SRCS)
+set(CAPNP_HDRS)
+find_package(CapnProto REQUIRED)
+foreach (proto ${PROTOS})
+ capnp_generate_cpp(CAPNP_SRC CAPNP_HDR fpga_interchange/${proto})
+ list(APPEND CAPNP_HDRS ${CAPNP_HDR})
+ list(APPEND CAPNP_SRCS ${CAPNP_SRC})
+endforeach()
+
+add_library(extra_capnp STATIC ${CAPNP_SRCS})
+target_link_libraries(extra_capnp PRIVATE CapnProto::capnp)
+
+target_include_directories(extra_capnp INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/fpga_interchange)
+
foreach (target ${family_targets})
target_include_directories(${target} PRIVATE ${TCL_INCLUDE_PATH})
target_link_libraries(${target} PRIVATE ${TCL_LIBRARY})
target_link_libraries(${target} PRIVATE fpga_interchange_capnp)
+ target_link_libraries(${target} PRIVATE extra_capnp)
target_link_libraries(${target} PRIVATE z)
endforeach()
if(BUILD_GUI)
target_link_libraries(gui_${family} fpga_interchange_capnp)
+ target_link_libraries(gui_${family} extra_capnp)
target_link_libraries(gui_${family} z)
endif()