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

Subversion Repositories eco32

[/] [eco32/] [tags/] [eco32-0.22/] [sim/] [common.h] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 hellwig
/*
2
 * common.h -- common definitions
3
 */
4
 
5
 
6
#ifndef _COMMON_H_
7
#define _COMMON_H_
8
 
9
 
10
#define K               1024            /* Kilo */
11
#define M               (K * K)         /* Mega */
12
 
13
#define RAM_BASE        0x00000000      /* physical RAM base address */
14
#define RAM_SIZE_MAX    (512 * M)       /* maximum RAM size */
15
#define RAM_SIZE_DFL    (4 * M)         /* default RAM size */
16
#define ROM_BASE        0x20000000      /* physical ROM base address */
17
#define ROM_SIZE_MAX    (256 * M)       /* maximum ROM size */
18
#define ROM_SIZE        (256 * K)       /* actual ROM size */
19
#define IO_BASE         0x30000000      /* physical I/O base address */
20
#define IO_SIZE_MAX     (256 * M)       /* maximum I/O size */
21
 
22
#define IO_DEV_MASK     0x3FF00000      /* I/O device mask */
23
#define IO_REG_MASK     0x000FFFFF      /* I/O register mask */
24
#define IO_GRAPH_MASK   0x003FFFFF      /* I/O graphics mask */
25
 
26
#define TIMER_BASE      0x30000000      /* physical timer base address */
27
#define DISPLAY_BASE    0x30100000      /* physical display base address */
28
#define KEYBOARD_BASE   0x30200000      /* physical keyboard base address */
29
#define TERM_BASE       0x30300000      /* physical terminal base address */
30
#define MAX_NTERMS      2               /* max number of terminals */
31
#define DISK_BASE       0x30400000      /* physical disk base address */
32
#define OUTPUT_BASE     0x3F000000      /* physical output device address */
33
#define GRAPH_BASE      0x3FC00000      /* physical grahics base address */
34
                                        /* extends to end of address space */
35
 
36
#define PAGE_SIZE       (4 * K)         /* size of a page and a page frame */
37
#define OFFSET_MASK     (PAGE_SIZE - 1) /* mask for offset within a page */
38
#define PAGE_MASK       (~OFFSET_MASK)  /* mask for page number */
39
 
40
#define INSTRS_PER_MSEC 1700            /* average execution speed */
41
 
42
 
43
typedef enum { false, true } Bool;      /* truth values */
44
 
45
 
46
typedef unsigned char Byte;             /* 8 bit quantities */
47
typedef unsigned short Half;            /* 16 bit quantities */
48
typedef unsigned int Word;              /* 32 bit quantities */
49
 
50
 
51
#endif /* _COMMON_H_ */

powered by: WebSVN 2.1.0

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