mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Detab and fix spacing style issues in tests and scripts. No functional change.
This commit is contained in:
@@ -15,13 +15,13 @@ bool check() {
|
||||
bool pass;
|
||||
int Z, Y, X;
|
||||
if (tb->OE) {
|
||||
Z = tb->A;
|
||||
Y = tb->A;
|
||||
X = tb->A;
|
||||
Z = tb->A;
|
||||
Y = tb->A;
|
||||
X = tb->A;
|
||||
} else {
|
||||
Z = 1;
|
||||
Y = 0;
|
||||
X = 1;
|
||||
Z = 1;
|
||||
Y = 0;
|
||||
X = 1;
|
||||
}
|
||||
|
||||
#ifdef TEST_VERBOSE
|
||||
@@ -31,12 +31,12 @@ bool check() {
|
||||
#endif
|
||||
|
||||
if (tb->Z == Z && tb->Y == Y && tb->X == X) {
|
||||
if (verbose) printf("PASS: ");
|
||||
pass = true;
|
||||
if (verbose) printf("PASS: ");
|
||||
pass = true;
|
||||
} else {
|
||||
printf("%%E-FAIL: ");
|
||||
verbose = true;
|
||||
pass = false;
|
||||
printf("%%E-FAIL: ");
|
||||
verbose = true;
|
||||
pass = false;
|
||||
}
|
||||
if (verbose) printf("OE=%d A=%d X=%d xexp=%d Y=%d yexp=%d Z=%d zexp=%d\n", tb->OE, tb->A, tb->X,X, tb->Y,Y, tb->Z,Z);
|
||||
return pass;
|
||||
@@ -50,19 +50,19 @@ int main() {
|
||||
|
||||
// loop through every possibility and check the result
|
||||
for (tb->OE=0; tb->OE<2; tb->OE++) {
|
||||
for (tb->A=0; tb->A<2; tb->A++) {
|
||||
tb->eval();
|
||||
if (!check()) {
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
for (tb->A=0; tb->A<2; tb->A++) {
|
||||
tb->eval();
|
||||
if (!check()) {
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pass) {
|
||||
VL_PRINTF("*-* All Finished *-*\n");
|
||||
tb->final();
|
||||
VL_PRINTF("*-* All Finished *-*\n");
|
||||
tb->final();
|
||||
} else {
|
||||
vl_fatal(__FILE__,__LINE__,"top", "Unexpected results from pullup test\n");
|
||||
vl_fatal(__FILE__,__LINE__,"top", "Unexpected results from pullup test\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user