URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 406 |
Rev 464 |
Line 22... |
Line 22... |
{
|
{
|
unsigned long addr;
|
unsigned long addr;
|
unsigned long err_addr = 0;
|
unsigned long err_addr = 0;
|
unsigned long err_no = 0;
|
unsigned long err_no = 0;
|
|
|
|
unsigned long stack_top = (unsigned long) &_src_addr;
|
|
|
|
if (start_addr < stack_top)
|
|
{
|
|
printf("\n");
|
|
printf("Warning: RAM test will overwrite stack.\n");
|
|
printf(" Moving start of test to 0x%08x to avoid stack\n",
|
|
stack_top);
|
|
start_addr = stack_top;
|
|
}
|
|
|
|
if (start_addr >= stop_addr)
|
|
{
|
|
printf("ram_test: Start of test must be after end (0x%08x !< 0x%08x)\n",
|
|
start_addr, stop_addr);
|
|
printf("ram_test: Aborting.\n");
|
|
return;
|
|
}
|
|
|
/* Test 1: Write locations with their addresses */
|
/* Test 1: Write locations with their addresses */
|
if ((testno == 1) || (testno == 0)) {
|
if ((testno == 1) || (testno == 0)) {
|
printf("\n1. Writing locations with their addresses: ");
|
printf("\n1. Writing locations with their addresses: ");
|
for (addr = start_addr; addr <= stop_addr; addr += 4)
|
for (addr = start_addr; addr <= stop_addr; addr += 4)
|
REG32(addr) = addr;
|
REG32(addr) = addr;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.