Fall 2009: EE 382N-4 Unique: 17190
Advanced Embedded Systems Architecture
Lab Assignment #1: Due Oct 6, 2009
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. Recall 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 and the corresponding
read should also vary randomly.
2) The test should be run in 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 needs to test memory that is 8 times the code size, i.e., if the code size is 1024 bytes, then the program needs to test 8192 bytes. If the starting address of the program is "a", the memory to test is from "a" to "a+8192" bytes.
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:
ARM assembly language guide ; has a lot of example programs
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.).
Deliverables (in a tarball, submit through blackboard courses.utexas.edu):
Submit a well-commented version of your assembly program.
Describe your LFSR
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