This commit is contained in:
Philip Smart
2019-10-25 09:06:55 +01:00
parent d108bbdcce
commit 99914a94a8
5 changed files with 95 additions and 6 deletions

View File

@@ -222,7 +222,7 @@ Some extended instructions are under development (ie. LDIR) an exact opcode valu
##### Implemented Instructions Comparison Table
![alt text](https://github.com/pdsmart/ZPU/blob/master/ImplInstructions.png)
![alt text](https://github.com/pdsmart/ZPU/blob/master/docs/ImplInstructions.png)
#### Hardware Variable Byte Write
@@ -336,13 +336,13 @@ Tiny - IOCP is the smallest size possible to boot from SD Card. It is useful for
Minimum - Full - IOCP has various inbuilt functions, such as application upload from serial port, memory edit/exam.
![alt text](https://github.com/pdsmart/ZPU/blob/master/IOCPMemoryMap.png)
![alt text](https://github.com/pdsmart/ZPU/blob/master/docs/IOCPMemoryMap.png)
For ZPUTA, it can either be configured to be the boot application (ie. no IOCP) or it can be configured as an App booted by IOCP. Depending upon how ZPUTA is built. it can have applets (portions of its functionality created as dedicated executables on the SD card) or standalone with all functionality inbuilt. The former is used when there is limited memory or a set of loadable programs is desired.
![alt text](https://github.com/pdsmart/ZPU/blob/master/ZPUTAMemoryMap.png)
![alt text](https://github.com/pdsmart/ZPU/blob/master/docs/ZPUTAMemoryMap.png)

View File

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 185 KiB

View File

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 506 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -84,12 +84,40 @@ void test8bit(uint32_t start, uint32_t end)
while ( count-- )
{
if ( *memPtr != data )
xprintf( "\rError (8bit) at 0x%08lX (%02x:%02x)\n", memPtr, *memPtr, data );
xprintf( "\rError (8bit ap) at 0x%08lX (%02x:%02x)\n", memPtr, *memPtr, data );
*memPtr++;
data++;
if ( data >= 0xFF )
data = 0x00;
}
xprintf( "\rWrite 8bit walking test pattern... " );
memPtr = (unsigned char*)( start );
data = 0x55;
count = end - start;
while ( count-- )
{
*memPtr++ = data;
if ( data == 0x55 )
data = 0xAA;
else
data = 0x55;
}
xprintf( "\rRead 8bit walking test pattern... " );
memPtr = (unsigned char*)( start );
data = 0x55;
count = end - start;
while ( count-- )
{
if ( *memPtr != data )
xprintf( "\rError (8bit wp) at 0x%08lX (%02x:%02x)\n", memPtr, *memPtr, data );
*memPtr++;
if ( data == 0x55 )
data = 0xAA;
else
data = 0x55;
}
}
// Simple 16 bit memory write/read test.
@@ -119,13 +147,43 @@ void test16bit(uint32_t start, uint32_t end)
while ( count > 0 )
{
if ( *memPtr != data )
xprintf( "\rError (16bit) at 0x%08lX (%04x:%04x)\n", memPtr, *memPtr, data );
xprintf( "\rError (16bit ap) at 0x%08lX (%04x:%04x)\n", memPtr, *memPtr, data );
*memPtr++;
data++;
if ( data >= 0xFFFF )
data = 0x00;
count = count > 2 ? count -= 2 : 0;
}
xprintf( "\rWrite 16bit walking test pattern... " );
memPtr = (uint16_t*)( start );
data = 0xAA55;
count = end - start;
while ( count > 0 )
{
*memPtr++ = data;
if ( data == 0xAA55 )
data = 0x55AA;
else
data = 0xAA55;
count = count > 2 ? count -= 2 : 0;
}
xprintf( "\rRead 16bit walking test pattern... " );
memPtr = (uint16_t*)( start );
data = 0xAA55;
count = end - start;
while ( count > 0 )
{
if ( *memPtr != data )
xprintf( "\rError (16bit wp) at 0x%08lX (%04x:%04x)\n", memPtr, *memPtr, data );
*memPtr++;
if ( data == 0xAA55 )
data = 0x55AA;
else
data = 0xAA55;
count = count > 2 ? count -= 2 : 0;
}
}
// Simple 32 bit memory write/read test.
@@ -155,13 +213,44 @@ void test32bit(uint32_t start, uint32_t end)
while ( count > 0 )
{
if ( *memPtr != data )
xprintf( "\rError (32bit) at 0x%08lX (%08lx:%08lx)\n", memPtr, *memPtr, data );
xprintf( "\rError (32bit ap) at 0x%08lX (%08lx:%08lx)\n", memPtr, *memPtr, data );
*memPtr++;
data++;
if ( data >= 0xFFFFFFFE )
data = 0;
count = count > 4 ? count -= 4 : 0;
}
xprintf( "\rWrite 32bit walking test pattern... " );
memPtr = (uint32_t*)( start );
data = 0xAA55AA55;
count = end - start;
while ( count > 0 )
{
*memPtr++ = data;
if ( data == 0xAA55AA55 )
data = 0x55AA55AA;
else
data = 0xAA55AA55;
count = count > 4 ? count -= 4 : 0;
}
xprintf( "\rRead 32bit walking test pattern... " );
memPtr = (uint32_t*)( start );
data = 0x00;
data = 0xAA55AA55;
count = end - start;
while ( count > 0 )
{
if ( *memPtr != data )
xprintf( "\rError (32bit wp) at 0x%08lX (%08lx:%08lx)\n", memPtr, *memPtr, data );
*memPtr++;
if ( data == 0xAA55AA55 )
data = 0x55AA55AA;
else
data = 0xAA55AA55;
count = count > 4 ? count -= 4 : 0;
}
}
// Main entry and start point of a ZPUTA Application. Only 2 parameters are catered for and a 32bit return code, additional parameters can be added by changing the appcrt0.s