code wiki / _hdl_build / nx_fpga_verilog.nx

nx_fpga_verilog.nx

buildroot/runtime/_hdl_build/nx_fpga_verilog.nx

6618 B115 linesdepth 2pulls 2 transitivereach 13 importersview sourcekind librarytopic fpga
docsdependenciesstructsconstsfunctions

about

nx_fpga_verilog.nx -- LIB: RUNG 28 -- the SYNTH BRIDGE emitter, SEQUENTIAL-capable. Serializes any fabric (combinational LUT4 cells AND clocked DFF cells, the `kind` bitstream from nx_fpga_seq) to a Yosys-synthesizable Verilog gate-netlist: LUT cells -> combinational `assign comb[k] = (INIT >> inputs) & 1`; DFF cells -> a `reg ff[k]` latched in `always @(posedge clk)`. Each cell carries a machine-readable `//@C k kind init s0 s1 s2 s3` tag so the netlist round-trips (fab_parse_seq reconstructs kind/init/src/po byte-identically). This is the layer nishi_hdl_primitives calls "future" and rv64im_min leaves undone -- the path from the sim fabric toward an ECP5 bitstream. NEVER-BRICK (#26): pure text emit/parse, bounded, deterministic, zero hardware-state writes. license_tier: ORIGINAL

dependencies 1 imports · 13 importers

nx_syscalls.nx nx_fpga_verilog.nx nx_fpga_alu_verilog_gate.nx nx_fpga_board_anim_gate.nx nx_fpga_board_gate.nx nx_fpga_compose_gate.nx nx_fpga_rexec_gate.nx nx_fpga_verilog_seq_gate.nx nx_nhdl_gate.nx nx_nhdl_scorecard_gate.nx nx_nrtl_gate.nx nx_viz3d_board_gate.nx

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

imports: nx_syscalls.nx

imported by: nx_fpga_alu_verilog_gate.nxnx_fpga_board_anim_gate.nxnx_fpga_board_gate.nxnx_fpga_compose_gate.nxnx_fpga_rexec_gate.nxnx_fpga_verilog_seq_gate.nxnx_nhdl_gate.nxnx_nhdl_scorecard_gate.nxnx_nrtl_gate.nxnx_viz3d_board_gate.nxnx_viz3d_cube_gate.nxnx_viz3d_solid_gate.nxnx_viz3d_stl_gate.nx

structs

none

consts

none

functions

11func vlg_isdig(c: i64) -> i64 { if c < 48 { return 0 } if c > 57 { return 0 } return 1 }
12func vlg_wr_str(buf: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){ buf[o]=s[i]; o=o+1; i=i+1 } return o }
13func vlg_wr_int(buf: *u8, off: i64, v: i64) -> i64
23func vlg_wr_op(buf: *u8, off: i64, s: i64, npi: i64, kind: *i64) -> i64
32func fab_emit_verilog_seq(buf: *u8, ncells: i64, npi: i64, npo: i64, kind: *i64, init: *i64, src: *i64, po: *i64) -> i64
76func vlg_rd_int(buf: *u8, pp: *i64) -> i64
85func vlg_find(buf: *u8, len: i64, from: i64, marker: *u8, mlen: i64) -> i64
96func fab_parse_seq(buf: *u8, len: i64, rkind: *i64, rinit: *i64, rsrc: *i64, rpo: *i64, pnpi: *i64, pnpo: *i64) -> i64