summaryrefslogtreecommitdiff
path: root/nios2.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-11-11 11:21:40 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-11-11 11:21:40 +0100
commite0330d9534d8cfeffff81f426df1d3277702b835 (patch)
treeba90c33bf555a4921a1279105beb54e9a9064ce5 /nios2.h
parent556c8e0600546b4edf49d6a70adb5b831cd4e25a (diff)
Implement basic instruction handling
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_ */