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

Subversion Repositories t400

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 35 arniml
        ;;
4
        ;; Checks the SKT instruction.
5
        ;;
6
 
7
        ;; the cpu type is defined on asl's command line
8
 
9
        org     0x00
10
        clra
11
 
12
        ;; timer not elapsed right after power-on reset
13
        skt
14
        jp      ok_1
15
        jmp     fail
16
ok_1:
17
 
18
 
19
        ;; preload timeout value
20
        stii    0x4
21
        stii    0x0
22
        stii    0x0
23
 
24
        ;; *******************************************************************
25
        ;; Poll for timer flag with and time out after a while.
26
        ;;
27
poll_loop:
28
        ;; decrement timeout counter
29
        lbi     0, 2
30
        sc
31
        clra
32
        aisc    0x1
33
        casc                    ; M(0, 2) - 1
34
        jp      proc_digit_1
35
        x       0
36
        jp      dec_finished
37
 
38
proc_digit_1:
39
        xds     0                ; A loads 0 from M
40
        sc
41
        aisc    0x1
42
        casc                    ; M(0, 1) - 1
43
        jp      proc_digit_0
44
        x       0
45
        jp      dec_finished
46
 
47
proc_digit_0:
48
        xds     0                ; A loads 0 from M
49
        sc
50
        aisc    0x1
51
        casc                    ; M(0, 0) - 1
52
        jmp     fail            ; TIMEOUT!
53
        x       0
54
dec_finished:
55
 
56
        ;; poll timer flag
57
        skt
58
        jp      poll_loop
59
 
60
        ;; check that last skt cleared the flag
61
        skt
62
        jp      ok_2
63
        jmp     fail
64
ok_2:
65
 
66
 
67
        jmp     pass
68
 
69
        include "pass_fail.asm"

powered by: WebSVN 2.1.0

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