From f41a5e8b8960b3a17904ed2437045b402bf91aa8 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Thu, 2 May 2024 22:49:06 -0700 Subject: [PATCH] [core] fixed some bugs --- openfpga/src/fabric/fabric_hierarchy_writer.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/openfpga/src/fabric/fabric_hierarchy_writer.cpp b/openfpga/src/fabric/fabric_hierarchy_writer.cpp index d94f2ff27..a07855a2b 100644 --- a/openfpga/src/fabric/fabric_hierarchy_writer.cpp +++ b/openfpga/src/fabric/fabric_hierarchy_writer.cpp @@ -108,18 +108,13 @@ static int rec_output_module_hierarchy_to_text_file( } if (hie_depth_to_stop == current_hie_depth || use_list) { fp << "- "; - } - fp << module_name_map.name(module_manager.module_name(child_module)); - - /* If this is the leaf node, we leave a new line - * Otherwise, we will leave a ':' to be compatible to YAML file format - */ - if ((!module_manager.child_modules(child_module).empty()) && - (hie_depth_to_stop >= current_hie_depth + 1)) { + fp << module_name_map.name(module_manager.module_name(child_module)); + fp << "\n"; + } else { + fp << module_name_map.name(module_manager.module_name(child_module)); fp << ":"; + fp << "\n"; } - fp << "\n"; - /* Go to next level */ int status = rec_output_module_hierarchy_to_text_file( fp, hie_depth_to_stop,