/oh-my-fpga:utilization-reductionfrom oh-my-fpga
Diagnoses and reduces FPGA resource/area pressure when a design exceeds device capacity. Targets LUT, FF, BRAM, DSP, URAM overutilization using SynthPilot MCP and Xilinx Vivado.
Ships in oh-my-fpga. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reduce resource/area pressure so a design fits the target part. Area work is resource-typed: LUTs, FFs, BRAM/RAMB, DSP, URAM, carry chains, and control sets each have different root causes and different safe fixes. You must measure which resource is the bottleneck before touching anything, fix the dominant resource first, and re-measure after every single change so cause and effect stay attributable.
The cheapest, safest levers are settings (synthesis area strategy, IP right-sizing, RAM/DSP inference thresholds, BRAM ECC/output regs). The expensive, design-altering levers are RTL/architecture (resource sharing, time multiplexing, narrower datapaths, dropping features). Always exhaust the cheap levers first, recommend the expensive ones rather than silently rewriting RTL, and surface the trade-off (area vs. Fmax vs. functionality) before handing back.
report_utilization shows any resource column at high % (LUT, FF, BRAM,
DSP, URAM, carry, control sets) and the user wants headroom.report_congestion /
report_design_analysis under a congestion playbook, not area reduction.Run these and confirm before any analysis. Do not proceed on assumption.
test_connection — Tcl server inside Vivado is reachable. If it fails,
stop: nothing below works without the bridge.get_project_info — a project is open; note the target part and its
resource ceilings. "Too big" is always relative to a specific part.get_license_status — confirm the report/strategy tools you intend to call
are available in the current tier (hierarchical utilization, design
analysis, QoR suggestions may be PRO).State the target part and the resource ceilings before you start fixing.
run_synthesis_async, then poll get_run_status until complete, then
get_synthesis_report and check_synthesis_issues. (run_synthesis
synchronously is fine for small designs.)open_synthesized_design (post-synth) — or, for signoff numbers,
open_implemented_design after implementation.report_utilization — capture the flat numbers: used / available / % for
LUT (logic vs. memory/LUTRAM split), FF, BRAM (RAMB36/RAMB18), URAM, DSP,
carry/CARRY chains, and control sets. Record this as the baseline.Do not act yet. Numbers first.
report_utilization_hierarchical (start depth=2, drill deeper as needed) —
find which module/instance dominates that resource. Area reduction is
almost always concentrated; attack the top contributors, not the whole tree.report_ip_status and list_project_ips — IP cores (FIFOs, memories,
clocking, AXI infra, DSP-heavy IP) are common silent hogs and are often the
cheapest thing to right-size (see classification table).report_design_analysis (logic-level / complexity) and
report_qor_suggestions (Vivado's own area/strategy hints — may be empty).Now you can classify.
Map dominant resource + where-it-lives to a cause, then to the cheapest fix class that addresses it. Order of preference, always:
ram_style / rom_style / use_dsp / max_fanout style attributes in
RTL. These are RTL edits — recommend, do not silently apply.Apply exactly one change-class per iteration so the re-measured delta is
attributable. Use set_synthesis_strategy (e.g. Flow_AreaOptimized_high,
or Flow_AreaMultThresholdDSP for DSP pressure) and
set_implementation_strategy (Area_Explore) for the settings lever.
report_utilization and
report_utilization_hierarchical. Compare against the previous baseline,
resource by resource. Show the before/after delta.use_dsp
moves multiplies into LUTs). Re-read all resources, not just the one you
targeted, to catch a regression where you robbed Peter to pay Paul.report_timing_summary / extract_timing_metrics) so you don't trade an
area failure for a timing failure. Report both numbers.A "fits the part" claim requires fresh post-implementation evidence, never post-synth inference:
run_implementation_async → poll get_run_status →
get_implementation_warnings), then open_implemented_design.report_utilization on the implemented design — every gating resource
must be < 100% with real headroom.report_drc — confirm no overutilization / placement DRC violations remain.report_timing_summary must still pass.If implementation still over-utilizes, you are not done — loop back to Step 2 with the new dominant resource, or escalate per the STOP conditions.
Dominant resource (from report_utilization / hierarchical) | Likely cause | Smallest safe fix first | Escalation (recommend, do not auto-apply) |
|---|---|---|---|
| LUT (logic) high, FF moderate | Combinational logic bloat; replicated logic; wide muxes/comparators; unshared arithmetic | set_synthesis_strategy Flow_AreaOptimized_high; right-size oversized IP | Recommend resource sharing / time-multiplexing of duplicated datapaths; narrow over-wide buses; fold parallel units |
| LUTRAM / memory-LUT high | Small/shallow RAMs/ROMs inferred into distributed RAM instead of BRAM | Recommend (* ram_style = "block" *) / rom_style = "block" on the offending arrays (found via hierarchical) to push them to BRAM | If BRAM is also tight, this is a true capacity wall → present part/architecture trade-off |
| BRAM (RAMB36/18) high | Over-deep/over-wide memories; FIFOs/IP sized larger than needed; ECC or output regs adding banks; many small RAMs not packed | report_ip_status then right-size FIFO/Block-Memory IP depth/width; disable BRAM ECC if not required; cut over-provisioned FIFO depth | Recommend merging small RAMs, moving rarely-touched tables to distributed (LUTRAM) or off-chip; consider URAM if part has it |
| DSP high | Multipliers/MACs each mapped to DSP48; large multiplies split across multiple DSPs | set_synthesis_strategy Flow_AreaMultThresholdDSP to push small mults to fabric; right-size DSP-heavy IP | Recommend (* use_dsp = "no" *) on small/low-rate multiplies, time-shared MAC, or reduced precision — note this adds LUTs, re-measure |
| FF (registers) high | Deep pipelining; wide registered datapaths; auto-replication; SRL-able shift regs as FFs | Allow tool to infer SRLs (srl_style); reduce unnecessary pipeline depth via settings where possible | Recommend trimming pipeline stages (costs Fmax) or narrowing registered width; confirm with user — this is functional/timing-affecting |
| Control sets high (drives LUT/placement pressure even at moderate FF%) | Too many distinct (clock, enable, reset) groups → poor slice packing | Reduce gated/async resets and per-bit enables via settings/attributes where safe | Recommend uniform synchronous reset / fewer enable domains in RTL — surface as design guidance |
| CARRY chains high | Many wide adders/counters/comparators | Flow_AreaOptimized_high lets tool restructure | Recommend sharing adders or restructuring wide arithmetic |
| IO over | Pin count exceeds package | (Not fabric area) — report_io; this is a packaging/part problem | Recommend bus muxing, serialization, or a larger package — present, do not auto-change pinout |
If the dominant resource is an IP core, prefer right-sizing the IP
(get_fifo_config / get_memory_config / get_ip_config to read it, then the
matching configure_* / set_ip_property) before any RTL change — it is
usually the single biggest, lowest-risk win.
baseline = report_utilization (+ hierarchical) # Step 1-2
while (gating resource >= 100% OR user wants more headroom):
classify dominant resource (table) # Step 3
apply ONE smallest-safe change-class
re-synth -> report_utilization (+ hierarchical) # Step 4
re-check OTHER resources + timing for regressions
show before/after delta
-- STOP if any condition below --
sign off with implementation evidence # Step 5
STOP (and report) immediately when any of these hold:
When you stop at "levers exhausted", give the user a ranked options list, e.g.:
(a) right-size IP X (frees ~N BRAM, no Fmax cost) — recommended;
(b) push array Y to BRAM via ram_style (RTL edit, frees ~M LUTRAM);
(c) time-multiplex the K parallel MAC units (frees ~P DSP, costs throughput
+RTL work); (d) move to part Z (bigger, +cost). Then stop.
report_utilization + clean report_drc. Never claim
fit from post-synth numbers or from inference — synthesis utilization is
necessary but not sufficient. No tool output, no claim.ram_style/use_dsp
attributes are recommendations. Read with read_file / read_file_lines,
explain the change and its cost, and apply edits (update_file /
replace_in_file) only after the user agrees. Functional or
throughput-changing edits ALWAYS need explicit user sign-off.Flow_AreaOptimized_high, Area_Explore)
and resource sharing typically cost Fmax. If a timing target exists, re-check
report_timing_summary after the area change and report both.Report back in this shape:
report_utilization_hierarchical top contributors), and the classification
(cause) from the table.FITS (signed off, impl evidence) /
IMPROVED, still over / LEVERS EXHAUSTED — decision needed. Cite the
exact tool output backing the status.Never assert that the design fits without quoting fresh post-implementation
report_utilization and a clean report_drc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
fpga, vivado, resource-utilization, area-reduction, synthpilot
npx claudepluginhub lnc0831/oh-my-fpga --plugin oh-my-fpga13 skills in this plugin
/bitstream-programGenerate a bitstream and program a Xilinx FPGA over JTAG, or build an MCS image and burn it into SPI/BPI configuration flash for power-on boot. Invoke when the user says "program the board", "generate bitstream", "flash the device", "download to FPGA", "burn the flash", "load my design onto the board", "make a .mcs / .bit", or "why won't my board come up after power cycle". Covers the full hand-off from a routed implementation to live silicon: DRC + route + timing sign-off gating, .bit generation, hardware-server / JTAG connect, volatile JTAG download, and non-volatile flash programming (generate_mcs + add_flash_configuration + program_flash). Requires the SynthPilot MCP server with Vivado running and the Tcl server connected; flash / JTAG steps additionally require a physical board cabled to the host (or reachable through a remote hw_server).
/cdc-auditAudit and resolve clock-domain-crossing (CDC) risks on a design: enumerate every clock crossing, classify each by structure (synchronizer present/absent, single-bit vs bus, async reset, reconvergence), and apply the smallest safe fix (synchronizer RTL, set_clock_groups / set_max_delay -datapath_only / set_bus_skew constraints) without ever waiving a real crossing. Invoke when the user says "cdc analysis", "check clock domain crossings", "metastability review", "are my async crossings safe", "audit clock crossings", "fix CDC violations", "report_cdc is showing critical", "do I need a synchronizer here", or asks about gray-code, handshake, async FIFO, or reset-domain-crossing (RDC) safety. Requires the SynthPilot MCP server with Vivado open and the Tcl server running (TCP:9999); CDC reporting needs an elaborated or synthesized design./constraints-authoringAuthor a correct Vivado XDC timing constraint set from scratch — primary clocks, generated (derived) clocks, input/output delays, and timing exceptions (clock groups / false paths / multicycle paths) — for a design that has no constraints yet, or whose constraints are incomplete (unconstrained ports, missing generated clocks, unrelated async clocks reported as failing paths).
Invoke when the user says: "write constraints", "author xdc", "set up timing constraints", "no constraints yet", "constrain my clocks", "add input/output delays", "my clocks are asynchronous / I need clock groups", or whenever check_timing / report_timing_summary reports unconstrained clocks, ports, or combinational endpoints. This is the FIRST step before any timing-closure or signoff work — WNS/TNS numbers are meaningless until the design is correctly constrained.
Requires the SynthPilot MCP server connected to an OPEN Vivado session with the Tcl server running (test_connection must pass) and a project that elaborates and synthesizes.
/coverage-closureMeasure RTL simulation code coverage (statement / branch / condition) and iteratively close it toward an explicit target by adding targeted testbench stimulus. Use when the user asks "what is my code coverage", "how much is covered", "coverage closure", "improve coverage to N%", "which lines aren't tested", "are there untested branches", or wants a sign-off-grade coverage report before tape-out / merge. Requires the SynthPilot MCP server with Vivado + the Tcl server running (xsim/xelab/xcrg, validated on Vivado 2024.2). PRO-tier tool sim_get_coverage. This is a methodology playbook, not code: it tells the AI which real SynthPilot tools to call, in what order, and how to decide what to do with the numbers.
/full-flow-demoDrive a Xilinx FPGA design end-to-end through the complete build flow: RTL -> simulation -> synthesis -> implementation -> bitstream, with a verification gate after every stage so a downstream stage never runs on an upstream stage that silently regressed. Invoke this skill when the user says "rtl to bitstream", "end to end", "full flow", "run everything", "build the whole thing", "take this design all the way to a .bit", "complete build", or asks to drive a project from source files to a programmed/exportable bitstream in one orchestrated pass. Requires the SynthPilot MCP server connected to an open Vivado session with the Tcl server (tcl_server.tcl on TCP:9999) running. This is the ORCHESTRATION playbook: it sequences the real flow tools, gates each stage on fresh tool evidence, stops on the first real failure, and hands off to the specialist skills (timing-closure, cdc-analysis, lint, simulation-debug) instead of trying to fix violations itself./ila-hw-debugInsert/connect an ILA (Integrated Logic Analyzer), program the board, arm a trigger, and read back captured waveforms on real FPGA hardware. Use when the user says "debug on hardware", "insert ILA", "capture waveform on the board", "the design works in sim but fails on the board", "trigger when X happens on hardware", "probe a signal live", "read the ILA", or wants to observe live silicon behavior via JTAG. Covers the full loop: mark/insert debug cores -> re-implement -> bitstream -> connect hardware server -> program with .ltx probes -> set trigger -> arm -> capture -> read CSV. Requires the SynthPilot MCP server with Vivado open and tcl_server.tcl running, plus a physical JTAG-connected board and a running hw_server (hardware server).
Other plugins' skills for the same job