Skip to content

Commit

Permalink
feat(examples/vhdl/external_buffer): add check to exit_handler (C)
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jun 6, 2019
1 parent 8855a9d commit 5a27188
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions examples/vhdl/external_buffer/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,21 @@ uint8_t read_char(uint8_t id, uint32_t i) {
}

static void exit_handler(void) {
int i;
for(i=0; i<3*length; i++) {
printf("%d: %d\n", i, D[0][i]);
int i, j, z, k;
uint8_t e, d;
k = 0;
for (j=0; j<3; j++) {
k += j;
for(i=0; i<length; i++) {
e = (i+1)*11 + k;
z = (length*j)+i;
d = D[0][z];
if (e != d) {
printf("check error %d: %d %d\n", z, e, d);
exit(1);
}
printf("%d: %d\n", z, d);
}
}
free(D[0]);
}
Expand Down

0 comments on commit 5a27188

Please sign in to comment.