nishi_hdl_primitives.nx
buildroot/runtime/nishi_hdl_primitives.nx
about
dependencies 1 imports · 59 importers
diagram shows first 10 each side; +0 more imports, +49 more importers in the complete lists below.
imports: nx_syscalls.nx
imported by: nishi_synth.nxnishi_synth_gates.nxnx_amo_payload.nxnx_cell_sink.nxnx_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_mulh_diag.nxnx_nxc_baremetal.nxnx_nxc_run.nxnx_rv64_amo_gate.nxnx_rv64_csr_trap_oracle.nxnx_rv64_fast.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.nxnx_rv64im_decoder_dump.nxnx_simtcore.nxnx_simtcore_gate.nxrv64im_min_alu.nxrv64im_min_clint.nxrv64im_min_cpu_crosscheck.nxrv64im_min_csr.nxrv64im_min_decoder.nxrv64im_min_decoder_proof.nxrv64im_min_elf_loader.nxrv64im_min_gfx_gate.nxrv64im_min_gpu.nxrv64im_min_hot_report.nxrv64im_min_kernel_boot_smoke.nxrv64im_min_mmu.nxrv64im_min_multi_tier_roi.nxrv64im_min_nndev.nxrv64im_min_nvme.nxrv64im_min_regfile.nxrv64im_min_sim.nxrv64im_min_sim_smoke.nxrv64im_min_symtab.nxrv64im_min_uart.nxrv64im_min_virtio.nxsynth_emit_alu.nxsynth_emit_alu_gates.nxsynth_emit_alu_gates_smoke.nxsynth_emit_regfile_gates.nxsynth_emit_regfile_gates_smoke.nx
structs
| 135 | struct NxHdlModule |
consts
| 38 | const NX_HDL_WIDTH_MIN: i64 = 1 |
| 39 | const NX_HDL_WIDTH_MAX: i64 = 512 |
| 51 | const NX_HDL_KIND_WIRE: i64 = 0 // combinational; resolves each clock edge |
| 52 | const NX_HDL_KIND_REG: i64 = 1 // sequential; holds value across edges |
| 53 | const NX_HDL_KIND_INPUT: i64 = 2 // module port, driven by parent |
| 54 | const NX_HDL_KIND_OUTPUT: i64 = 3 // module port, driven by self |
| 55 | const NX_HDL_KIND_INOUT: i64 = 4 // bidirectional port (MMIO buses) |
| 56 | const NX_HDL_KIND_CLOCK: i64 = 5 // clock domain root |
| 57 | const NX_HDL_KIND_RESET: i64 = 6 // reset signal (sync or async) |
| 58 | const NX_HDL_KIND_CONST: i64 = 7 // compile-time constant |
| 59 | const NX_HDL_KIND_N_KINDS: i64 = 8 |
| 68 | const NX_HDL_OK: i64 = 0 |
| 69 | const NX_HDL_BAD_WIDTH: i64 = 1 |
| 70 | const NX_HDL_BAD_KIND: i64 = 2 |
| 71 | const NX_HDL_WIDTH_MISMATCH: i64 = 3 // connect of incompatible widths |
| 72 | const NX_HDL_KIND_MISMATCH: i64 = 4 // e.g., wire driven by another wire |
| 73 | const NX_HDL_GRAPH_FULL: i64 = 5 // module-graph capacity exceeded |
| 74 | const NX_HDL_DRIVER_CONFLICT: i64 = 6 // multiple drivers on a wire |
| 75 | const NX_HDL_N_VERDICTS: i64 = 7 |
| 92 | const NX_HDL_HANDLE_NONE: i64 = 0 - 1 |
| 95 | const NX_HDL_RESET_ACTIVE_HIGH: i64 = 0 |
| 96 | const NX_HDL_RESET_ACTIVE_LOW: i64 = 1 |
| 97 | const NX_HDL_RESET_SYNC: i64 = 0 |
| 98 | const NX_HDL_RESET_ASYNC: i64 = 1 |
| 104 | const NX_HDL_MODULE_MAX_SIGNALS: i64 = 8192 // RV64IM-min core + full ALU (divider+mulh+W-variant) |
| 105 | const NX_HDL_MODULE_MAX_CHILDREN: i64 = 256 // sub-module instantiations |
| 122 | const NX_HDL_SIGNAL_STRIDE_BYTES: i64 = 32 |
| 125 | const NX_HDL_SIGNAL_FIELD_KIND: i64 = 0 |
| 126 | const NX_HDL_SIGNAL_FIELD_WIDTH: i64 = 1 |
| 127 | const NX_HDL_SIGNAL_FIELD_DRIVER: i64 = 2 |
| 128 | const NX_HDL_SIGNAL_FIELD_NAME: i64 = 3 |
functions
| 41 | func nx_hdl_width_is_valid(w: i64) -> i64 called by 1: nx_hdl_signal_alloc |
| 61 | func nx_hdl_kind_is_valid(k: i64) -> i64 called by 1: nx_hdl_signal_alloc |
| 77 | func nx_hdl_verdict_is_valid(v: i64) -> i64 |
| 150 | func nx_hdl_signal_kind(m: *NxHdlModule, handle: i64) -> i64 called by 1: nx_hdl_connect |
| 156 | func nx_hdl_signal_width(m: *NxHdlModule, handle: i64) -> i64 called by 1: nx_hdl_connect |
| 162 | func nx_hdl_signal_driver(m: *NxHdlModule, handle: i64) -> i64 called by 1: nx_hdl_connect |
| 174 | func nx_hdl_signal_alloc(m: *NxHdlModule, kind: i64, width: i64) -> i64 |
| 187 | func nx_hdl_wire(m: *NxHdlModule, width: i64) -> i64 called by 5: nx_sink_constnx_sink_cellnx_alu_alloc_wirenx_rf_netnx_rf_const calls 1: nx_hdl_signal_alloc |
| 191 | func nx_hdl_reg(m: *NxHdlModule, width: i64) -> i64 calls 1: nx_hdl_signal_alloc |
| 195 | func nx_hdl_input(m: *NxHdlModule, width: i64) -> i64 |
| 199 | func nx_hdl_output(m: *NxHdlModule, width: i64) -> i64 |
| 203 | func nx_hdl_clock(m: *NxHdlModule) -> i64 called by 4: nx_clint_buildnx_rv64im_csr_buildnx_rv64im_rf_buildnx_uart_build calls 1: nx_hdl_signal_alloc |
| 207 | func nx_hdl_reset(m: *NxHdlModule) -> i64 called by 4: nx_clint_buildnx_rv64im_csr_buildnx_rv64im_rf_buildnx_uart_build calls 1: nx_hdl_signal_alloc |
| 221 | func nx_hdl_connect(m: *NxHdlModule, sink: i64, source: i64) -> i64 called by 1: nx_emit_regfile_gates calls 3: nx_hdl_signal_kindnx_hdl_signal_widthnx_hdl_signal_driver |
| 245 | func nx_hdl_module_init(m: *NxHdlModule, name: *u8, name_len: i64, |