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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [hwtests/] [irqtest/] [irqtest.s] - Diff between revs 14 and 39

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 14 Rev 39
;
;
; irqtest.s -- test interrupts
; irqtest.s -- test interrupts
;
;
 
 
        .set    stacktop,0xC0001000
        .set    stacktop,0xC0001000
        .set    tmr_base,0xF0000000
        .set    tmr_base,0xF0000000
        .set    io_base,0xF0300000
        .set    io_base,0xF0300000
 
 
reset:
reset:
        j       start
        j       start
 
 
interrupt:
interrupt:
        j       tmrisr
        j       tmrisr
 
 
userMiss:
userMiss:
        j       userMiss
        j       userMiss
 
 
start:
start:
        add     $29,$0,stacktop
        add     $29,$0,stacktop
        add     $8,$0,tmr_base
        add     $8,$0,tmr_base
        add     $9,$0,1000
        add     $9,$0,50000000           ; divisor for 1 sec
        stw     $9,$8,4
        stw     $9,$8,4
        add     $9,$0,0x02
        add     $9,$0,0x02
        stw     $9,$8,0
        stw     $9,$8,0
        add     $9,$0,0x00804000
        add     $9,$0,0x00804000
        mvts    $9,0
        mvts    $9,0
        add     $7,$0,'a'-10
        add     $7,$0,'a'-10
loop:
loop:
        j       loop
        j       loop
 
 
tmrisr:
tmrisr:
        add     $7,$7,1
        add     $7,$7,1
        add     $9,$0,'z'+1
        add     $9,$0,'z'+1
        bne     $7,$9,noinit
        bne     $7,$9,noinit
        add     $7,$0,'a'
        add     $7,$0,'a'
noinit:
noinit:
        add     $4,$7,$0
        add     $4,$7,$0
        jal     out
        jal     out
        add     $8,$0,tmr_base
        add     $8,$0,tmr_base
        add     $9,$0,0x02
        add     $9,$0,0x02
        stw     $9,$8,0
        stw     $9,$8,0
        add     $4,$0,' '
        add     $4,$0,' '
        jal     out
        jal     out
        add     $4,$0,' '
        add     $4,$0,' '
        jal     out
        jal     out
        mvfs    $5,0
        mvfs    $5,0
        add     $6,$0,'S'
        add     $6,$0,'S'
        jal     show
        jal     show
        add     $4,$0,' '
        add     $4,$0,' '
        jal     out
        jal     out
        add     $4,$0,' '
        add     $4,$0,' '
        jal     out
        jal     out
        add     $5,$30,$0
        add     $5,$30,$0
        add     $6,$0,'R'
        add     $6,$0,'R'
        jal     show
        jal     show
        add     $4,$0,0x0D
        add     $4,$0,0x0D
        jal     out
        jal     out
        add     $4,$0,0x0A
        add     $4,$0,0x0A
        jal     out
        jal     out
        rfx
        rfx
 
 
show:
show:
        sub     $29,$29,4
        sub     $29,$29,4
        stw     $31,$29,0
        stw     $31,$29,0
        add     $4,$6,$0
        add     $4,$6,$0
        jal     out
        jal     out
        add     $4,$0,' '
        add     $4,$0,' '
        jal     out
        jal     out
        add     $16,$0,32
        add     $16,$0,32
digit:
digit:
        and     $17,$5,0x80000000
        and     $17,$5,0x80000000
        bne     $17,$0,one
        bne     $17,$0,one
zero:
zero:
        add     $4,$0,'0'
        add     $4,$0,'0'
        jal     out
        jal     out
        j       next
        j       next
one:
one:
        add     $4,$0,'1'
        add     $4,$0,'1'
        jal     out
        jal     out
next:
next:
        sll     $5,$5,1
        sll     $5,$5,1
        sub     $16,$16,1
        sub     $16,$16,1
        bne     $16,$0,digit
        bne     $16,$0,digit
        ldw     $31,$29,0
        ldw     $31,$29,0
        add     $29,$29,4
        add     $29,$29,4
        jr      $31
        jr      $31
 
 
out:
out:
        add     $8,$0,io_base
        add     $8,$0,io_base
out1:
out1:
        ldw     $9,$8,8
        ldw     $9,$8,8
        and     $9,$9,1
        and     $9,$9,1
        beq     $9,$0,out1
        beq     $9,$0,out1
        stw     $4,$8,12
        stw     $4,$8,12
        jr      $31
        jr      $31
 
 

powered by: WebSVN 2.1.0

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