OpenCores
URL https://opencores.org/ocsvn/zipcpu/zipcpu/trunk

Subversion Repositories zipcpu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /zipcpu/trunk/bench
    from Rev 168 to Rev 172
    Reverse comparison

Rev 168 → Rev 172

/asm/cputest.c
147,6 → 147,7
"\tJMP\tR0");
 
void break_two(void);
// Can we stop a break before we hit it?
asm("\t.global\tbreak_two\n"
"\t.type\tbreak_two,@function\n"
"break_two:\n"
820,7 → 821,24
// I don't think so ...
"\tJMP\tR0\n");
 
// Multiple argument test
__attribute__((noinline))
int multiarg_subroutine(int a, int b, int c, int d, int e, int f, int g) {
if (a!=0) return 1;
if (b!=1) return 2;
if (c!=2) return 4;
if (d!=3) return 8;
if (e!=4) return 16;
if (f!=5) return 32;
if (g!=6) return 64;
return 0;
}
 
int multiarg_test(void) {
return multiarg_subroutine(0,1,2,3,4,5,6);
}
 
__attribute__((noinline))
void wait(unsigned int msk) {
*PIC = 0x7fff0000|msk;
asm("MOV\tidle_task(PC),uPC\n");
949,7 → 967,8
*COUNTER = 0;
#endif
 
#define STACKTEST asm("CMP\t16108,SP\n\tHALT.NZ\n")
// #define STACKTEST asm("CMP\t16108,SP\n\tHALT.NZ\n")
#define STACKTEST
STACKTEST;
 
// *UART_CTRL = 8333; // 9600 Baud, 8-bit chars, no parity, one stop bit
974,10 → 993,8
STACKTEST;
 
save_context(context);
if (context[15] != (int)break_one+1)
if ((context[15] != (int)break_one+1)||(0==(zip_ucc()&0x80)))
test_fails(start_time, &testlist[tnum]);
if (0==(zip_ucc()&0x80))
test_fails(start_time, &testlist[tnum]);
txstr("Pass\r\n"); testlist[tnum++] = 0; // 0
 
STACKTEST;
986,7 → 1003,7
// Make sure that a decision on the clock prior won't still cause a
// break condition
testid("Break test #2"); MARKSTART;
if ((run_test(break_two, user_stack_ptr))||(zip_ucc()&0x1f10))
if ((run_test(break_two, user_stack_ptr))||(zip_ucc()&0x1d90))
test_fails(start_time, &testlist[tnum]);
txstr("Pass\r\n"); testlist[tnum++] = 0; // #1
 
1095,6 → 1112,12
test_fails(start_time, &testlist[tnum]);
txstr("Pass\r\n"); testlist[tnum++] = 0;
 
// Multiple argument test
testid("Multi-Arg test"); MARKSTART;
if ((run_test(multiarg_test, user_stack_ptr))||(zip_ucc()&0x01d90))
test_fails(start_time, &testlist[tnum]);
txstr("Pass\r\n"); testlist[tnum++] = 0;
 
txstr("\r\n");
txstr("-----------------------------------\r\n");
txstr("All tests passed. Halting CPU.\n");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.