From 93cbbf204546ac27c7fb951a7fa7e3f42e3d4eac Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 6 Oct 2023 18:20:55 -0700 Subject: [PATCH] [core] code format --- .../src/bitstream_manager_utils.cpp | 7 ++++--- .../write_xml_fabric_bitstream.cpp | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/libs/libfpgabitstream/src/bitstream_manager_utils.cpp b/libs/libfpgabitstream/src/bitstream_manager_utils.cpp index d6575327f..13ef85bbd 100644 --- a/libs/libfpgabitstream/src/bitstream_manager_utils.cpp +++ b/libs/libfpgabitstream/src/bitstream_manager_utils.cpp @@ -90,11 +90,13 @@ size_t find_bitstream_manager_config_bit_index_in_grandparent_block( size_t curr_index = 0; ConfigBlockId parent_blk = bitstream_manager.bit_parent_block(bit_id); ConfigBlockId grandparent_blk = bitstream_manager.block_parent(parent_blk); - for (const ConfigBlockId& cand_blk : bitstream_manager.block_children(grandparent_blk)) { + for (const ConfigBlockId& cand_blk : + bitstream_manager.block_children(grandparent_blk)) { if (cand_blk != parent_blk) { curr_index += bitstream_manager.block_bits(cand_blk).size(); } else { - curr_index += find_bitstream_manager_config_bit_index_in_parent_block(bitstream_manager, bit_id); + curr_index += find_bitstream_manager_config_bit_index_in_parent_block( + bitstream_manager, bit_id); break; } } @@ -102,7 +104,6 @@ size_t find_bitstream_manager_config_bit_index_in_grandparent_block( return curr_index; } - /******************************************************************** * Find the total number of configuration bits under a block * As configuration bits are stored only under the leaf blocks, diff --git a/openfpga/src/fpga_bitstream/write_xml_fabric_bitstream.cpp b/openfpga/src/fpga_bitstream/write_xml_fabric_bitstream.cpp index 4bc60ea42..acbd95d0b 100644 --- a/openfpga/src/fpga_bitstream/write_xml_fabric_bitstream.cpp +++ b/openfpga/src/fpga_bitstream/write_xml_fabric_bitstream.cpp @@ -80,7 +80,9 @@ static int write_fabric_config_bit_to_xml_file( write_tab_to_file(fp, xml_hierarchy_depth); fp << "\n"; @@ -211,8 +214,7 @@ static int write_fabric_regional_config_bit_to_xml_file( const FabricBitstream& fabric_bitstream, const FabricBitRegionId& fabric_region, const e_config_protocol_type& config_type, bool fast_xml, - const int& xml_hierarchy_depth, - const BitstreamWriterOption& options) { + const int& xml_hierarchy_depth, const BitstreamWriterOption& options) { if (false == valid_file_stream(fp)) { return 1; }