URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [tags/] [nog_patch_64/] [or1ksim/] [testbench/] [README] - Rev 97
Go to most recent revision | Compare with Previous | Blame | View Log
This directory includes some test case programs that should be used to verify correct operation
of the or1ksim, OR32 GCC and OR32 GNU Binutils.
All programs should be built inside their directories (ie. dhrystone should be built
inside testbench/dhrystone). You need to have all GNU OR32 tools installed and in path.
All makefiles assume or32-rtems target.
!!! For all test cases, or1ksim should be built with ONLY_VIRTUAL_MACHINE undefined in
cpu/or1k/except.h !!!
Dhrystone 2.1: a benchmark modified to use simulator's timing facility. It should finish with exit(0).
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
running simulation:
# ./sim testbench/dhrystone/dhry.or32
(sim) run 1000000 hush
<cut> <cut> <cut>
MTSPR(0x1234, 20070);
MTSPR(0x1234, 20013);
MTSPR(0x1234, 7);
MTSPR(0x1234, 30010);
MTSPR(0x1234, 30010);
MTSPR(0x1234, 8);
MTSPR(0x1234, 20020);
MTSPR(0x1234, 9);
syscall exit(0)
(sim)
stdout.txt should read like this:
Execution starts, 20 runs through Dhrystone
Begin Time = 549
End Time = 22701
OR1K at 200 MHz
Microseconds for one run through Dhrystone: 110 us / 20 runs
Dhrystones per Second: 181
test1: a test for "all" instructions and their combinations. If everything is ok, RESULT == 0xdeadead.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Simulation:
# ./sim testbench/test1/test1.or32
(sim) run 100000000 hush
MTSPR(0x1234, ffffffda);
MTSPR(0x1234, ffffffc5);
MTSPR(0x1234, 6805);
MTSPR(0x1234, ffff97f9);
MTSPR(0x1234, ffff97f9);
MTSPR(0x1234, 7a77952e);
MTSPR(0x1234, 81e5e000);
MTSPR(0x1234, 74);
MTSPR(0x1234, 74);
MTSPR(0x1234, 74);
MTSPR(0x1234, 1);
MTSPR(0x1234, d7c);
MTSPR(0x1234, 74);
MTSPR(0x1234, 74);
MTSPR(0x1234, 74);
MTSPR(0x1234, ffffffff);
MTSPR(0x1234, d7a);
MTSPR(0x1234, d7a);
MTSPR(0x1234, deaddead);
syscall exit(0)
(sim)
Standard output:
RESULT: deaddead
compress: UNIX compressed modified not to use libc calls. Should finish with exit(0).
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Simulation:
./sim testbench/compress/mycompress.or32
(sim) run 100000000 hush
Interrupt reported.
Interrupt reported.
syscall exit(0)
(sim)
Standard output:
main: bytes_out 3... hsize 5003
main: hshift 4...
main: bytes_out 3...
main: hsize_reg 5003...
main: before compress 1...
main: compressing 1...
main: compressing 2...
main: compressing 3...
<cut> <cut> <cut>
main: compressing 997...
main: compressing 998...
main: compressing 999...
main: output...
main: end...
Go to most recent revision | Compare with Previous | Blame | View Log