code wiki / _hdl_build / nx_nbit.nx
nx_nbit.nx
buildroot/runtime/_hdl_build/nx_nbit.nx
about
nx_nbit.nx -- LIB: NHDL H5 -- sovereign PLACE-and-ROUTE + BITSTREAM for the VIRTUAL FPGA (the nextpnr/prjtrellis
competitor). H4 synthesizes a logical netlist (cells + nets); this is the BACK-END that maps it onto a PHYSICAL
2-D grid of LUT tiles (PLACEMENT) with inputs addressed by grid coordinate (ROUTING), serializes a sovereign
BITSTREAM (our own, like prjtrellis is for ECP5), and the VIRTUAL FPGA loads + evaluates it. The placement is a
real permutation (column-major), so correctness proves routing follows arbitrary placement -- not a relabel.
"Simulate the chip+board BEFORE buying": the whole RTL->synth->P&R->bitstream->virtual-board chain runs in-sim.
NEVER-BRICK (#26): pure memory, bounded, deterministic, zero hardware-state writes. license_tier: ORIGINAL
HONEST scope: 1 LUT/tile, full routability assumed (every tile reachable). The CONSTRAINED-routing optimization
(limited channels + simulated annealing -- nextpnr's hard part) is the depth rung; this proves the P&R DATA FLOW
(place -> route -> bitstream -> virtual eval == netlist) sovereignly + correctness-preservingly.
dependencies 3 imports · 3 importers
imports: nx_nhdl.nxnx_fpga_lut.nxnx_syscalls.nx
imported by: nx_nbit_gate.nxnx_nhdl_perf_gate.nxnx_nhdl_scorecard_gate.nx
structs
| none |
consts
| none |
functions
| 17 | func nbit_place(ncells: i64, R: i64, C: i64, tile_of: *i64) -> i64 |
| 24 | func nbit_resolve(s: i64, npi: i64, pi: *i64, tile_of: *i64, tileval: *i64) -> i64 called by 1: nbit_eval |
| 30 | func nbit_eval(ncells: i64, npi: i64, npo: i64, tile_of: *i64, init: *i64, src: *i64, po: *i64, pi: *i64, tileval: *i64, out: *i64) -> i64 |
| 46 | func nbit_wsrc(buf: *u8, o: i64, s: i64, npi: i64, tile_of: *i64) -> i64 |
| 54 | func nbit_emit(buf: *u8, R: i64, C: i64, npi: i64, npo: i64, ncells: i64, tile_of: *i64, init: *i64, src: *i64, po: *i64) -> i64 |