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

Subversion Repositories amber

[/] [amber/] [trunk/] [hw/] [tests/] [ldm5.S] - Blame information for rev 86

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

Line No. Rev Author Line
1 82 csantifort
/*****************************************************************
2
//                                                              //
3
//  Amber 2 Core Instruction Test                               //
4
//                                                              //
5
//  This file is part of the Amber project                      //
6
//  http://www.opencores.org/project,amber                      //
7
//                                                              //
8
//  Description                                                 //
9
 
10
//                                                              //
11
//  Author(s):                                                  //
12
//      - Conor Santifort, csantifort.amber@gmail.com           //
13
//                                                              //
14
//////////////////////////////////////////////////////////////////
15
//                                                              //
16
// Copyright (C) 2010 Authors and OPENCORES.ORG                 //
17
//                                                              //
18
// This source file may be used and distributed without         //
19
// restriction provided that this copyright statement is not    //
20
// removed from the file and that any derivative work contains  //
21
// the original copyright notice and the associated disclaimer. //
22
//                                                              //
23
// This source file is free software; you can redistribute it   //
24
// and/or modify it under the terms of the GNU Lesser General   //
25
// Public License as published by the Free Software Foundation; //
26
// either version 2.1 of the License, or (at your option) any   //
27
// later version.                                               //
28
//                                                              //
29
// This source is distributed in the hope that it will be       //
30
// useful, but WITHOUT ANY WARRANTY; without even the implied   //
31
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
32
// PURPOSE.  See the GNU Lesser General Public License for more //
33
// details.                                                     //
34
//                                                              //
35
// You should have received a copy of the GNU Lesser General    //
36
// Public License along with this source; if not, download it   //
37
// from http://www.opencores.org/lgpl.shtml                     //
38
//                                                              //
39
*****************************************************************/
40
 
41
#include "amber_registers.h"
42
 
43
        .section .text
44
        .globl  main
45
main:
46
        mov    r14, #100
47
        ldr    r13, Data1Base
48
        ldmia  r13!,{r1-r14}^  // load into user mode registers
49
 
50
        // supervisor r14 value should be unchanged
51 86 csantifort
        //nop
52
        //nop
53 82 csantifort
        mov    r0, r14
54
        cmp    r0, #100
55
        beq    testpass
56
 
57
testfail:
58
        ldr     r11, AdrTestStatus
59
        str     r10, [r11]
60
        b       testfail
61
 
62
testpass:
63
        ldr     r11, AdrTestStatus
64
        mov     r10, #17
65
        str     r10, [r11]
66
        b       testpass
67
 
68
 
69
/* Write 17 to  this address to generate a Test Passed message */
70
AdrTestStatus:  .word  ADR_AMBER_TEST_STATUS
71
Data1Base:      .word  Data1
72
Data1:          .word  0x00
73
                .word  0x01
74
                .word  0x02
75
                .word  0x03
76
                .word  0x04
77
                .word  0x05
78
                .word  0x06
79
                .word  0x07
80
                .word  0x08
81
                .word  0x09
82
                .word  0x0a
83
                .word  0x0b
84
                .word  0x0c
85
                .word  0x0d
86
                .word  0x0e
87
                .word  0x0f
88
                .word  0x10
89
 
90
/* ========================================================================= */
91
/* ========================================================================= */
92
 
93
 

powered by: WebSVN 2.1.0

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