Skip to content

Commit fbe6a40

Browse files
Add documentation for t_pb_type::is_root and is_primitive
1 parent 5de62c2 commit fbe6a40

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

libs/libarchfpga/src/physical_types.h

+11
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,21 @@ struct t_pb_type {
10691069

10701070
t_metadata_dict meta;
10711071

1072+
/**
1073+
* @brief Check if t_pb_type is the root of the pb graph. Root pb_types correspond to a single top level block type and map to a particular type
1074+
* of location in the FPGA device grid (e.g. Logic, DSP, RAM etc.)
1075+
*
1076+
* @return if t_pb_type is root ot not
1077+
*/
10721078
inline bool is_root() const {
10731079
return parent_mode == nullptr;
10741080
}
10751081

1082+
/**
1083+
* @brief Check if t_pb_type is a primitive block or equivalently a leaf of the pb graph.
1084+
*
1085+
* @return if t_pb_type is primitive/leaf ot not
1086+
*/
10761087
inline bool is_primitive() const {
10771088
return num_modes == 0;
10781089
}

0 commit comments

Comments
 (0)