OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [testbench/] [README] - Blame information for rev 97

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 97 lampret
This directory includes some test case programs that should be used to verify correct operation
2
of the or1ksim, OR32 GCC and OR32 GNU Binutils.
3
 
4
All programs should be built inside their directories (ie. dhrystone should be built
5
inside testbench/dhrystone). You need to have all GNU OR32 tools installed and in path.
6
All makefiles assume or32-rtems target.
7
 
8
!!! For all test cases, or1ksim should be built with ONLY_VIRTUAL_MACHINE undefined in
9
cpu/or1k/except.h !!!
10
 
11
Dhrystone 2.1: a benchmark modified to use simulator's timing facility. It should finish with exit(0).
12
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
 
14
running simulation:
15
 
16
# ./sim testbench/dhrystone/dhry.or32
17
(sim) run 1000000 hush
18
  
19
MTSPR(0x1234, 20070);
20
MTSPR(0x1234, 20013);
21
MTSPR(0x1234, 7);
22
MTSPR(0x1234, 30010);
23
MTSPR(0x1234, 30010);
24
MTSPR(0x1234, 8);
25
MTSPR(0x1234, 20020);
26
MTSPR(0x1234, 9);
27
syscall exit(0)
28
(sim)
29
 
30
stdout.txt should read like this:
31
 
32
Execution starts, 20 runs through Dhrystone
33
Begin Time = 549
34
End Time   = 22701
35
OR1K at 200 MHz
36
Microseconds for one run through Dhrystone: 110 us / 20 runs
37
Dhrystones per Second:                      181
38
 
39
 
40
test1: a test for "all" instructions and their combinations. If everything is ok, RESULT == 0xdeadead.
41
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
 
43
Simulation:
44
# ./sim testbench/test1/test1.or32
45
(sim) run 100000000 hush
46
MTSPR(0x1234, ffffffda);
47
MTSPR(0x1234, ffffffc5);
48
MTSPR(0x1234, 6805);
49
MTSPR(0x1234, ffff97f9);
50
MTSPR(0x1234, ffff97f9);
51
MTSPR(0x1234, 7a77952e);
52
MTSPR(0x1234, 81e5e000);
53
MTSPR(0x1234, 74);
54
MTSPR(0x1234, 74);
55
MTSPR(0x1234, 74);
56
MTSPR(0x1234, 1);
57
MTSPR(0x1234, d7c);
58
MTSPR(0x1234, 74);
59
MTSPR(0x1234, 74);
60
MTSPR(0x1234, 74);
61
MTSPR(0x1234, ffffffff);
62
MTSPR(0x1234, d7a);
63
MTSPR(0x1234, d7a);
64
MTSPR(0x1234, deaddead);
65
syscall exit(0)
66
(sim)
67
 
68
Standard output:
69
RESULT: deaddead
70
 
71
compress: UNIX compressed modified not to use libc calls. Should finish with exit(0).
72
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
 
74
Simulation:
75
 
76
./sim testbench/compress/mycompress.or32
77
(sim) run 100000000 hush
78
Interrupt reported.
79
Interrupt reported.
80
syscall exit(0)
81
(sim)
82
 
83
Standard output:
84
 
85
main: bytes_out 3... hsize 5003
86
main: hshift 4...
87
main: bytes_out 3...
88
main: hsize_reg 5003...
89
main: before compress 1...
90
main: compressing 1...
91
main: compressing 2...
92
main: compressing 3...
93
  
94
main: compressing 997...
95
main: compressing 998...
96
main: compressing 999...
97
main: output...
98
main: end...
99
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.