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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 93 jeremybenn
# int-level.exp. Test of the library level 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 level triggered interrupts in a number of ways.
28
 
29
# Sequence of independent interrupts
30
run_libsim "int-level simple 1"                     \
31
    [list "Initalization succeeded."                \
32
          "Starting interrupt handler"              \
33
          "Enabling interrupts."                    \
34
          "Raising interrupt 1"                     \
35
          "PICSR = 0x00000002"                      \
36
          "Clearing interrupt 1"                    \
37
          "Test completed successfully."]           \
38
    "lib-inttest/lib-inttest-level" "int-level.cfg" \
39
    "int-logger/int-logger-level" "+1" "-1"
40
 
41
run_libsim "int-level simple 2"                     \
42
    [list "Initalization succeeded."                \
43
          "Starting interrupt handler"              \
44
          "Enabling interrupts."                    \
45
          "Raising interrupt 7"                     \
46
          "PICSR = 0x00000080"                      \
47
          "Clearing interrupt 7"                    \
48
          "Raising interrupt 17"                    \
49
          "PICSR = 0x00020000"                      \
50
          "Clearing interrupt 17"                   \
51
          "Raising interrupt 31"                    \
52
          "PICSR = 0x80000000"                      \
53
          "Clearing interrupt 31"                   \
54
          "Test completed successfully."]           \
55
    "lib-inttest/lib-inttest-level" "int-level.cfg" \
56
    "int-logger/int-logger-level" "+7" "-7" "+17" "-17" "+31" "-31"
57
 
58
# Uncleared interrupt (this only matches the first two reports or PICSR, there
59
# are many)
60
run_libsim "int-level uncleared interrupt"          \
61
    [list "Initalization succeeded."                \
62
          "Starting interrupt handler"              \
63
          "Enabling interrupts."                    \
64
          "Raising interrupt 1"                     \
65
          "PICSR = 0x00000002"                      \
66
          "PICSR = 0x00000002"                      \
67
          "Test completed successfully."]           \
68
    "lib-inttest/lib-inttest-level" "int-level.cfg" \
69
    "int-logger/int-logger-level" "+1"
70
 
71
# Clearing the wrong interrupt
72
run_libsim "int-level wrong clear"                  \
73
    [list "Initalization succeeded."                \
74
          "Starting interrupt handler"              \
75
          "Enabling interrupts."                    \
76
          "Raising interrupt 31"                    \
77
          "PICSR = 0x80000000"                      \
78
          "Clearing interrupt 1"                    \
79
          "PICSR = 0x80000000"                      \
80
          "Clearing interrupt 31"                   \
81
          "Test completed successfully."]           \
82
    "lib-inttest/lib-inttest-level" "int-level.cfg" \
83
    "int-logger/int-logger-level" "+31" "-1" "-31"
84
 
85
# Check the boundaries of acceptable interrupt numbers
86
run_libsim "int-level check boundaries"               \
87
    [list "Warning: Invalid interrupt # 32 to raise." \
88
          "Warning: Invalid interrupt # 32 to clear." \
89
          "Initalization succeeded."                  \
90
          "Starting interrupt handler"                \
91
          "Enabling interrupts."                      \
92
          "Raising interrupt 0"                       \
93
          "PICSR = 0x00000001"                        \
94
          "Clearing interrupt 0"                      \
95
          "Raising interrupt 1"                       \
96
          "PICSR = 0x00000002"                        \
97
          "Clearing interrupt 1"                      \
98
          "Raising interrupt 31"                      \
99
          "PICSR = 0x80000000"                        \
100
          "Clearing interrupt 31"                     \
101
          "Raising interrupt 31"                      \
102
          "PICSR = 0x80000000"                        \
103
          "Clearing interrupt 31"                     \
104
          "Raising interrupt 1"                       \
105
          "PICSR = 0x00000002"                        \
106
          "Clearing interrupt 1"                      \
107
          "Raising interrupt 0"                       \
108
          "PICSR = 0x00000001"                        \
109
          "Clearing interrupt 0"                      \
110
          "Test completed successfully."]             \
111
    "lib-inttest/lib-inttest-level" "int-level.cfg"   \
112
    "int-logger/int-logger-level" "+0" "-0" "+1" "-1" "+31" "-31" "+32" "-32" \
113
                                  "+31" "-31" "+1" "-1" "+0" "-0"

powered by: WebSVN 2.1.0

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