URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 371 |
Rev 376 |
Line 50... |
Line 50... |
{
|
{
|
#ifndef __FUNCTION__
|
#ifndef __FUNCTION__
|
#define __FUNCTION__ "?"
|
#define __FUNCTION__ "?"
|
#endif
|
#endif
|
printf ("Test failed in %s:%i\n", func, line);
|
printf ("Test failed in %s:%i\n", func, line);
|
|
report(0xeeeeeeee);
|
exit (1);
|
exit (1);
|
}
|
}
|
|
|
inline void setreg (unsigned long addr, unsigned char value)
|
inline void setreg (unsigned long addr, unsigned char value)
|
{
|
{
|
Line 221... |
Line 222... |
NO_ERROR();
|
NO_ERROR();
|
|
|
/* Receives and compares the string */
|
/* Receives and compares the string */
|
s = "recv_test";
|
s = "recv_test";
|
while (*s) {
|
while (*s) {
|
|
unsigned x;
|
/* Wait for rx fifo to be */
|
/* Wait for rx fifo to be */
|
while (!(getreg (UART_LSR) & LSR_DR));
|
while (!((x = getreg (UART_LSR)) & LSR_DR));
|
NO_ERROR();
|
if ((x & (LSR_BREAK|LSR_FE|LSR_PE|LSR_OE)) && !(x & LSR_ERR)) printf ("LSR7 ERR\n");
|
|
ASSERT(!(x & LSR_ERR));
|
|
|
ASSERT (getreg (UART_RBR) == *s); /* compare character */
|
ASSERT (getreg (UART_RBR) == *s); /* compare character */
|
NO_ERROR();
|
|
s++;
|
s++;
|
}
|
}
|
printf ("OK\n");
|
printf ("OK\n");
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.