reformat code

This commit is contained in:
Lin 2024-08-27 17:05:13 +08:00
parent 3c28f84727
commit 1b0fcaee0f
3 changed files with 18 additions and 17 deletions

View File

@ -2,6 +2,7 @@
* Member functions for class DeviceRRGSB * Member functions for class DeviceRRGSB
***********************************************************************/ ***********************************************************************/
#include "device_rr_gsb.h" #include "device_rr_gsb.h"
#include "rr_gsb_utils.h" #include "rr_gsb_utils.h"
#include "vtr_assert.h" #include "vtr_assert.h"
#include "vtr_log.h" #include "vtr_log.h"

View File

@ -392,7 +392,8 @@ ShellCommandId add_build_fabric_command_template(
"identifying the unique GSBs"); "identifying the unique GSBs");
/* Add an option '--preload_unique_blocks' */ /* Add an option '--preload_unique_blocks' */
shell_cmd.add_option("preload_unique_blocks", false, shell_cmd.add_option(
"preload_unique_blocks", false,
"preload unique routing modules from user input xml file"); "preload unique routing modules from user input xml file");
/* Add an option '--duplicate_grid_pin' */ /* Add an option '--duplicate_grid_pin' */

View File

@ -47,9 +47,7 @@ vtr::Point<size_t> read_xml_unique_instance_info(
template <class T> template <class T>
void report_unique_module_status_read(T& openfpga_ctx, bool verbose_output) { void report_unique_module_status_read(T& openfpga_ctx, bool verbose_output) {
/* Report the stats */ /* Report the stats */
VTR_LOGV( VTR_LOGV(verbose_output, "Read %lu unique X-direction connection blocks ",
verbose_output,
"Read %lu unique X-direction connection blocks ",
openfpga_ctx.device_rr_gsb().get_num_cb_unique_module(CHANX)); openfpga_ctx.device_rr_gsb().get_num_cb_unique_module(CHANX));
VTR_LOGV( VTR_LOGV(
@ -89,7 +87,6 @@ void report_unique_module_status_read(T& openfpga_ctx, bool verbose_output) {
1.)); 1.));
} }
template <class T> template <class T>
void report_unique_module_status_write(T& openfpga_ctx, bool verbose_output) { void report_unique_module_status_write(T& openfpga_ctx, bool verbose_output) {
/* Report the stats */ /* Report the stats */
@ -181,7 +178,8 @@ int read_xml_unique_blocks(T& openfpga_ctx, const char* file_name,
instance_coords.push_back(instance_coordinate); instance_coords.push_back(instance_coordinate);
} }
} }
/* get block coordinate and instance coordinate, try to setup device_rr_gsb */ /* get block coordinate and instance coordinate, try to setup
* device_rr_gsb */
if (type == "sb") { if (type == "sb") {
device_rr_gsb.preload_unique_sb_module(block_coordinate, device_rr_gsb.preload_unique_sb_module(block_coordinate,
instance_coords); instance_coords);
@ -199,7 +197,8 @@ int read_xml_unique_blocks(T& openfpga_ctx, const char* file_name,
return 1; return 1;
} }
} }
/* As preloading gsb hasn't been developed, we should build gsb using the preloaded cbs and sbs*/ /* As preloading gsb hasn't been developed, we should build gsb using the
* preloaded cbs and sbs*/
device_rr_gsb.build_gsb_unique_module(); device_rr_gsb.build_gsb_unique_module();
if (verbose_output) { if (verbose_output) {
report_unique_module_status_read(openfpga_ctx, true); report_unique_module_status_read(openfpga_ctx, true);
@ -233,7 +232,7 @@ int write_xml_block(
if (instance_info.x() == pair.second.x() && if (instance_info.x() == pair.second.x() &&
instance_info.y() == pair.second.y()) { instance_info.y() == pair.second.y()) {
; ;
}else{ } else {
openfpga::write_tab_to_file(fp, 2); openfpga::write_tab_to_file(fp, 2);
fp << "<instance"; fp << "<instance";
write_xml_attribute(fp, "x", instance_info.x()); write_xml_attribute(fp, "x", instance_info.x());