aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-03-03 17:02:09 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-03-03 17:02:09 -0800
commit080ec44b4482d38e34394d45c95862f5cba5777e (patch)
tree6b37a9bd163cce4743f570ea70c19f3914e8a1c3
parent53d732e4ddb0b3ff2be7a5c127ddf71ecdd2d721 (diff)
downloadriscv-opcodes-080ec44b4482d38e34394d45c95862f5cba5777e.zip
riscv-opcodes-080ec44b4482d38e34394d45c95862f5cba5777e.tar.gz
riscv-opcodes-080ec44b4482d38e34394d45c95862f5cba5777e.tar.bz2
Update CSR encoding
-rw-r--r--encoding.h7
-rwxr-xr-xparse-opcodes19
2 files changed, 24 insertions, 2 deletions
diff --git a/encoding.h b/encoding.h
index 3960252..35f5876 100644
--- a/encoding.h
+++ b/encoding.h
@@ -61,8 +61,11 @@
#define IRQ_S_TIMER 5
#define IRQ_H_TIMER 6
#define IRQ_M_TIMER 7
-#define IRQ_COP 8
-#define IRQ_HOST 9
+#define IRQ_S_DEV 9
+#define IRQ_H_DEV 10
+#define IRQ_M_DEV 11
+#define IRQ_COP 12
+#define IRQ_HOST 13
#define DEFAULT_RSTVEC 0x0
#define DEFAULT_NMIVEC 0x4
diff --git a/parse-opcodes b/parse-opcodes
index fb4d29d..354ff61 100755
--- a/parse-opcodes
+++ b/parse-opcodes
@@ -90,6 +90,11 @@ csrs = [
(0x180, 'sptbr'),
(0x181, 'sasid'),
+ # Standard Supervisor RO
+ (0xD00, 'scycle'),
+ (0xD01, 'stime'),
+ (0xD02, 'sinstret'),
+
# Standard Machine R/W
(0x300, 'mstatus'),
(0x302, 'medeleg'),
@@ -103,6 +108,14 @@ csrs = [
(0x343, 'mbadaddr'),
(0x344, 'mip'),
(0x345, 'mipi'),
+ (0x310, 'mucounteren'),
+ (0x311, 'mscounteren'),
+ (0x700, 'mucycle_delta'),
+ (0x701, 'mutime_delta'),
+ (0x702, 'muinstret_delta'),
+ (0x704, 'mscycle_delta'),
+ (0x705, 'mstime_delta'),
+ (0x706, 'msinstret_delta'),
# Standard Machine RO
(0xF00, 'mcycle'),
@@ -129,6 +142,12 @@ csrs32 = [
# Standard Machine R/W
(0x361, 'mtimecmph'),
+ (0x780, 'mucycle_deltah'),
+ (0x781, 'mutime_deltah'),
+ (0x782, 'muinstret_deltah'),
+ (0x784, 'mscycle_deltah'),
+ (0x785, 'mstime_deltah'),
+ (0x786, 'msinstret_deltah'),
# Standard Machine RO
(0xF80, 'mcycleh'),