pub fn soft_core_divider(opcode: u8, a: i32, b: i32) -> i32Expand description
The Rust model of the soft-core’s shared_divider unit (truncated signed division): Div /
ExactDiv → quotient, Mod → remainder (dividend’s sign), FloorDiv → floor-adjusted quotient;
b==0 → 0. run_soft_core issues opcodes 12/13/14/15 here instead of the combinational ALU,
mirroring the RTL (the divider is proven == this by iverilog tb_shared_divider).