Generate CAUSE numbers from riscv-opcodes; add CSR test