Skip to content

Commit fc0d7c6

Browse files
Add helper functions to t_pb_type
1 parent 00811b8 commit fc0d7c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libs/libarchfpga/src/physical_types.h

+8
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,14 @@ struct t_pb_type {
10681068
t_pb_type_power* pb_type_power = nullptr;
10691069

10701070
t_metadata_dict meta;
1071+
1072+
inline bool is_root() const {
1073+
return parent_mode == nullptr;
1074+
}
1075+
1076+
inline bool is_primitive() const {
1077+
return num_modes == 0;
1078+
}
10711079
};
10721080

10731081
/** Describes an operational mode of a clustered logic block

0 commit comments

Comments
 (0)