Skip to content

Commit

Permalink
Updated Luts test with more details
Browse files Browse the repository at this point in the history
azonenberg committed Dec 31, 2016
1 parent d7b680a commit e57b4b2
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/greenpak4/slg46620v/Luts.cpp
Original file line number Diff line number Diff line change
@@ -98,8 +98,20 @@ bool RunTest(hdevice hdev)
nand1_expected, nand2_expected, nand3_expected, nand4_expected
};

const char* descriptions[]=
{
"instantiated INV",
"instantiated LUT2",
"instantiated LUT3",
"instantiated LUT4",
"inferred INV",
"inferred LUT2",
"inferred LUT3",
"inferred LUT4"
};

//Drive the inputs
LogVerbose("Testing %d %d %d %d\n", a, b, c, d);
LogVerbose("Testing: %d %d %d %d\n", a, b, c, d);
LogVerbose("Expected: %d %d %d %d\n", nand1_expected, nand2_expected, nand3_expected, nand4_expected);
ioConfig.driverConfigs[2] = a ? TP_VDD : TP_GND;
ioConfig.driverConfigs[3] = b ? TP_VDD : TP_GND;
@@ -124,9 +136,9 @@ bool RunTest(hdevice hdev)
{
if(expected[j] != results[j])
{
LogError("input (%d %d %d %d), output pin %d, got %d instead of %d\n",
a, b, c, d,
LogError("Mismatch at pin %d (%s), got %d instead of %d\n",
pin_nums[j],
descriptions[j],
results[j],
expected[j]);
ok = false;

0 comments on commit e57b4b2

Please sign in to comment.