// SPDX-License-Identifier: AGPL-3.0-or-later
accelfury-fpga-ip-template is a GitHub template for production-style FPGA IP
development with strict portability boundaries for reusable reusable modules.
Template focus:
- reusable RTL-first architecture
- portable core only in
rtl/core/and board-specific integration outside core - zero Python, zero C++ testbench, zero Node/npm dependency
- first ready IP:
af_mod_add(result = (a + b) mod p)
This repository contains no Python tooling and no Python reference implementation:
- no
*.py, no*.pyc, no*.pyo - no
requirements.txt,pyproject.toml,setup.py,setup.cfg,tox.ini,poetry.lock,Pipfile,Pipfile.lock,.python-version - no
package.json, nonode_modules - no cocotb
- no FuseSoC as mandatory dependency
Allowed implementation stack:
- Verilog-2001 / Verilog-2005 / SystemVerilog for RTL and testbench
- Rust for reference model, vector generation, host CLI/runner, reports
- TypeScript through Deno for metadata/docs/registry checks
- Verilog-2001 / Verilog-2005 / SystemVerilog: RTL, stream wrappers, tests, constraints docs
- Rust: reference arithmetic, deterministic vectors, CLI commands
(
cargo xtask), simulation orchestration - TypeScript (Deno): repo checks, manifest/registry validation, registry matrix, no-Python audit
Verilog generation policy:
cargo xtask new-ip ... --language verilog-2001→.vRTLcargo xtask new-ip ... --language verilog-2005→.vRTLcargo xtask new-ip ... --language systemverilog(default) →.svRTL- The shipped
af_mod_addhas a SystemVerilog implementation inrtl/core/and a lowest-common-denominator Verilog-2001 implementation inrtl/core/verilog2001/that is also valid Verilog-2005.
cargo xtask vectors
cargo xtask sim-verilator
cargo xtask lint-rtl
cargo xtask sim-verilator --language verilog-2001
cargo xtask lint-rtl --language verilog-2005
cargo xtask check-spdx
cargo xtask check-docs
cargo xtask check-boards
cargo xtask check-no-python
deno task audit:repo
cargo xtask board-matrix
cargo xtask synth-gowin --board sipeed_tang_primer_20k_dock
cargo xtask synth-quartus --board terasic_de0_nano_cyclone4
cargo xtask synth-vivado --board digilent_arty_a7
cargo xtask synth-lattice-oss --board icebreaker_ice40up5k| Component | Status |
|---|---|
| RTL architecture | ready |
| Reference model | ready |
| Deterministic vectors | ready |
| Verilator simulation | ready (--binary via Rust runner) |
| Lint and checks | implemented |
| Board matrix | ready |
| Synthesis templates | placeholders by vendor flow |
| Timing/resource reports | collection hooks ready |
- Sipeed (Gowin): 10 boards (
sipeed_tang_nano_1k,sipeed_tang_nano_4k,sipeed_tang_nano_9k,sipeed_tang_nano_20k,sipeed_tang_primer_20k_core,sipeed_tang_primer_20k_dock,sipeed_tang_primer_20k_lite,sipeed_tang_primer_25k,sipeed_tang_mega_138k,sipeed_tang_mega_138k_pro) - Lattice iCE40 / ECP5:
icebreaker_ice40up5k,tinyfpga_bx_ice40lp8k,icestick_ice40hx1k,ulx3s_ecp5,orangecrab_ecp5,colorlight_5a_75b_ecp5 - Intel/Altera:
terasic_de0_nano_cyclone4,terasic_de10_lite_max10,terasic_de10_nano_cyclonev_soc,qmtech_cyclone4_core - Xilinx:
digilent_basys3_artix7,digilent_arty_a7,digilent_cmod_a7,qmtech_artix7,ebaz4205_zynq7010 - Efinix:
trion_t8,trion_t20,titanium_ti60 - Microchip:
polarfire_splash_template,igloo2_template
See registries/fpga_families.json:
- vendor/family entries for Gowin, Lattice, Intel, Xilinx, Efinix, Microchip,
generic_asic_like - constraint support list and portability notes
- suggested toolchain mapping and resource behavior
toolchains/gowin_edatoolchains/intel_quartustoolchains/lattice_oss(iCE40 and ECP5 open flows)toolchains/xilinx_vivadotoolchains/lattice_radianttoolchains/efinix_efinitytoolchains/microchip_libero
- Core RTL has no vendor primitives and no board pins.
- Board clocks/reset/I/O wrappers are outside core.
- Valid/ready stream interfaces, optional simple
regmap/axi-lite/wishbone, and optional UART/SPI command shell. - No gated clocks in core (use enables + sync reset strategy).
- No initial-block RTL state, no board-specific memory/IP hard dependencies.
- Assertions use Verilator-compatible formal checks.
- Copy
rtl/core/af_mod_add.svas template and rename module. - Preserve the same handshake contract (
i_valid,o_ready,o_valid,i_ready). - Add RTL source files with target language:
rtl/core/<new_ip>.sv+<new_ip>_top.svfor SystemVerilogrtl/core/<new_ip>.v+<new_ip>_top.vfor Verilog-2001/Verilog-2005
- Add deterministic edge/random vectors in
vectors/<new_ip>_*.jsonand.svh. - Update
ip.manifest.jsonfields (source_files,interfaces,vectors,boards). - Update docs under
docs/and add optional board support notes. - Register new crate/module in
registries/ip_categories.jsonif needed. - Run:
cargo xtask vectors
cargo xtask sim-verilator
cargo xtask lint-rtl
cargo xtask sim-verilator --language verilog-2001
cargo xtask lint-rtl --language verilog-2005
deno task audit:repoLanguage-aware variant generation:
cargo xtask new-ip --name af_ntt_butterfly --category ntt_fft
cargo xtask new-ip --name af_ntt_butterfly --category ntt_fft --language verilog-2001- Add metadata in
registries/boards.registry.json. - Add folder
boards/<vendor>/<board_id>/with:README.mdbringup.mdboard.status.jsontop/af_board_top.svconstraints/README.md- constraint placeholder (
pins.cst,pins.pcf,constraints.lpf,project.qsf,constraints.xdc, orconstraints.pdc) - toolchain build script under
gowin/,lattice/,quartus/,vivado/,efinity/, orlibero/
- Run
deno task check:boardsandcargo xtask board-matrix.
- Add vendor toolchain adapter under
toolchains/<vendor>_template/and documented flow. - Add family entries in
registries/fpga_families.json. - Add at least one board and its status/readme template.
- Extend checks to validate new board constraints/build files.
- Add toolchain adapter under
toolchains/<chain>/. - Add entry to
registries/toolchains.registry.jsonand CLI path mapping incrates/xtask/src. - Update CI workflow to call corresponding
cargo xtask synth-*command.
- RTL / gateware:
CERN-OHL-S-2.0 - Rust / TypeScript tooling:
AGPL-3.0-or-later - documentation:
CC-BY-SA-4.0
Repository is open-licensed by default. Separate commercial terms exist for
closed-source bitstreams, ASIC handoff services, or SaaS/prover
commercialization. See COMMERCIAL.md.
- Update
ip.manifest.jsonand vector metadata hash. - Validate
cargo xtask vectors,cargo xtask sim-verilator,cargo xtask lint-rtl. - Run
deno task audit:repoandcargo xtask check-spdx. - Ensure board registry and toolchain registry pass checks.
- Update
CHANGELOG.mdwith API/behavior changes. - Tag release and publish release artifacts in
reports/.