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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [libsim.tests/] [int-edge.exp] - Blame information for rev 203

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

Line No. Rev Author Line
1 93 jeremybenn
# int-edge.exp. Test of the library edge triggered interrupt functions
2
 
3
# Copyright (C) 2010 Embecosm Limited
4
 
5
# Contributor Jeremy Bennett 
6
 
7
# This file is part of OpenRISC 1000 Architectural Simulator.
8
 
9
# This program is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by the Free
11
# Software Foundation; either version 3 of the License, or (at your option)
12
# any later version.
13
 
14
# This program is distributed in the hope that it will be useful, but WITHOUT
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
# more details.
18
 
19
# You should have received a copy of the GNU General Public License along
20
# with this program.  If not, see .  */
21
 
22
# -----------------------------------------------------------------------------
23
# This code is commented throughout for use with Doxygen.
24
# -----------------------------------------------------------------------------
25
 
26
 
27
# Run the library edge triggered interrupts in a number of ways.
28
 
29
# Sequence of independent interrupts
30
run_libsim "int-edge simple 1"                    \
31
    [list "Initalization succeeded."              \
32
          "Starting interrupt handler"            \
33
          "Enabling interrupts."                  \
34
          "Triggering interrupt 2"                \
35
          "PICSR 0x00000004 -> 0x00000000"        \
36
          "Triggering interrupt 3"                \
37
          "PICSR 0x00000008 -> 0x00000000"        \
38
          "Test completed successfully."]         \
39
    "lib-inttest/lib-inttest-edge" "int-edge.cfg" \
40
    "int-logger/int-logger-edge" "1" "2" "3"
41
 
42
run_libsim "int-edge simple 2"                    \
43
    [list "Initalization succeeded."              \
44
          "Starting interrupt handler"            \
45
          "Enabling interrupts."                  \
46
          "Triggering interrupt 7"                \
47
          "PICSR 0x00000080 -> 0x00000000"        \
48
          "Triggering interrupt 17"               \
49
          "PICSR 0x00020000 -> 0x00000000"        \
50
          "Triggering interrupt 31"               \
51
          "PICSR 0x80000000 -> 0x00000000"        \
52
          "Test completed successfully."]         \
53
    "lib-inttest/lib-inttest-edge" "int-edge.cfg" \
54
    "int-logger/int-logger-edge" "1" "7" "17" "31"
55
 
56
# Duplicated interrupts
57
run_libsim "int-edge duplicated 1"                \
58
    [list "Initalization succeeded."              \
59
          "Starting interrupt handler"            \
60
          "Enabling interrupts."                  \
61
          "Triggering interrupt 2"                \
62
          "PICSR 0x00000004 -> 0x00000000"        \
63
          "Triggering interrupt 4"                \
64
          "PICSR 0x00000010 -> 0x00000000"        \
65
          "Triggering interrupt 2"                \
66
          "PICSR 0x00000004 -> 0x00000000"        \
67
          "Test completed successfully."]         \
68
    "lib-inttest/lib-inttest-edge" "int-edge.cfg" \
69
    "int-logger/int-logger-edge" "1" "2" "4" "2"
70
 
71
run_libsim "int-edge duplicated 2"                \
72
    [list "Initalization succeeded."              \
73
          "Starting interrupt handler"            \
74
          "Enabling interrupts."                  \
75
          "Triggering interrupt 2"                \
76
          "PICSR 0x00000004 -> 0x00000000"        \
77
          "Triggering interrupt 2"                \
78
          "PICSR 0x00000004 -> 0x00000000"        \
79
          "Triggering interrupt 2"                \
80
          "PICSR 0x00000004 -> 0x00000000"        \
81
          "Triggering interrupt 2"                \
82
          "PICSR 0x00000004 -> 0x00000000"        \
83
          "Triggering interrupt 2"                \
84
          "PICSR 0x00000004 -> 0x00000000"        \
85
          "Triggering interrupt 2"                \
86
          "PICSR 0x00000004 -> 0x00000000"        \
87
          "Triggering interrupt 2"                \
88
          "PICSR 0x00000004 -> 0x00000000"        \
89
          "Triggering interrupt 2"                \
90
          "PICSR 0x00000004 -> 0x00000000"        \
91
          "Test completed successfully."]         \
92
    "lib-inttest/lib-inttest-edge" "int-edge.cfg" \
93
    "int-logger/int-logger-edge" "1" "2" "2" "2" "2" "2" "2" "2" "2"
94
 
95
# All from upcalls
96
run_libsim "int-edge all upcall"                  \
97
    [list "Initalization succeeded."              \
98
          "Starting interrupt handler"            \
99
          "Enabling interrupts."                  \
100
          "Triggering interrupt 7"                \
101
          "PICSR 0x00000080 -> 0x00000000"        \
102
          "Triggering interrupt 17"               \
103
          "PICSR 0x00020000 -> 0x00000000"        \
104
          "Triggering interrupt 31"               \
105
          "PICSR 0x80000000 -> 0x00000000"        \
106
          "Test completed successfully."]         \
107
    "lib-inttest/lib-inttest-edge" "int-edge.cfg" \
108
    "int-logger/int-logger-edge" "20" "7" "17" "31"
109
 
110
# Check the boundaries of acceptable interrupt numbers
111
run_libsim "int-edge check boundaries"                \
112
    [list "Initalization succeeded."                  \
113
          "Starting interrupt handler"                \
114
          "Enabling interrupts."                      \
115
          "Triggering interrupt 0"                    \
116
          "PICSR 0x00000001 -> 0x00000000"            \
117
          "Triggering interrupt 1"                    \
118
          "PICSR 0x00000002 -> 0x00000000"            \
119
          "Triggering interrupt 31"                   \
120
          "PICSR 0x80000000 -> 0x00000000"            \
121
          "Warning: Invalid interrupt # 32 - ignored" \
122
          "Triggering interrupt 31"                   \
123
          "PICSR 0x80000000 -> 0x00000000"            \
124
          "Triggering interrupt 1"                    \
125
          "PICSR 0x00000002 -> 0x00000000"            \
126
          "Triggering interrupt 0"                    \
127
          "PICSR 0x00000001 -> 0x00000000"            \
128
          "Test completed successfully."]             \
129
    "lib-inttest/lib-inttest-edge" "int-edge.cfg"     \
130
    "int-logger/int-logger-edge" "10" "0" "1" "31" "32" "31" "1" "0"

powered by: WebSVN 2.1.0

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