SMMU Test and Experiment Software

** For information about the SMMU please visit
** http://www.jwhitham.org.uk/c/smmu.html


This package holds two test programs for the SMMU:
    test    - exercises all SMMU functionality
    djpeg   - a case study to demonstrate SMMU effectiveness on real code

Both run on a Microblaze embedded system, such as the ML505 reference
design available from http://www.jwhitham.org.uk/c/smmu.html .
The djpeg test will also run within a Microblaze/SMMU simulator.

You should use a Linux system to build the tests. If you don't have
a Linux system, you will need to adapt the build scripts and Makefiles
for your OS. You also need Python; Linux distributions usually include it
by default.

To build the tests, you should use a follow the following steps:

- First build a Microblaze-based embedded system with an SMMU.
  You can use the ML505 reference design (smmu_system) as a basis for this;
  find it on the web site.
- Then copy/link the "microblaze_0" directory (in the XPS project directory)
  to the directory containing this README file. This provides 
  the test programs with the Xilinx header files and drivers.
- Next, get access to the Microblaze GCC toolchain, e.g. by sourcing the
  "settings64.sh" script in the EDK install directory.
- Finally, go to each test program directory and run the "build" script.
  This produces ".elf" executables, along with ".bin" files 
  ready for sending to the embedded systems.

When the reference system boots up, it expects a program to be uploaded
via the serial line. You can use the EDK Microblaze debugger to load
".elf" files instead, or open a serial terminal set for 115200 baud,
8 bits, no parity, 1 stop bit (e.g. with minicom). If you use a serial
terminal, use "cat" to send a ".bin" file to the FPGA, e.g.:
    cat djpeg.bin >/dev/ttyS0

Errors like this:
    main.c:24:25: error: xparameters.h: No such file or directory
    main.c:26:26: error: xuartns550_l.h: No such file or directory
mean that you need to copy or link the microblaze_0 directory.

An illegal instruction error can occur during execution of the "qsort"
function in test/module0.c. This seems to be a bug in the C library
used by some versions of the Microblaze toolchain (e.g. version 3.4.1,
shipped with EDK 8.1). Use the most recent version of the Microblaze 
tools.

