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

Subversion Repositories amber

[/] [amber/] [trunk/] [hw/] [tests/] [hiboot_mem.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 csantifort
/*****************************************************************
2
//                                                              //
3
//  Amber 2 Core Boot Memory Test                               //
4
//                                                              //
5
//  This file is part of the Amber project                      //
6
//  http://www.opencores.org/project,amber                      //
7
//                                                              //
8
//  Description                                                 //
9
//  Tests wishbone read and write access to hi (non-cachable)   //
10
//  boot SRAM.                                                  //
11
//                                                              //
12
//  Author(s):                                                  //
13
//      - Conor Santifort, csantifort.amber@gmail.com           //
14
//                                                              //
15
//////////////////////////////////////////////////////////////////
16
//                                                              //
17
// Copyright (C) 2010 Authors and OPENCORES.ORG                 //
18
//                                                              //
19
// This source file may be used and distributed without         //
20
// restriction provided that this copyright statement is not    //
21
// removed from the file and that any derivative work contains  //
22
// the original copyright notice and the associated disclaimer. //
23
//                                                              //
24
// This source file is free software; you can redistribute it   //
25
// and/or modify it under the terms of the GNU Lesser General   //
26
// Public License as published by the Free Software Foundation; //
27
// either version 2.1 of the License, or (at your option) any   //
28
// later version.                                               //
29
//                                                              //
30
// This source is distributed in the hope that it will be       //
31
// useful, but WITHOUT ANY WARRANTY; without even the implied   //
32
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
33
// PURPOSE.  See the GNU Lesser General Public License for more //
34
// details.                                                     //
35
//                                                              //
36
// You should have received a copy of the GNU Lesser General    //
37
// Public License along with this source; if not, download it   //
38
// from http://www.opencores.org/lgpl.shtml                     //
39
//                                                              //
40
*****************************************************************/
41
 
42
#include "amber_registers.h"
43
 
44
        .section .text
45
        .globl  main
46
main:
47
 
48
        /* Store word and single Byte */
49
        ldr     r0,  HiBootBase
50
        mov     r1,  #0xff
51
        mov     r2,  #0xcc
52
        str     r1,  [r0], #4
53
        strb    r2,  [r0]
54
 
55
        ldr     r0,  HiBootBase
56
        ldr     r3, [r0], #4
57
        ldrb    r4, [r0]
58
 
59
        cmp     r3, #0xff
60
        movne   r10, #10
61
        bne     testfail
62
 
63
        cmp     r4, #0xcc
64
        movne   r10, #20
65
        bne     testfail
66
 
67
@ ------------------------------------------
68
@ ------------------------------------------
69
 
70
        b       testpass
71
 
72
 
73
testfail:
74
        ldr     r11, AdrTestStatus
75
        str     r10, [r11]
76
        b       testfail
77
 
78
testpass:
79
        ldr     r11, AdrTestStatus
80
        mov     r10, #17
81
        str     r10, [r11]
82
        b       testpass
83
 
84
 
85
 
86
/* Write 17 to this address to generate a Test Passed message */
87
AdrTestStatus:  .word  ADR_AMBER_TEST_STATUS
88
 
89
/* NB do not overwrite the execution code space !! */
90
HiBootBase:     .word  0x28000200
91
 
92
/* ========================================================================= */
93
/* ========================================================================= */
94
 
95
 

powered by: WebSVN 2.1.0

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