Spring 2012: EE 382N-4  

Advanced Embedded Systems Architecture

Lab Assignment #2:

Due Mar 19, 2012

 


 

TASK: Write an ARM assembly language program (ALP) implementation of a memory test and execute it on the ARM emulator.

 

 

Specification:

1) Write a memory test that does a pseudo random address and data test of the memory.

a) Randomly vary the data while randomly varying the address. Use a linear feedback shift register (LFSR) to generate the address and the data patterns. Note that an LFSR cannot generate the "zero" value. You can refer the web/books for more details on LFSR, the link given is not your only source.

b) Randomly vary the (write -> read-back/validate) timing so that the memory has the time to loose its state. In other words, the time between the write to an address and the corresponding read from the same address should also vary randomly.

 

2) The memory test should be run in RAM memory and dynamically relocate itself during testing. This means that not all of the memory locations can be tested at once. You should relocate your code. The key point to note here is that the instructions should not refer to absolute addresses. Using relative addressing makes the program suitable to run anywhere without any modification.

 

3) The program should test 8192 bytes in 1024 byte increments. As pointed out above, the memory test needs to be located and run inside to the 8192 bytes of memory being tested. Hence the need to make the test re-locatable.

 

4) The program needs to test the memory using both the byte and word (32 bits) addressing formats.

 

5) The width of the pseudo-random data pattern generated should be configurable so as to choose between 8-bit and 32-bit data patterns.

Note:

 

Environment setup:

a) Linux Machines

Machine id: soc1.ece.utexas.edu, soc2.ece.utexas.edu & soc3.ece.utexas.edu.

You will need to use Secure Shell to access these machines. Execute the following command to access soc1:

 ssh -X -Y soc1.ece.utexas.edu

The options allow remote X-Windows viewing.

                                    If you do not have an ECE account, check with an LRC proctor.

                b) ARM compiler & linker

C Shell (csh or tcsh) - execute the following commands:

%> source /usr/local/packages/coware/arm/lrc_asetup.csh

%> source /usr/local/packages/coware/arm/env_linux.csh

Bash Shell (bash) - execute the following commands:

%> source /usr/local/packages/coware/arm/lrc_asetup.bash

%> source /usr/local/packages/coware/arm/env_linux.sh

 

 

Compiling and running programs using the ARM ADS tools:

a) Compiling the assembly language program

                          %> armcc -o <executable> <assembly_file>.s

                                   

b) Running the program in the arm emulator

%> armsd

armsd: load <executable>

armsd: go

armsd: quit

 

 

Collateral:

 

1.    ARM assembly language guide and ARM Software Developers Guide

2.    ARMSD Documentation

3.    ARMCC Documentation

4.    test1.s and test2.s starter programs. The program "test1.s" moves program counter to register r1 and test2.s implements a subroutine. Typing "help" in armsd console will list the commands that you can use to debug your program (inserting breakpoints, step execution etc.).  Note that the programs always get loaded into the address 0x8000.


 

Deliverables (in a tarball, submit through blackboard courses.utexas.edu):

  1. Submit a well-commented version of your assembly program.

  2. Describe your LFSR

  3. Comment on the coverage of your LFSR. How do you know that all memory locations have been tested?


 

 

Additional references:

 

http://www.heyrick.co.uk/assembler/index.html#01

http://www.coranac.com/tonc/text/asm.htm

http://nocash.emubase.de/gbatek.htm#arminstructionset

http://www.cse.unsw.edu.au/~cs3221/labs/assembler-intro.pdf

GNU assembler