diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2010-11-11 11:21:40 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2010-11-11 11:21:40 +0100 |
commit | e0330d9534d8cfeffff81f426df1d3277702b835 (patch) | |
tree | ba90c33bf555a4921a1279105beb54e9a9064ce5 /nios2.h | |
parent | 556c8e0600546b4edf49d6a70adb5b831cd4e25a (diff) |
Implement basic instruction handling
Diffstat (limited to 'nios2.h')
-rw-r--r-- | nios2.h | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -27,7 +27,41 @@ struct nios2 { uint32_t pc; }; -#define PC_INC_NORMAL 0 -#define PC_INC_BY_INSTR 1 +/* Aliases for general-purpors registers */ +enum { + zero = 0, + at, + et = 24, + bt, + gp, + sp, + fp, + ea, + ba, + ra, +}; + +/* Aliases for control registers */ +enum { + status = 0, + estatus, + bstatus, + ienable, + ipending, + cpuid, + /* reserved */ + exception = 7, + pteaddr, + tlbacc, + tlbmisc, + /* reserved */ + badaddr = 12, + config, + mpubase, + mpuacc, + +}; + +extern void nios2_cpu_reset(struct nios2 *cpu); #endif /* _NIOS2_H_ */ |