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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [common.h] - Blame information for rev 157

Go to most recent revision | 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 25 hellwig
#define SHUTDOWN_BASE   0x3F100000      /* physical shutdown device address */
34 8 hellwig
#define GRAPH_BASE      0x3FC00000      /* physical grahics base address */
35
                                        /* extends to end of address space */
36
 
37
#define PAGE_SIZE       (4 * K)         /* size of a page and a page frame */
38
#define OFFSET_MASK     (PAGE_SIZE - 1) /* mask for offset within a page */
39
#define PAGE_MASK       (~OFFSET_MASK)  /* mask for page number */
40
 
41 25 hellwig
#define CC_PER_USEC     50              /* clock cycles per microsecond */
42
#define CC_PER_INSTR    18              /* clock cycles per instruction */
43 8 hellwig
 
44
 
45
typedef enum { false, true } Bool;      /* truth values */
46
 
47
 
48
typedef unsigned char Byte;             /* 8 bit quantities */
49
typedef unsigned short Half;            /* 16 bit quantities */
50
typedef unsigned int Word;              /* 32 bit quantities */
51
 
52
 
53
#endif /* _COMMON_H_ */

powered by: WebSVN 2.1.0

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