nadsp: This example application tests the DSP-enhanced instructions on the ARM9 CPU. 

These instructions and their syntax are as follows:

In the Saturating_Add_and_Sub_Test routine:

Saturating add:

    QADD  Rd Rm Rs  Rd=SAT(Rm+Rs)
    
Saturating add double:        
  
    QDADD Rd Rm Rs  Rd=SAT(Rm+SAT(Rs*2))
    
Saturating sub:               

    QSUB  Rd Rm Rs  Rd=SAT(Rm-Rs)
    
Saturating sub double:        

    QDSUB Rd Rm Rs  Rd=SAT(Rm-SAT(Rs*2))
        
In CountLZTest routine:

Count Leading Zeros          

    CLZ   Rd Rs     Rd=COUNTZ(Rs)

In SignedMACTest routine:  

Signed Multiply-accumulate (MAC) instruction
    
    SMLATT  R3,  R2, R1, R0    R3= R2Hi * R1Hi + R0
    SMLATB  R3,  R2, R1, R0    R3= R2Hi * R1Lo + R0
    SMLABT  R3,  R2, R1, R0    R3= R2Lo * R1Hi + R0
    SMLABB  R3,  R2, R1, R0    R3= R2Lo * R1Lo + R0
    
Signed MAC wide instruction

    SMLAWT  R3,  R2, R1, R0    R3= (R2 * R1Hi)>>16 + R0
    SMLAWB  R3,  R2, R1, R0    R3= (R2 * R1Lo)>>16 + R0
    
Signed MAC long instruction

    SMLALTT  R3,  R2, R1, R0    R3=(R1Hi * R0Hi)& 0xFFFFFFFF + R3
                                R2=(R1Hi * R0Hi)>>32 + R2
    SMLALTB  R3,  R2, R1, R0    R3=(R1Hi * R0Lo)& 0xFFFFFFFF + R3
                                R2=(R1Hi * R0Lo)>>32 + R2
    SMLALBT  R3,  R2, R1, R0    R3=(R1Lo * R0Hi)& 0xFFFFFFFF + R3
                                R2=(R1Lo * R0Hi)>>32 + R2
    SMLALBB  R3,  R2, R1, R0    R3=(R1Lo * R0Lo)& 0xFFFFFFFF + R3
                                R2=(R1Lo * R0Lo)>>32 + R2
in SignedMultiplyTest routine 

Signed Multiply instruction
    
    SMULTT  R3,  R2, R0         R3= (R2Hi * R0Hi)
    SMULTB  R3,  R2, R0         R3= (R2Hi * R0Lo)
    SMULBT  R3,  R2, R0         R3= (R2Lo * R0Hi)
    SMULBB  R3,  R2, R0         R3= (R2Lo * R0Lo)
    
Signed Multiply wide instruction

    SMULWT   R2,  R0, R1        R2= (R0 * R1Hi)>>16
    SMULWB   R2,  R0, R1        R2= (R0 * R1Lo)>>16
    


The following files are provided in this example.

appconf.h         Sets application configuration settings.
makefile          Make file for the GNU toolset.
readme            This file.
root.c            Application starting point.  

In addition, the following files in the BSP directory are built
as part of this application.

reset.s         contains the reset code
appconf_api.c   contains code used to read settings in appconf.h

The application build file links in the following libraries.

libbsp.a               contains the BSP library
libaddp.a			   contains the ADDP Library
libtcpip.a             contains the TCP/IP stack library
libpppintf.a		   contains the PPP Interface Library
libtx.a                contains the ThreadX kernel
libfilesys.a           contains the Native File System library
libposix.a             contains the POSIX layer library
libflash.a             contains the Flash driver API library
libssh.a			   contains the SSH Library
libtelnsvr.a           contains the Telnet Server library
libdnsclnt.a           contains the DNS Client library

The application uses the following files located in the
netos\src\linkerScripts directory.

bootldr.dat     bootloader configuration file used to generate the
                file image.bin.  It controls the information placed
                in the bootloader header of the image.

image.ldr       GNU linker script used to build an image that can
                be debugged and used with the bootloader.
                
customize.ldr   Customizable GNU linker script
