aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-25 13:34:06 -0700
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-25 17:20:13 -0700
commitbbe1881293be1eb539b44c30645cbbb1a588d09c (patch)
tree50d7cf58e9d00d789f685a22ce1fbfa3f61bd348 /fpga_interchange
parent91ca5f110bdea0dbf1b6183d8129c3ea7b0c71c6 (diff)
downloadnextpnr-bbe1881293be1eb539b44c30645cbbb1a588d09c.tar.gz
nextpnr-bbe1881293be1eb539b44c30645cbbb1a588d09c.tar.bz2
nextpnr-bbe1881293be1eb539b44c30645cbbb1a588d09c.zip
Add targets to generate YAML outputs for DeviceResource files.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange')
-rw-r--r--fpga_interchange/examples/chipdb.cmake22
1 files changed, 22 insertions, 0 deletions
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()