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

Subversion Repositories or1200_soc

[/] [or1200_soc/] [trunk/] [boards/] [de1_board/] [sw/] [tests/] [debug/] [main.c] - Blame information for rev 21

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

Line No. Rev Author Line
1 21 qaztronic
//
2
//
3
//
4
 
5
 
6
extern void init_serial( void );
7
extern int puts(const char *s);
8
 
9
 
10
int main (void)
11
{
12
   unsigned int temp_buf;
13
 
14
   // test flash
15
  temp_buf = *((volatile unsigned int *)(0x20000100));
16
  temp_buf = *((volatile unsigned int *)(0x20000104));
17
  temp_buf = *((volatile unsigned int *)(0x20000108));
18
 
19
  temp_buf = *((volatile unsigned int *)(0x20000040));
20
  temp_buf = *((volatile unsigned int *)(0x20000044));
21
  temp_buf = *((volatile unsigned int *)(0x20000048));
22
 
23
   // test on chip ram
24
        *((volatile unsigned int *)(0x30000000)) = 0xab1122ef;
25
  temp_buf = *((volatile unsigned int *)(0x30000000));
26
 
27
        *((volatile unsigned char *)(0x30000001)) = 0xba;
28
        *((volatile unsigned char *)(0x30000002)) = 0xbe;
29
 
30
  temp_buf = *((volatile unsigned int *)(0x30000000));
31
 
32
  // test gpio 
33
  temp_buf = *((volatile unsigned int *)(0x60000000));
34
        *((volatile unsigned int *)(0x60000008)) = 0x000000ff;
35
        *((volatile unsigned int *)(0x60000014)) = 0x000000ff;
36
  temp_buf = *((volatile unsigned int *)(0x60000000));
37
 
38
  temp_buf = *((volatile unsigned int *)(0x61000000));
39
        *((volatile unsigned int *)(0x61000014)) = 0xffffffff;
40
        *((volatile unsigned int *)(0x61000008)) = 0xffffffff;
41
  temp_buf = *((volatile unsigned int *)(0x61000000));
42
 
43
  temp_buf = *((volatile unsigned int *)(0x66000000));
44
 
45
  temp_buf = *((volatile unsigned int *)(0x60000028));
46
  temp_buf = *((volatile unsigned int *)(0x6000002c));
47
  temp_buf = *((volatile unsigned int *)(0x60000040));
48
  temp_buf = *((volatile unsigned int *)(0x60400000));
49
  temp_buf = *((volatile unsigned int *)(0x6f000000));
50
 
51
        *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
52
 
53
        // test serial port
54
  init_serial();
55
 
56
  NS16550_putc( 'q' );
57
  NS16550_putc( 'a' );
58
  NS16550_putc( 'z' );
59
  NS16550_putc( '\n' );
60
  NS16550_putc( '\r' );
61
 
62
  puts( "arrg! arrg!!\n\r" );
63
 
64
 
65
        *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
66
 
67
  while(1) {};
68
 
69
  return 0;
70
}
71
 

powered by: WebSVN 2.1.0

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