Function rv_decoder::instruction_decoder
source · pub fn instruction_decoder(instr: Vec<&str>)Expand description
Takes a RISC-V 32-bit binary instruction and returns the decoded assembly instruction
Examples:
let mut instr = Vec::new(); instr = [“1”, “1”, “1”, “1”, “1”, “1”, “1”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “1”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “1”, “0”, “0”, “0”, “1”, “0”, “0”, “1”, “1”]; assert_eq!(“Add Immediate (ADDI) instruction decoded”, rv_decoder::instruction_decoder(instr));