How rancunefr/xilinx_template works
Project Type and Purpose
• This is a “Vivado Make-based FPGA Project Template.”
• Its goal is to orchestrate the entire FPGA development flow (compile, simulate, synthesize, implement, generate bitstream, program board) using a portable Makefile and supporting Tcl scripts.
• You target Xilinx FPGAs (e.g. Basys-3) from the command line, with incremental builds via timestamp files.
Key Directories & Files
• Makefile & settings.mk: central build orchestrator and user-configurable variables (PART, SRC_*, TB_TOP, XDC).
• constr/: XDC constraint files (board pinout, timing).
• ip/: pre-built/custom IP cores plus config templates (clocking wizard “clocky”).
• scripts/: helper Tcl scripts invoked by the Makefile (synthesis, simulation, bitgen, upload).
• src/: RTL sources (SystemVerilog modules: principal, impulse, counter).
• tb/: testbench sources for behavioural simulation.
• output/: auto-generated netlists, reports, waveforms, bitfiles (not checked in).
• sim_libs/: time-annotated libraries for post-synthesis/implementation timing sims.
Main Architectural Components
a. Artifacts Layer
• RTL Sources (src/)
• Testbench Sources (tb/)
• Constraints (constr/)
• IP Cores & Configs (ip/)
• Build Config (settings.mk)
b. Orchestration Layer
• Makefile – defines targets (src, tb, synth, impl, binary, sim, upload)
• Timestamp files (.timestamp.*) for incremental builds
• Tcl Scripts (scripts/*.tcl)
c. Toolchain Layer
• Vivado CLI tools: xvlog, xelab, xsim, vivado (synth → P&R → bitgen → hw_server)
d. Simulation Infrastructure
• sim_libs/ (generated libraries)
• GTKWave viewer for VCD waveforms
e. Output / Deployment
• Generated Reports (timing, utilization)
• Bitstream (.bit/.bin)
• Programmed FPGA board via Vivado HW manager
Relationships & Data Flows
• User invokes make <target> → Makefile reads settings.mk
• Makefile calls Tcl scripts and/or Vivado CLI:
• “make src” → xvlog (RTL lint)
• “make tb” → xvlog + xelab (elaboration)
• “make sim” → xsim → output/waveforms/*.vcd → GTKWave
• “make synth” → synth_netlist → output/netlists
• “make impl” → place&route → output/reports
• “make binary” → bitgen → .bin file
• “make upload” → vivado hw_server → programs FPGA
• IP generation flow: ip/configs → make ip_generate_instances → ip/clocky.xci + sources → include in SRC_IP
Architectural Patterns & Principles
• Separation of concerns: source artifacts, build logic, toolchain, outputs.
• Incremental build via timestamp stamps to avoid redundant re-runs.
• Modular TCL scripts for each sub-task, invoked by Makefile.
• Directory-based layering: clear boundaries between design, testbench, constraints, IP, and outputs.
Essential Elements
• Clear labels on all components (e.g., “src/”, “scripts/”, “Vivado CLI”).