From bbe1881293be1eb539b44c30645cbbb1a588d09c Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Thu, 25 Mar 2021 13:34:06 -0700 Subject: Add targets to generate YAML outputs for DeviceResource files. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/chipdb.cmake | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'fpga_interchange') diff --git a/fpga_interchange/examples/chipdb.cmake b/fpga_interchange/examples/chipdb.cmake index 60814845..9f2cf28c 100644 --- a/fpga_interchange/examples/chipdb.cmake +++ b/fpga_interchange/examples/chipdb.cmake @@ -51,6 +51,17 @@ function(create_rapidwright_device_db) add_custom_target(rapidwright-${device}-device DEPENDS ${rapidwright_device_db}) set_property(TARGET rapidwright-${device}-device PROPERTY LOCATION ${rapidwright_device_db}) + add_custom_target(rapidwright-${device}-device-yaml + COMMAND + ${PYTHON_EXECUTABLE} -mfpga_interchange.convert + --schema_dir ${INTERCHANGE_SCHEMA_PATH} + --schema device + --input_format capnp + --output_format yaml + ${rapidwright_device_db} + ${rapidwright_device_db}.yaml + DEPENDS ${rapidwright_device_db}) + if (DEFINED output_target) set(${output_target} rapidwright-${device}-device PARENT_SCOPE) endif() @@ -129,6 +140,17 @@ function(create_patched_device_db) add_custom_target(${patch_name}-${device}-device DEPENDS ${output_device_file}) set_property(TARGET ${patch_name}-${device}-device PROPERTY LOCATION ${output_device_file}) + add_custom_target(${patch_name}-${device}-device-yaml + COMMAND + ${PYTHON_EXECUTABLE} -mfpga_interchange.convert + --schema_dir ${INTERCHANGE_SCHEMA_PATH} + --schema device + --input_format capnp + --output_format yaml + ${output_device_file} + ${output_device_file}.yaml + DEPENDS ${output_device_file}) + if (DEFINED output_target) set(${output_target} ${patch_name}-${device}-device PARENT_SCOPE) endif() -- cgit v1.2.3