Skip to content

Commit 552e31b

Browse files
committed
test/orfs/ram_8x7: simulation snag found
I have been chasing down a problem where simulating the source code works, synthesis works, but floorplan fails. While the snag I fixed here is interesting, it is not the problem I was looking for. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 2163ecf commit 552e31b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/orfs/ram_8x7/ram_8x7_sim.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@ TEST(Ram_8x7Test, SimpleTest)
7373
harness.top.R0_en = 0;
7474

7575
if (i > 0) {
76-
// Check read data from previous write
77-
EXPECT_EQ(harness.top.R0_data, (i - 1) + 100);
76+
// Check read data from previous write, note that we need to mask the
77+
// upper bit as we're 7-bit wide
78+
EXPECT_EQ(harness.top.R0_data % 128, ((i - 1) + 100) % 128);
79+
// FIXME should always fail, but passes in Verilator source code, but fails in
80+
// after synthesis.
81+
// EXPECT_EQ(harness.top.R0_data, ((i - 1) + 100));
7882
}
7983
}
8084
}

0 commit comments

Comments
 (0)