From 880d7122bf4f6b58d049cb437a522f32b2328ac3 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 22 Aug 2022 12:29:49 -0700 Subject: [PATCH] [script] complete code; start debugging on arch file converter --- openfpga_flow/scripts/arch_file_updater.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openfpga_flow/scripts/arch_file_updater.py b/openfpga_flow/scripts/arch_file_updater.py index 1864a9c85..17dd6ce29 100644 --- a/openfpga_flow/scripts/arch_file_updater.py +++ b/openfpga_flow/scripts/arch_file_updater.py @@ -68,8 +68,13 @@ def convert_arch_xml_from_v1p1_to_v1p2(input_fname, output_fname): # Add the node to the child node sub_tile_node.append(child) # Delete the out-of-date attributes - tile_node.pop(CAPACITY_TAG) - tile_node.SubElement( + tile_node.set(CAPACITY_TAG, None) + for child in tile_node: + if (child.tag != SUB_TILE_NODE_TAG): + tile_node.remove(child) + + # Output the modified content + etree.dump(output_fname) logging.info("[Done]")