code wiki / _hdl_build / rv64im_min_regfile.nx

rv64im_min_regfile.nx

buildroot/runtime/_hdl_build/rv64im_min_regfile.nx

5443 B140 linesdepth 3pulls 3 transitivereach 47 importersview sourcekind librarytopic rv64im
docsdependenciesstructsconstsfunctions

about

rv64im_min_regfile.nx -- RV64IM-min general-purpose register file. 32 entries × 64 bits. Two combinational read ports (rs1, rs2) and one sequential write port (rd on clock-edge if write_en). x0 is hardwired to 0: reads return 0 regardless of the write history; writes to x0 are silently dropped. This matches every RV64 in-order design from the SiFive E2 series through the Rocket / BOOM cores. Out-of-order designs would rename behind this surface; Tier A FPGA bring-up is single-issue in-order so the rename layer is not needed. Status: SEED. 2026-05-26. Storage + access semantics; the HDL- graph builder declares the module shape so nishi-sim / nishi-synth can map storage onto BRAM (Tier A FPGA) or SRAM cells (Tier B+).

dependencies 2 imports · 33 importers

nx_syscalls.nx nishi_hdl_primitives.nx rv64im_min_regfile.nx nx_emu_bench.nx nx_evo_isa_sov.nx nx_geneal_energy_sov.nx nx_isa_cf_sov.nx nx_isa_equiv_sov.nx nx_isa_loop_sov.nx nx_isa_run_sov.nx nx_isa_synth_sov.nx nx_nxc_baremetal.nx nx_nxc_run.nx

diagram shows first 10 each side; +0 more imports, +23 more importers in the complete lists below.

imports: nx_syscalls.nxnishi_hdl_primitives.nx

imported by: nx_emu_bench.nxnx_evo_isa_sov.nxnx_geneal_energy_sov.nxnx_isa_cf_sov.nxnx_isa_equiv_sov.nxnx_isa_loop_sov.nxnx_isa_run_sov.nxnx_isa_synth_sov.nxnx_nxc_baremetal.nxnx_nxc_run.nxnx_rv64_amo_gate.nxnx_rv64_csr_trap_oracle.nxnx_rv64_fast_dev_gate.nxnx_rv64_fast_gate.nxnx_rv64_kernel_gate.nxnx_rv64_mmu_oracle.nxnx_rv64_qemu_fuzz.nxnx_rv64_qemu_oracle.nxnx_rv64_realc_gate.nxnx_rv64_run_bin.nxnx_rv64_sdeleg_oracle.nxnx_rv64_snapshot_gate.nxnx_rv64_timer_oracle.nxnx_rv64im_cpu_crosscheck.nxrv64im_min_cpu_crosscheck.nxrv64im_min_elf_loader.nxrv64im_min_gfx_gate.nxrv64im_min_hot_report.nxrv64im_min_kernel_boot_smoke.nxrv64im_min_sim.nxrv64im_min_sim_smoke.nxsynth_emit_regfile_gates.nxsynth_emit_regfile_gates_smoke.nx

structs

32struct NxRv64imRegfile
92struct NxRv64imRegfilePorts

consts

21const NX_RV64IM_RF_N_REGS: i64 = 32
22const NX_RV64IM_RF_WIDTH: i64 = 64
23const NX_RV64IM_RF_IDX_BITS: i64 = 5 // log2(32)
90const NX_RV64IM_RF_WIDTH_WR_EN: i64 = 1

functions

37func nx_rv64im_rf_init(rf: *NxRv64imRegfile, storage: *i64) -> i64
60func nx_rv64im_rf_read(rf: *NxRv64imRegfile, idx: i64) -> i64
75func nx_rv64im_rf_write(rf: *NxRv64imRegfile, idx: i64, value: i64) -> i64
104func nx_rv64im_rf_build(m: *NxHdlModule, ports: *NxRv64imRegfilePorts) -> i64