code wiki / _hdl_build / nx_decode_kind.nx
nx_decode_kind.nx
buildroot/runtime/_hdl_build/nx_decode_kind.nx
about
nx_decode_kind.nx -- the RV64IM instruction-class DECODER as a GATE-NETWORK
(the next module after the ALU, toward a bootable gate-level CPU). Mirrors the
behavioral nx_rv64im_decode_kind op-for-op: extract opcode/funct3/funct7, then
a CONST + EQ-match + cascade-MUX over the opcode (same shape as the ALU op-
select), with the M-extension sub-decode for the R-type opcodes 0x33/0x3b.
Output = NX_RV64IM_OP_* (the op class the executor routes to the ALU/loads/
branches). Verified EXHAUSTIVELY: decode_kind depends only on the 17 bits
{opcode[6:0], funct3[14:12], funct7[31:25]}, so all 2^17 combos are checkable.
license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_alu_divider.nxrv64im_min_decoder.nx
imported by: nx_decode_kind_test.nx
structs
| none |
consts
| none |
functions
| 16 | func dk_sel(g: *NxGsim, opcode: i64, opval: i64, klass: i64, prev: i64) -> i64 |
| 21 | func nx_decode_kind_synth(g: *NxGsim, ninst: i64) -> i64 |