A document error

hello, I think I may find some error at the document of e31 coreplex like the picture I upload, in the first table, the width of exception code is 31 bits ,but in the second table,the list of the exection code is 32 bits ,can you tell me how to correct it

It is not an error. The mcause register is 32 bits wide.
The mcause “exception code” field is 31 bits wide.

The second table lists legal values which can be found in those 31 “exception code” bits. The highest listed value is the number 31 (0x1f), which would take only 5 of the 31 bits.

ok, I have understanded, thank you very mach, but I want to know whether there is any local interrupt for the hifive board ?

The version of the E31 on the FE310 (which is on the HiFive1) does not support Local Interrupts other than the Machine Software, Machine Timer, and Machine External (PLIC) interrupts.

eee,I am a little doubt that how can I use the software interrupt

You can trigger a software interrupt by writing to the CLINT’s (Coreplex Local Interruptor) msip register at address 0x02000000.