-
Notifications
You must be signed in to change notification settings - Fork 1
/
apex_macros.h
46 lines (38 loc) · 976 Bytes
/
apex_macros.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _MACROS_H_
#define _MACROS_H_
#define FALSE 0x0
#define TRUE 0x1
/* Integers */
#define DATA_MEMORY_SIZE 4096
/* Size of integer register file */
#define REG_FILE_SIZE 48
#define RENAME_TABLE_SIZE 16
#define ROB_SIZE 64
#define IQ_SIZE 24
/* Numeric OPCODE identifiers for instructions */
#define OPCODE_ADD 0x0
#define OPCODE_SUB 0x1
#define OPCODE_MUL 0x2
#define OPCODE_DIV 0x3
#define OPCODE_AND 0x4
#define OPCODE_OR 0x5
#define OPCODE_EXOR 0x6
#define OPCODE_MOVC 0x7
#define OPCODE_LOAD 0x8
#define OPCODE_STORE 0x9
#define OPCODE_BZ 0xa
#define OPCODE_BNZ 0xb
#define OPCODE_HALT 0xc
#define OPCODE_ADDL 0xd
#define OPCODE_SUBL 0xe
#define OPCODE_LDR 0xf
#define OPCODE_STR 0x10
#define OPCODE_CMP 0x11
#define OPCODE_NOP 0x12
#define OPCODE_JUMP 0x13
#define OPCODE_JAL 0x14
/* Set this flag to 1 to enable debug messages */
#define ENABLE_DEBUG_MESSAGES 1
/* Set this flag to 1 to enable cycle single-step mode */
#define ENABLE_SINGLE_STEP 1
#endif