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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_61/] [or1ksim/] [sim-config.c] - Blame information for rev 69

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

Line No. Rev Author Line
1 7 jrydberg
/* config.c -- Simulator configuration
2
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
3
 
4
This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
 
20
/* Simulator configuration. Eventually this one will be a lot bigger. */
21
 
22
#include "sim-config.h"
23 30 lampret
#include "abstract.h"
24 7 jrydberg
 
25
struct config config;
26
 
27
void init_defconfig()
28
{
29 30 lampret
        printf("Machine initialization...\n");
30
        memset(&config, 0, sizeof(config));
31
        config.dc.tagtype = VIRTUAL;
32
        printf("Data cache tag: %s\n", config.dc.tagtype == VIRTUAL ? "virtual" : "physical");
33
        config.clkcycle_ns = 4; /* 4 for 4ns (250MHz) */
34
        printf("Clock cycle: %d ns\n", config.clkcycle_ns);
35
        config.uarts[0].rxfile = "/tmp/uart0.rx";
36
        config.uarts[0].txfile = "/tmp/uart0.tx";
37
        config.uarts[0].baseaddr = 0x80000000;
38
        config.ram.startaddr = MEMORY_START;
39
        config.ram.endaddr = MEMORY_START + MEMORY_LEN;
40
        printf("RAM: 0x%x to ", config.ram.startaddr);
41
        printf("0x%x (", config.ram.endaddr);
42
        printf("%d KB)\n\n", (config.ram.endaddr - config.ram.startaddr) / 1024);
43 69 lampret
        config.simdebug = 0;
44
        printf("simdebug off\n");
45 7 jrydberg
}

powered by: WebSVN 2.1.0

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