URL
https://opencores.org/ocsvn/tv80/tv80/trunk
[/] [tv80/] [trunk/] [tests/] [blk_out_inst.c] - Diff between revs 84 and 111
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 84 |
Rev 111 |
Line 104... |
Line 104... |
djnz cksum_asm_loop
|
djnz cksum_asm_loop
|
ld l, c
|
ld l, c
|
_endasm;
|
_endasm;
|
}
|
}
|
|
|
char cksum_sw (char *buf, char len) {
|
char cksum_sw (char *buf, int len) {
|
char rv, i;
|
char rv; int i;
|
|
|
rv = 0;
|
rv = 0;
|
for (i=0; i<len; i++) {
|
for (i=0; i<len; i++) {
|
rv += buf[i];
|
rv += buf[i];
|
}
|
}
|
Line 117... |
Line 117... |
return rv;
|
return rv;
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
char i, cs_a, cs_b;
|
unsigned char cs_a, cs_b;
|
|
int i;
|
|
|
max_timeout_high = 0xff;
|
max_timeout_high = 0xff;
|
|
|
for (i=0; i<BUF_SIZE; i=i+1) {
|
for (i=0; i<BUF_SIZE; i++) {
|
buf[i] = i+1;
|
buf[i] = i+1;
|
|
//timeout_port = 3;
|
}
|
}
|
|
|
print ("Checking OTIR\n");
|
print ("Checking OTIR\n");
|
cs_a = cksum_asm (buf, BUF_SIZE);
|
cs_a = cksum_sw (buf, BUF_SIZE);
|
cs_b = cksum_up (buf, BUF_SIZE);
|
cs_b = cksum_up (buf, BUF_SIZE);
|
|
|
if (cs_a != cs_b)
|
if (cs_a != cs_b)
|
sim_ctl (SC_TEST_FAILED);
|
sim_ctl (SC_TEST_FAILED);
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.