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

Subversion Repositories t400

[/] [t400/] [trunk/] [sw/] [verif/] [int/] [aisc/] [test.asm] - Blame information for rev 179

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 85 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 85 arniml
        ;;
4
        ;; Checks interrupt on AISC.
5
        ;; AISC is interrupted twice:
6
        ;;   1) no carry, thus no skip
7
        ;;   2) carry, skip after interrupt completion
8
        ;;
9
 
10
        ;; the cpu type is defined on asl's command line
11
 
12
        include "int_macros.inc"
13
 
14
        org     0x00
15
        clra
16
 
17
        int_flag_clear
18
        ;; write return instruction identifier to current M
19
        ;; ret_instr_030 = 0x01
20
        clra
21
        aisc    0x1
22
        x       0
23
 
24
        lei     0x02
25
        jp      int_mark_030
26
 
27
        org     0x030
28
int_mark_030:
29
        nop
30
        nop
31
int_instr_030:
32
        aisc    0xf
33
ret_instr_030:
34
        jp      +               ; must not be skipped!
35
        jmp     fail
36
+
37
        ;; check result of AISC
38
        xad     3, 0
39
        clra
40
        aisc    0xf
41
        x       0
42
        xad     3, 0
43
        ske
44
        jmp     fail
45
        ;; check whether interrupt really occured
46
        int_flag_check
47
 
48
        ;;
49
        ;; prepare next interrupt
50
        ;;
51
        int_flag_clear
52
        ;; write return instruction identifier to current M
53
        ;; ret_instr_0b0 = 0x2
54
        clra
55
        aisc    0x2
56
        x       0
57
 
58
        lei     0x02
59
        jmp     int_mark_0b0
60
 
61
        org     0x0ae
62
        jmp     fail
63
        org     0x0b0
64
int_mark_0b0:
65
        nop
66
        nop
67
int_instr_0b0:
68
        aisc    0x1
69
ret_instr_0b0:
70
        jmp     fail            ; must be skipped!
71
        ;; check result of AISC
72
        xad     3, 0
73
        clra
74
        x       0
75
        xad     3, 0
76
        ske
77
        jmp     fail
78
        ;; check whether interrupt really occured
79
        int_flag_check
80
        jmp     pass
81
 
82
 
83
        ;; *******************************************************************
84
        ;; Interrupt routine
85
        ;;
86
        org     0x0fd
87
        jmp     fail
88
int_routine:
89
        nop
90
        save_a_m_c
91
 
92
        int_flag_set
93
 
94
        ;; access current M of main program
95
        ldd     3, 14
96
        x       0
97
        skmbz   0x0
98 94 arniml
        jp      check_sa_030
99 85 arniml
        skmbz   0x1
100 94 arniml
        jp      check_sa_0b0
101 85 arniml
        jmp     fail
102
 
103
check_sa_030:
104
        check_sa        ret_instr_030
105
        jmp     int_finished
106
check_sa_0b0:
107
        check_sa        ret_instr_0b0
108
 
109
int_finished:
110
        restore_c_m_a
111
        ret
112
        ;;
113
        ;; *******************************************************************
114
 
115
 
116
        org     0x200
117
        include "int_pass_fail.asm"

powered by: WebSVN 2.1.0

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