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

Subversion Repositories darkriscv

[/] [darkriscv/] [trunk/] [src/] [io.c] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 marcelos
/*
2
 * Copyright (c) 2018, Marcelo Samsoniuk
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * * Redistributions of source code must retain the above copyright notice, this
9
 *   list of conditions and the following disclaimer.
10
 *
11
 * * Redistributions in binary form must reproduce the above copyright notice,
12
 *   this list of conditions and the following disclaimer in the documentation
13
 *   and/or other materials provided with the distribution.
14
 *
15
 * * Neither the name of the copyright holder nor the names of its
16
 *   contributors may be used to endorse or promote products derived from
17
 *   this software without specific prior written permission.
18
 *
19
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
 
31
#include <io.h>
32
 
33
#ifdef __RISCV__
34
 
35
volatile struct DARKIO io;
36
 
37
#else
38
 
39
volatile struct DARKIO io =
40
{
41
    4, 100, 0, 0,   // ctrl = { board id, fMHz, fkHz }
42
    { 0, 0, 0 },    // uart = { stat, fifo, baud }
43
    0,              // led
44
    0,              // gpio
45
    1000000         // timer
46
};
47
 
48
unsigned char kmem[8192] = "darksocv x86 payload test";
49
 
50
#endif
51
 
52
volatile int threads = 0; // number of threads
53
volatile int utimers = 0; // number of microseconds
54
 
55
// board database
56
 
57
char *board_name(int id)
58
{
59
    return id==0 ? "simulation only" :
60
           id==1 ? "avnet microboard lx9":
61
           id==2 ? "xilinx ac701 a200" :
62
           id==3 ? "qmtech sdram lx16" :
63
           id==4 ? "qmtech spartan7 s15" :
64
           id==5 ? "lattice brevia2 lxp2" :
65
           id==6 ? "piswords rs485 lx9" :
66
           id==7 ? "digilent spartan3 s200" :
67
           id==8 ? "aliexpress hpc/40gbe k420" :
68
           id==9 ? "qmtech artix7 a35" :
69
                   "unknown";
70
}

powered by: WebSVN 2.1.0

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