Skip to content

Commit 1a5894a

Browse files
ColumnLimit: 120 in .clang-format
1 parent fd314f3 commit 1a5894a

File tree

506 files changed

+18887
-23689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+18887
-23689
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ BreakConstructorInitializersBeforeComma: false
4242
BreakConstructorInitializers: BeforeComma
4343
BreakAfterJavaFieldAnnotations: false
4444
BreakStringLiterals: true
45-
ColumnLimit: 0
45+
ColumnLimit: 120
4646
CommentPragmas: '^ IWYU pragma:'
4747
CompactNamespaces: false
4848
ConstructorInitializerAllOnOneLineOrOnePerLine: false

libs/libarchfpga/src/arch_check.cpp

Lines changed: 54 additions & 49 deletions
Large diffs are not rendered by default.

libs/libarchfpga/src/arch_check.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ void warn_model_missing_timing(const t_model* model, const char* file, uint32_t
5656
* @param sub_tile sub tile to check
5757
* @param logical_block logical block type
5858
*/
59-
void check_port_direct_mappings(t_physical_tile_type_ptr physical_tile, t_sub_tile* sub_tile, t_logical_block_type_ptr logical_block);
59+
void check_port_direct_mappings(t_physical_tile_type_ptr physical_tile,
60+
t_sub_tile* sub_tile,
61+
t_logical_block_type_ptr logical_block);
6062

6163
/**
6264
* @brief Checks the timing consistency between tha pb_type and the corresponding model.

libs/libarchfpga/src/arch_util.cpp

Lines changed: 170 additions & 262 deletions
Large diffs are not rendered by default.

libs/libarchfpga/src/arch_util.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ t_logical_block_type get_empty_logical_type(const char* name = EMPTY_BLOCK_NAME)
7474

7575
std::unordered_set<t_logical_block_type_ptr> get_equivalent_sites_set(t_physical_tile_type_ptr type);
7676

77-
void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
78-
char* new_name,
79-
t_pb_type* copy);
77+
void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type, char* new_name, t_pb_type* copy);
8078

8179
void ProcessLutClass(t_pb_type* lut_pb_type);
8280

@@ -86,14 +84,11 @@ e_power_estimation_method power_method_inherited(e_power_estimation_method paren
8684

8785
void CreateModelLibrary(t_arch* arch);
8886

89-
void SyncModelsPbTypes(t_arch* arch,
90-
const std::vector<t_logical_block_type>& Types);
87+
void SyncModelsPbTypes(t_arch* arch, const std::vector<t_logical_block_type>& Types);
9188

92-
void SyncModelsPbTypes_rec(t_arch* arch,
93-
t_pb_type* pb_type);
89+
void SyncModelsPbTypes_rec(t_arch* arch, t_pb_type* pb_type);
9490

95-
void primitives_annotation_clock_match(t_pin_to_pin_annotation* annotation,
96-
t_pb_type* parent_pb_type);
91+
void primitives_annotation_clock_match(t_pin_to_pin_annotation* annotation, t_pb_type* parent_pb_type);
9792

9893
bool segment_exists(const t_arch* arch, std::string name);
9994
const t_segment_inf* find_segment(const t_arch* arch, std::string name);
@@ -106,8 +101,12 @@ bool block_type_contains_blif_model(t_logical_block_type_ptr type, const std::st
106101
//Returns true of a pb_type (or it's children) contain the specified blif model name
107102
bool pb_type_contains_blif_model(const t_pb_type* pb_type, const std::string& blif_model_name);
108103

109-
const t_pin_to_pin_annotation* find_sequential_annotation(const t_pb_type* pb_type, const t_model_ports* port, enum e_pin_to_pin_delay_annotations annot_type);
110-
const t_pin_to_pin_annotation* find_combinational_annotation(const t_pb_type* pb_type, std::string in_port, std::string out_port);
104+
const t_pin_to_pin_annotation* find_sequential_annotation(const t_pb_type* pb_type,
105+
const t_model_ports* port,
106+
enum e_pin_to_pin_delay_annotations annot_type);
107+
const t_pin_to_pin_annotation* find_combinational_annotation(const t_pb_type* pb_type,
108+
std::string in_port,
109+
std::string out_port);
111110

112111
/**
113112
* @brief Updates the physical and logical types based on the equivalence between one and the other.

libs/libarchfpga/src/cad_types.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ struct t_pack_patterns {
120120
* Linked list for easy insertion/deletion
121121
*/
122122
struct t_cluster_placement_primitive {
123-
t_cluster_placement_primitive() {
124-
pb_graph_node = nullptr;
125-
}
123+
t_cluster_placement_primitive() { pb_graph_node = nullptr; }
126124
t_pb_graph_node* pb_graph_node;
127125
bool valid;
128126
float base_cost; /* cost independent of current status of packing */

libs/libarchfpga/src/clock_types.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
#include <string>
55
#include <vector>
66

7-
enum class e_clock_type {
8-
SPINE,
9-
RIB,
10-
H_TREE
11-
};
7+
enum class e_clock_type { SPINE, RIB, H_TREE };
128

139
struct t_metal_layer {
1410
float r_metal;

libs/libarchfpga/src/device_grid.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,15 @@ DeviceGrid::DeviceGrid(std::string grid_name,
1818
size_t DeviceGrid::num_instances(t_physical_tile_type_ptr type, int layer_num) const {
1919
size_t count = 0;
2020
//instance_counts_ is not initialized
21-
if (instance_counts_.empty()) {
22-
return 0;
23-
}
21+
if (instance_counts_.empty()) { return 0; }
2422

2523
int num_layers = (int)grid_.dim_size(0);
2624

2725
if (layer_num == -1) {
2826
//Count all layers
2927
for (int curr_layer_num = 0; curr_layer_num < num_layers; ++curr_layer_num) {
3028
auto iter = instance_counts_[curr_layer_num].find(type);
31-
if (iter != instance_counts_[curr_layer_num].end()) {
32-
count += iter->second;
33-
}
29+
if (iter != instance_counts_[curr_layer_num].end()) { count += iter->second; }
3430
}
3531
return count;
3632
} else {

libs/libarchfpga/src/device_grid.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,22 @@ class DeviceGrid {
2525
public:
2626
DeviceGrid() = default;
2727
DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid);
28-
DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid, std::vector<t_logical_block_type_ptr> limiting_res);
28+
DeviceGrid(std::string grid_name,
29+
vtr::NdMatrix<t_grid_tile, 3> grid,
30+
std::vector<t_logical_block_type_ptr> limiting_res);
2931

3032
const std::string& name() const { return name_; }
3133

3234
///@brief Return the number of layers(number of dies)
33-
inline int get_num_layers() const {
34-
return (int)grid_.dim_size(0);
35-
}
35+
inline int get_num_layers() const { return (int)grid_.dim_size(0); }
3636

3737
///@brief Return the width of the grid at the specified layer
3838
size_t width() const { return grid_.dim_size(1); }
3939
///@brief Return the height of the grid at the specified layer
4040
size_t height() const { return grid_.dim_size(2); }
4141

4242
///@brief Return the size of the flattened grid on the given layer
43-
inline size_t grid_size() const {
44-
return grid_.size();
45-
}
43+
inline size_t grid_size() const { return grid_.size(); }
4644

4745
///@brief deallocate members of DeviceGrid
4846
void clear();
@@ -114,9 +112,7 @@ class DeviceGrid {
114112
}
115113

116114
///@brief Return the nth t_grid_tile on the given layer of the flattened grid - Used by serializer functions
117-
inline const t_grid_tile* get_grid_locs_grid_loc(int n) const {
118-
return &grid_.get(n);
119-
}
115+
inline const t_grid_tile* get_grid_locs_grid_loc(int n) const { return &grid_.get(n); }
120116

121117
private:
122118
///@brief count_instances() counts the number of each tile type on each layer and store it in instance_counts_. It is called in the constructor.
@@ -131,7 +127,8 @@ class DeviceGrid {
131127
* @note which can be used for indexing in the second dimension, allowing
132128
* @note traditional 2-d indexing to be used
133129
*/
134-
vtr::NdMatrix<t_grid_tile, 3> grid_; //This stores the grid of complex blocks. It is a 3D matrix: [0..num_layers-1][0..grid.width()-1][0..grid_height()-1]
130+
vtr::NdMatrix<t_grid_tile, 3>
131+
grid_; //This stores the grid of complex blocks. It is a 3D matrix: [0..num_layers-1][0..grid.width()-1][0..grid_height()-1]
135132

136133
///@brief instance_counts_ stores the number of each tile type on each layer. It is initialized in count_instances().
137134
std::vector<std::map<t_physical_tile_type_ptr, size_t>> instance_counts_; /* [layer_num][physical_tile_type_ptr] */

0 commit comments

Comments
 (0)