Skip to content

Commit d4485f3

Browse files
Change RR Graph warning enum to be clearer
This commit makes the bit mask much more obvious that it should be one-hot encoded.
1 parent f112df8 commit d4485f3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

vpr/src/route/rr_graph_generation/rr_graph.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
#include "rr_graph_type.h"
1212
#include "clb2clb_directs.h"
1313

14-
/* Warnings about the routing graph that can be returned.
15-
* This is to avoid output messages during a value sweep */
14+
/** @brief Warnings about the routing graph that can be returned.
15+
* This is to avoid output messages during a value sweep.
16+
* @note This enum is used as a bitmask and should be one-hot encoded.
17+
*/
1618
enum {
1719
RR_GRAPH_NO_WARN = 0x00,
18-
RR_GRAPH_WARN_FC_CLIPPED = 0x01,
19-
RR_GRAPH_WARN_CHAN_X_WIDTH_CHANGED = 0x02,
20-
RR_GRAPH_WARN_CHAN_Y_WIDTH_CHANGED = 0x04
20+
RR_GRAPH_WARN_FC_CLIPPED = 0x01 << 0,
21+
RR_GRAPH_WARN_CHAN_X_WIDTH_CHANGED = 0x01 << 1,
22+
RR_GRAPH_WARN_CHAN_Y_WIDTH_CHANGED = 0x01 << 2
2123
};
2224

2325
void create_rr_graph(e_graph_type graph_type,

0 commit comments

Comments
 (0)