reformat code

This commit is contained in:
Lin 2024-09-12 11:18:25 +08:00
parent 5ccad723c4
commit 41d38193d3
4 changed files with 21 additions and 16 deletions

View File

@ -128,7 +128,8 @@ vtr::Point<size_t> DeviceRRGSB::get_cbx_unique_block_coord(size_t id) const {
return cbx_unique_module_[id];
}
/* get the coordinates of the instances of a unique connection block of CHANX type */
/* get the coordinates of the instances of a unique connection block of CHANX
* type */
std::vector<vtr::Point<size_t>>
DeviceRRGSB::get_cbx_unique_block_instance_coord(
const vtr::Point<size_t>& unique_block_coord) const {
@ -155,7 +156,8 @@ vtr::Point<size_t> DeviceRRGSB::get_cby_unique_block_coord(size_t id) const {
return cby_unique_module_[id];
}
/* get the coordinates of the instances of a unique connection block of CHANY type */
/* get the coordinates of the instances of a unique connection block of CHANY
* type */
std::vector<vtr::Point<size_t>>
DeviceRRGSB::get_cby_unique_block_instance_coord(
const vtr::Point<size_t>& unique_block_coord) const {

View File

@ -52,16 +52,18 @@ class DeviceRRGSB {
const vtr::Point<size_t>& unique_block_coord)
const; /* get the coordinates of the instances of a unique switch block */
vtr::Point<size_t> get_cbx_unique_block_coord(
size_t id) const; /* get the coordinate of a unique connection block of CHANX type */
vtr::Point<size_t> get_cbx_unique_block_coord(size_t id)
const; /* get the coordinate of a unique connection block of CHANX type */
std::vector<vtr::Point<size_t>> get_cbx_unique_block_instance_coord(
const vtr::Point<size_t>& unique_block_coord)
const; /* get the coordinates of the instances of a unique connection block of CHANX type*/
vtr::Point<size_t> get_cby_unique_block_coord(
size_t id) const; /* get the coordinate of a unique connection block of CHANY type */
const; /* get the coordinates of the instances of a unique connection block
of CHANX type*/
vtr::Point<size_t> get_cby_unique_block_coord(size_t id)
const; /* get the coordinate of a unique connection block of CHANY type */
std::vector<vtr::Point<size_t>> get_cby_unique_block_instance_coord(
const vtr::Point<size_t>& unique_block_coord)
const; /* get the coordinates of the instances of a unique connection block of CHANY type */
const; /* get the coordinates of the instances of a unique connection block
of CHANY type */
const RRGSB& get_gsb_unique_module(
const size_t& index) const; /* Get a rr-gsb which is a unique mirror */
@ -132,7 +134,7 @@ when read_unique_blocks command invoked */
instance_coords); /* preload unique SB blocks
and their corresponding instance information. This function
will be called when read_unique_blocks command invoked */
void clear_unique_modules();/* clean the content of unique blocks*/
void clear_unique_modules(); /* clean the content of unique blocks*/
private: /* Internal cleaners */
void clear_gsb(); /* clean the content */
@ -175,7 +177,8 @@ when read_unique_blocks command invoked */
private: /* Internal Data */
std::vector<std::vector<RRGSB>> rr_gsb_;
bool is_compressed_ = false; /* True if the unique blocks have been preloaded or built */
bool is_compressed_ =
false; /* True if the unique blocks have been preloaded or built */
std::vector<std::vector<size_t>>
gsb_unique_module_id_; /* A map from rr_gsb to its unique mirror */

View File

@ -24,10 +24,10 @@
* This file includes the top-level functions of this library
* which includes:
* -- write the unique blocks' information in the associated data structures:
*device_rr_gsb to a XML file
*device_rr_gsb to a XML file
*******************************************************************/
namespace openfpga {
/*Write unique blocks and their corresponding instances' information from
*device_rr_gsb to a XML file*/
int write_xml_atom_block(std::fstream& fp,

View File

@ -16,12 +16,11 @@
#include "arch_error.h"
#include "device_rr_gsb_utils.h"
/********************************************************************
* This file includes the top-level functions of this library
* which includes:
* -- write the unique blocks' information in the associated data structures:
*device_rr_gsb to a XML file
*device_rr_gsb to a XML file
*******************************************************************/
namespace openfpga {
@ -29,8 +28,9 @@ int write_xml_atom_block(std::fstream& fp,
const std::vector<vtr::Point<size_t>>& instance_map,
const vtr::Point<size_t>& unique_block_coord,
std::string type);
void report_unique_module_status_write(const DeviceRRGSB& device_rr_gsb,
bool verbose_output); /*report status of written info*/
void report_unique_module_status_write(
const DeviceRRGSB& device_rr_gsb,
bool verbose_output); /*report status of written info*/
int write_xml_unique_blocks(const DeviceRRGSB& device_rr_gsb, const char* fname,
bool verbose_output);
} // namespace openfpga