Skip to content

Commit a543f21

Browse files
Merge pull request #3270 from verilog-to-routing/unknown_const_assert
Add test for undefined values equality checking
2 parents 4cf678a + 586af06 commit a543f21

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vpr/test/test_undefined_value.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "vpr_types.h"
2+
#include "arch_types.h"
3+
#include "librrgraph_types.h"
4+
5+
// Make sure the 'unknown value' constants in VPR, LibArchFPGA and LibRRGraph are all equal to the same value (-1)
6+
// Ideally these values should be independent of each other, but since they might be compared with each other in
7+
// the project we enforce that they all have the same value.
8+
static_assert(UNDEFINED == -1 && ARCH_FPGA_UNDEFINED_VAL == -1 && LIBRRGRAPH_UNDEFINED_VAL == -1, "The 'undefined value' constants in VPR, LibArchFPGA and LibRRGraph all must equal -1.");

0 commit comments

Comments
 (0)