+#define CSR_MCONTROL_LOAD 1
+#define CSR_MCONTROL6 0x7a1
+#define CSR_MCONTROL6_TYPE_OFFSET(XLEN) (XLEN + -4)
+#define CSR_MCONTROL6_TYPE_LENGTH 4
+#define CSR_MCONTROL6_TYPE(XLEN) (0xf * (1ULL<<(XLEN + -4)))
+#define CSR_MCONTROL6_DMODE_OFFSET(XLEN) (XLEN + -5)
+#define CSR_MCONTROL6_DMODE_LENGTH 1
+#define CSR_MCONTROL6_DMODE(XLEN) (1ULL<<(XLEN + -5))
+/*
+ * When set, enable this trigger in VS-mode.
+ * This bit is hard-wired to 0 if the hart does not support
+ * virtualization mode.
+ */
+#define CSR_MCONTROL6_VS_OFFSET 0x18
+#define CSR_MCONTROL6_VS_LENGTH 1
+#define CSR_MCONTROL6_VS 0x1000000
+/*
+ * When set, enable this trigger in VU-mode.
+ * This bit is hard-wired to 0 if the hart does not support
+ * virtualization mode.
+ */
+#define CSR_MCONTROL6_VU_OFFSET 0x17
+#define CSR_MCONTROL6_VU_LENGTH 1
+#define CSR_MCONTROL6_VU 0x800000
+/*
+ * If this bit is implemented then it must become set when this
+ * trigger fires and may become set when this trigger matches.
+ * The trigger's user can set or clear it at any
+ * time. It is used to determine which
+ * trigger(s) matched. If the bit is not implemented, it is always 0
+ * and writing it has no effect.
+ */
+#define CSR_MCONTROL6_HIT_OFFSET 0x16
+#define CSR_MCONTROL6_HIT_LENGTH 1
+#define CSR_MCONTROL6_HIT 0x400000
+/*
+ * This bit determines the contents of the XLEN-bit compare values.
+ */
+#define CSR_MCONTROL6_SELECT_OFFSET 0x15
+#define CSR_MCONTROL6_SELECT_LENGTH 1
+#define CSR_MCONTROL6_SELECT 0x200000
+/*
+ * address: There is at least one compare value and it contains the lowest
+ * virtual address of the access.
+ * In addition, it is recommended that there are additional compare
+ * values for the other accessed virtual addresses match.
+ * (E.g. on a 32-bit read from 0x4000, the lowest address is 0x4000
+ * and the other addresses are 0x4001, 0x4002, and 0x4003.)
+ */
+#define CSR_MCONTROL6_SELECT_ADDRESS 0
+/*
+ * data: There is exactly one compare value and it contains the data
+ * value loaded or stored, or the instruction executed.
+ * Any bits beyond the size of the data access will contain 0.
+ */
+#define CSR_MCONTROL6_SELECT_DATA 1
+#define CSR_MCONTROL6_TIMING_OFFSET 0x14
+#define CSR_MCONTROL6_TIMING_LENGTH 1
+#define CSR_MCONTROL6_TIMING 0x100000
+/*
+ * before: The action for this trigger will be taken just before the
+ * instruction that triggered it is committed, but after all preceding
+ * instructions are committed. \Rxepc or \RcsrDpc (depending
+ * on \FcsrMcontrolSixAction) must be set to the virtual address of the
+ * instruction that matched.
+ *
+ * If this is combined with \FcsrMcontrolSixLoad and
+ * \FcsrMcontrolSixSelect=1 then a memory access will be
+ * performed (including any side effects of performing such an access) even
+ * though the load will not update its destination register. Debuggers
+ * should consider this when setting such breakpoints on, for example,
+ * memory-mapped I/O addresses.
+ */
+#define CSR_MCONTROL6_TIMING_BEFORE 0
+/*
+ * after: The action for this trigger will be taken after the instruction
+ * that triggered it is committed. It should be taken before the next
+ * instruction is committed, but it is better to implement triggers imprecisely
+ * than to not implement them at all. \Rxepc or
+ * \RcsrDpc (depending on \FcsrMcontrolSixAction) must be set to
+ * the virtual address of the next instruction that must be executed to
+ * preserve the program flow.
+ */
+#define CSR_MCONTROL6_TIMING_AFTER 1
+/*
+ * Most hardware will only implement one timing or the other, possibly
+ * dependent on \FcsrMcontrolSixSelect, \FcsrMcontrolSixExecute,
+ * \FcsrMcontrolSixLoad, and \FcsrMcontrolSixStore. This bit
+ * primarily exists for the hardware to communicate to the debugger
+ * what will happen. Hardware may implement the bit fully writable, in
+ * which case the debugger has a little more control.
+ *
+ * Data load triggers with \FcsrMcontrolSixTiming of 0 will result in the same load
+ * happening again when the debugger lets the hart run. For data load
+ * triggers, debuggers must first attempt to set the breakpoint with
+ * \FcsrMcontrolSixTiming of 1.
+ *
+ * If a trigger with \FcsrMcontrolSixTiming of 0 matches, it is
+ * implementation-dependent whether that prevents a trigger with
+ * \FcsrMcontrolSixTiming of 1 matching as well.
+ */
+#define CSR_MCONTROL6_SIZE_OFFSET 0x10
+#define CSR_MCONTROL6_SIZE_LENGTH 4
+#define CSR_MCONTROL6_SIZE 0xf0000
+/*
+ * any: The trigger will attempt to match against an access of any size.
+ * The behavior is only well-defined if $|select|=0$, or if the access
+ * size is XLEN.
+ */
+#define CSR_MCONTROL6_SIZE_ANY 0
+/*
+ * 8bit: The trigger will only match against 8-bit memory accesses.
+ */
+#define CSR_MCONTROL6_SIZE_8BIT 1
+/*
+ * 16bit: The trigger will only match against 16-bit memory accesses or
+ * execution of 16-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_16BIT 2
+/*
+ * 32bit: The trigger will only match against 32-bit memory accesses or
+ * execution of 32-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_32BIT 3
+/*
+ * 48bit: The trigger will only match against execution of 48-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_48BIT 4
+/*
+ * 64bit: The trigger will only match against 64-bit memory accesses or
+ * execution of 64-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_64BIT 5
+/*
+ * 80bit: The trigger will only match against execution of 80-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_80BIT 6
+/*
+ * 96bit: The trigger will only match against execution of 96-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_96BIT 7
+/*
+ * 112bit: The trigger will only match against execution of 112-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_112BIT 8
+/*
+ * 128bit: The trigger will only match against 128-bit memory accesses or
+ * execution of 128-bit instructions.
+ */
+#define CSR_MCONTROL6_SIZE_128BIT 9
+/*
+ * An implementation must support the value of 0, but all other values
+ * are optional. When an implementation supports address triggers
+ * (\FcsrMcontrolSixSelect=0), it is recommended that those triggers
+ * support every access size that the hart supports, as well as for
+ * every instruction size that the hart supports.
+ *
+ * Implementations such as RV32D or RV64V are able to perform loads
+ * and stores that are wider than XLEN. Custom extensions may also
+ * support instructions that are wider than XLEN. Because
+ * \RcsrTdataTwo is of size XLEN, there is a known limitation that
+ * data value triggers (\FcsrMcontrolSixSelect=1) can only be supported
+ * for access sizes up to XLEN bits. When an implementation supports
+ * data value triggers (\FcsrMcontrolSixSelect=1), it is recommended
+ * that those triggers support every access size up to XLEN that the
+ * hart supports, as well as for every instruction length up to XLEN
+ * that the hart supports.
+ */
+/*
+ * The action to take when the trigger fires. The values are explained
+ * in Table~\ref{tab:action}.
+ */
+#define CSR_MCONTROL6_ACTION_OFFSET 0xc
+#define CSR_MCONTROL6_ACTION_LENGTH 4
+#define CSR_MCONTROL6_ACTION 0xf000
+/*
+ * breakpoint:
+ */
+#define CSR_MCONTROL6_ACTION_BREAKPOINT 0
+/*
+ * debug mode:
+ */
+#define CSR_MCONTROL6_ACTION_DEBUG_MODE 1
+/*
+ * trace on:
+ */
+#define CSR_MCONTROL6_ACTION_TRACE_ON 2
+/*
+ * trace off:
+ */
+#define CSR_MCONTROL6_ACTION_TRACE_OFF 3
+/*
+ * trace notify:
+ */
+#define CSR_MCONTROL6_ACTION_TRACE_NOTIFY 4
+/*
+ * external0:
+ */
+#define CSR_MCONTROL6_ACTION_EXTERNAL0 8
+/*
+ * external1:
+ */
+#define CSR_MCONTROL6_ACTION_EXTERNAL1 9
+#define CSR_MCONTROL6_CHAIN_OFFSET 0xb
+#define CSR_MCONTROL6_CHAIN_LENGTH 1
+#define CSR_MCONTROL6_CHAIN 0x800
+/*
+ * disabled: When this trigger matches, the configured action is taken.
+ */
+#define CSR_MCONTROL6_CHAIN_DISABLED 0
+/*
+ * enabled: While this trigger does not match, it prevents the trigger with
+ * the next index from matching.
+ */
+#define CSR_MCONTROL6_CHAIN_ENABLED 1
+/*
+ * A trigger chain starts on the first trigger with $|chain|=1$ after
+ * a trigger with $|chain|=0$, or simply on the first trigger if that
+ * has $|chain|=1$. It ends on the first trigger after that which has
+ * $|chain|=0$. This final trigger is part of the chain. The action
+ * on all but the final trigger is ignored. The action on that final
+ * trigger will be taken if and only if all the triggers in the chain
+ * match at the same time.
+ *
+ * Debuggers should not terminate a chain with a trigger with a
+ * different type. It is undefined when exactly such a chain fires.
+ *
+ * Because \FcsrMcontrolSixChain affects the next trigger, hardware must zero it in
+ * writes to \RcsrMcontrolSix that set \FcsrTdataOneDmode to 0 if the next trigger has
+ * \FcsrTdataOneDmode of 1.
+ * In addition hardware should ignore writes to \RcsrMcontrolSix that set
+ * \FcsrTdataOneDmode to 1 if the previous trigger has both \FcsrTdataOneDmode of 0 and
+ * \FcsrMcontrolSixChain of 1. Debuggers must avoid the latter case by checking
+ * \FcsrMcontrolSixChain on the previous trigger if they're writing \RcsrMcontrolSix.
+ *
+ * Implementations that wish to limit the maximum length of a trigger
+ * chain (eg. to meet timing requirements) may do so by zeroing
+ * \FcsrMcontrolSixChain in writes to \RcsrMcontrolSix that would make the chain too long.
+ */
+#define CSR_MCONTROL6_MATCH_OFFSET 7
+#define CSR_MCONTROL6_MATCH_LENGTH 4
+#define CSR_MCONTROL6_MATCH 0x780
+/*
+ * equal: Matches when any compare value equals \RcsrTdataTwo.
+ */
+#define CSR_MCONTROL6_MATCH_EQUAL 0
+/*
+ * napot: Matches when the top $M$ bits of any compare value match the top
+ * $M$ bits of \RcsrTdataTwo.
+ * $M$ is $|XLEN|-1$ minus the index of the least-significant bit
+ * containing 0 in \RcsrTdataTwo.
+ * \RcsrTdataTwo is WARL and if bits $|maskmax6|-1$:0 are written with all
+ * ones then bit $|maskmax6|-1$ will be set to 0 while the values of bits $|maskmax6|-2$:0
+ * are \unspecified.
+ * Legal values for \RcsrTdataTwo require $M + |maskmax6| \geq |XLEN|$ and $M\gt0$.
+ * See above for how to determine maskmax6.
+ */
+#define CSR_MCONTROL6_MATCH_NAPOT 1
+/*
+ * ge: Matches when any compare value is greater than (unsigned) or
+ * equal to \RcsrTdataTwo.
+ */
+#define CSR_MCONTROL6_MATCH_GE 2
+/*
+ * lt: Matches when any compare value is less than (unsigned)
+ * \RcsrTdataTwo.
+ */
+#define CSR_MCONTROL6_MATCH_LT 3
+/*
+ * mask low: Matches when $\frac{|XLEN|}{2}-1$:$0$ of any compare value
+ * equals $\frac{|XLEN|}{2}-1$:$0$ of \RcsrTdataTwo after
+ * $\frac{|XLEN|}{2}-1$:$0$ of the compare value is ANDed with
+ * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of \RcsrTdataTwo.
+ */
+#define CSR_MCONTROL6_MATCH_MASK_LOW 4
+/*
+ * mask high: Matches when $|XLEN|-1$:$\frac{|XLEN|}{2}$ of any compare
+ * value equals $\frac{|XLEN|}{2}-1$:$0$ of \RcsrTdataTwo after
+ * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of the compare value is ANDed with
+ * $|XLEN|-1$:$\frac{|XLEN|}{2}$ of \RcsrTdataTwo.
+ */
+#define CSR_MCONTROL6_MATCH_MASK_HIGH 5
+/*
+ * not equal: Matches when \FcsrMcontrolSixMatch$=0$ would not match.
+ */
+#define CSR_MCONTROL6_MATCH_NOT_EQUAL 8
+/*
+ * not napot: Matches when \FcsrMcontrolSixMatch$=1$ would not match.
+ */
+#define CSR_MCONTROL6_MATCH_NOT_NAPOT 9
+/*
+ * not mask low: Matches when \FcsrMcontrolSixMatch$=4$ would not match.
+ */
+#define CSR_MCONTROL6_MATCH_NOT_MASK_LOW 12
+/*
+ * not mask high: Matches when \FcsrMcontrolSixMatch$=5$ would not match.
+ */
+#define CSR_MCONTROL6_MATCH_NOT_MASK_HIGH 13
+/*
+ * Other values are reserved for future use.
+ *
+ * All comparisons only look at the lower XLEN (in the current mode)
+ * bits of the compare values and of \RcsrTdataTwo.
+ * When \FcsrMcontrolSelect=1 and access size is N, this is further
+ * reduced, and comparisons only look at the lower N bits of the
+ * compare values and of \RcsrTdataTwo.
+ */
+/*
+ * When set, enable this trigger in M-mode.
+ */
+#define CSR_MCONTROL6_M_OFFSET 6
+#define CSR_MCONTROL6_M_LENGTH 1
+#define CSR_MCONTROL6_M 0x40
+/*
+ * When set, enable this trigger in S/HS-mode.
+ * This bit is hard-wired to 0 if the hart does not support
+ * S-mode.
+ */
+#define CSR_MCONTROL6_S_OFFSET 4
+#define CSR_MCONTROL6_S_LENGTH 1
+#define CSR_MCONTROL6_S 0x10
+/*
+ * When set, enable this trigger in U-mode.
+ * This bit is hard-wired to 0 if the hart does not support
+ * U-mode.
+ */
+#define CSR_MCONTROL6_U_OFFSET 3
+#define CSR_MCONTROL6_U_LENGTH 1
+#define CSR_MCONTROL6_U 8
+/*
+ * When set, the trigger fires on the virtual address or opcode of an
+ * instruction that is executed.
+ */
+#define CSR_MCONTROL6_EXECUTE_OFFSET 2
+#define CSR_MCONTROL6_EXECUTE_LENGTH 1
+#define CSR_MCONTROL6_EXECUTE 4
+/*
+ * When set, the trigger fires on the virtual address or data of any
+ * store.
+ */
+#define CSR_MCONTROL6_STORE_OFFSET 1
+#define CSR_MCONTROL6_STORE_LENGTH 1
+#define CSR_MCONTROL6_STORE 2
+/*
+ * When set, the trigger fires on the virtual address or data of any
+ * load.
+ */
+#define CSR_MCONTROL6_LOAD_OFFSET 0
+#define CSR_MCONTROL6_LOAD_LENGTH 1
+#define CSR_MCONTROL6_LOAD 1