From e0330d9534d8cfeffff81f426df1d3277702b835 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 11 Nov 2010 11:21:40 +0100 Subject: Implement basic instruction handling --- nios2.h | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'nios2.h') diff --git a/nios2.h b/nios2.h index a299bc3..15edbe8 100644 --- a/nios2.h +++ b/nios2.h @@ -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_ */ -- cgit v1.2.3-54-g00ecf