summaryrefslogtreecommitdiff
path: root/nios2.h
diff options
context:
space:
mode:
Diffstat (limited to 'nios2.h')
-rw-r--r--nios2.h38
1 files changed, 36 insertions, 2 deletions
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_ */