From 15e945aa1c83d5408f93e6375b38ec81deb4f874 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Tue, 23 Mar 2021 20:35:53 +0100 Subject: interchange: added boards and group testing across multiple boards Signed-off-by: Alessandro Comodi --- fpga_interchange/examples/boards.cmake | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 fpga_interchange/examples/boards.cmake (limited to 'fpga_interchange/examples/boards.cmake') diff --git a/fpga_interchange/examples/boards.cmake b/fpga_interchange/examples/boards.cmake new file mode 100644 index 00000000..c44ab930 --- /dev/null +++ b/fpga_interchange/examples/boards.cmake @@ -0,0 +1,45 @@ +function(add_board) + # ~~~ + # add_board( + # name + # device + # package + # ) + # ~~~ + # + # Generates a board target containing information on the common device and package + # of the board. + # + # Arguments: + # - name: name of the board. E.g. arty + # - device: common device name of a set of parts. E.g. xc7a35tcsg324-1 and xc7a35tcpg236-1 + # share the same xc7a35t device prefix + # - package: one of the packages available for a given device. E.g. cpg236 + # + # Targets generated: + # - board- + + set(options) + set(oneValueArgs name device package) + set(multiValueArgs) + + cmake_parse_arguments( + add_board + "${options}" + "${oneValueArgs}" + "${multiValueArgs}" + ${ARGN} + ) + + set(name ${add_board_name}) + set(device ${add_board_device}) + set(package ${add_board_package}) + + add_custom_target(board-${name} DEPENDS device-${device}) + set_target_properties( + board-${name} + PROPERTIES + DEVICE ${device} + PACKAGE ${package} + ) +endfunction() -- cgit v1.2.3