shinei-nouzen-arch/fpga-agent/vivado-synth

Claude Code and agent skill by shinei-nouzen-arch/fpga-agent

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use this skill when the user needs help with Vivado synthesis strategy selection, synthesis attribute configuration, synth_design option tuning, resource inference control (RAM/DSP/SRL/BRAM), hierarchy optimization (flatten_hierarchy, KEEP_HIERARCHY), OOC (out-of-context) synthesis, incremental synthesis, RTL linting, Block-Level synthesis (BLOCK_SYNTH), or any synthesis optimization decision. Trigger when the user mentions synthesis strategies, synthesis directives, synthesis attributes, resource mapping control, FSM encoding, retiming, or asks how to optimize synthesis results for area/timing/power. This skill provides decision-making knowledge — for TCL command execution, use vivado-tcl skill.

Install

npx vskill@latest install shinei-nouzen-arch/fpga-agent/vivado-synth

SKILL.md

Vivado Synthesis Decision Guide

Based on UG901 (v2025.2). This skill helps choose the right synthesis strategies, options, and attributes. For attribute syntax see REFERENCE.md; for HDL coding templates (RAM/DSP/ROM/SRL/FSM/etc.) see examples/ directory — consult the index table in REFERENCE.md to locate the right file.

synth_design Complete Options

Hierarchy Control
OptionValuesDefaultEffect
-flatten_hierarchynone/full/rebuiltrebuiltnone: preserve RTL hierarchy. full: flatten to top only. rebuilt: flatten then rebuild similar hierarchy (best QoR + readability)
Timing Optimization
OptionValuesDefaultEffect
-directiveSee strategy table belowDefaultSelects preconfigured optimization strategy
-global_retimingauto/on/offautoRegister balancing across combinational logic. Auto = on for Versal, off for others
-no_timing_drivenflag—Disables timing-driven synthesis (faster, worse timing)
Resource Control
OptionValuesDefaultEffect
-max_braminteger-1 (max)Limit Block RAM usage
-max_uraminteger-1 (max)Limit UltraRAM usage (UltraScale+)
-max_dspinteger-1 (max)Limit DSP block usage
-shreg_min_sizeinteger3Min chain length for SRL inference
-srl_styleregister/rl/srl_reg/reg_srl/reg_srl_reg—Global SRL implementation style
-cascade_dspauto/tree/forceautoDSP adder chain implementation
-max_bram_cascade_heightinteger-1Max BRAM cascade depth
-max_uram_cascade_heightinteger-1Max UltraRAM cascade depth
-no_srlextractflag—Disable all SRL extraction
-no_lcflag—Disable LUT combining
FSM & Logic
OptionValuesDefaultEffect
-fsm_extractionauto/one_hot/sequential/gray/johnson/user_encoding/offautoFSM encoding strategy
-resource_sharingauto/on/offautoArithmetic operator sharing
-keep_equivalent_registersflagoffPrevent merging of equivalent registers
-control_set_opt_thresholdauto/integer/0autoFanout threshold for control set optimization. 0 = disable
Clock & IO
OptionValuesDefaultEffect
-bufginteger12Max global clock buffers to infer
-gated_clock_conversionoff/on/autooffConvert gated clocks to enables
Design Entry
OptionValuesDefaultEffect
-topmodule name—Top module
-partpart number—Target FPGA part
-constrsetfileset name—Constraint fileset to use
-include_dirspaths—Verilog include search dirs
-genericname=value—Override Verilog parameters / VHDL generics
-verilog_definemacro[=text]—Define Verilog macros
-modedefault/out_of_contextdefaultOOC mode: no IO buffers
Special Modes
OptionValuesDefaultEffect
-rtlflag—Elaborate only, don't synthesize
-lintflag—Run RTL Linter only (see section below)
-incremental_modedefault/quick/offdefaultIncremental synthesis mode
-sfcuflag—Single-file compilation unit mode
Debug & Performance
OptionValuesDefaultEffect
-debug_logflag—Extra debug info in log
-assertflag—Enable VHDL assertions
Multi-Threading
tcl
set_param general.maxThreads 8 ;# 1-8 threads for synthesis

Strategy Decision Table

Use `-directive <strategy>` to select:

ScenarioStrategyKey Effect
Default / first trydefaultBalanced optimization
Fast iteration / debugruntimeoptimizedFewer optimizations, faster runtime
Resource-constrainedAreaOptimized_highForce ternary adders, includes AreaMapLargeShiftRegToBRAM + AreaMultThresholdDSP
Resource-constrained (moderate)AreaOptimized_mediumArea-optimized MUX, ternary adders, lower multiplier→DSP threshold
Timing-criticalPerformanceOptimizedLogic level reduction at expense of area
Routing congestionAlternateRoutabilityLess MUXF/CARRY usage for better routability
Minimum areaLogicCompactionCompact CARRY+LUT into fewer SLICEs (negative timing impact)
DSP-heavyAreaMultThresholdDSPLower threshold for multiplier→DSP inference
Carry-chain issuesFewerCarryChainsHigher threshold to use LUTs instead of carry chains
Large shift registersAreaMapLargeShiftRegToBRAMImplement large shift regs in Block RAM

Note: Directive values are case-sensitive in v2025.2. Use exactly as shown above.


Synthesis Attributes Quick Reference (by scenario)

Preventing Optimization
AttributeValuesWhereWhen to Use
DONT_TOUCHTRUE/FALSERTL+XDCPrevent optimization AND preserve through P&R. Strongest protection
KEEPTRUE/FALSERTL onlyPrevent signal absorption into LUTs. Synthesis-only, NOT forwarded to P&R
KEEP_HIERARCHYTRUE/SOFT/FALSERTL+XDCSOFT (recommended): allow constant propagation. TRUE: block all cross-boundary optimization
Resource Inference Control
AttributeValuesWhereWhen to Use
RAM_STYLEblock/distributed/registers/ultra/mixed/autoRTL+XDCForce specific RAM implementation
ROM_STYLEblock/distributed/ultraRTL+XDCForce specific ROM implementation
USE_DSPyes/no/logic/simdRTL+XDCForce/prevent DSP block usage. logic=XOR→DSP, simd=SIMD mode
SHREG_EXTRACTyes/noRTL+XDCEnable/disable SRL inference
SRL_STYLEregister/srl/srl_reg/reg_srl/reg_srl_reg/blockRTL+XDCSpecific SRL implementation
RAM_DECOMPpower/areaRTL+XDCRAM split: power = address decode (saves power), area = smallest
CASCADE_HEIGHTinteger (0=disable)RTL+XDCBRAM/URAM cascade chain length (UltraScale+ only)
RW_ADDR_COLLISIONauto/yes/noRTL onlyRead-write collision handling
Timing Optimization
AttributeValuesWhereWhen to Use
RETIMING_FORWARDinteger (0=off)RTL+XDCMove register forward through logic
RETIMING_BACKWARDinteger (0=off)RTL+XDCMove register backward through logic
CRITICAL_SIG_OPTtrue/falseRTL+XDCShannon decomposition on critical feedback loops. Trades area for timing
MAX_FANOUTinteger (-1=no limit)RTL+XDCFanout limit → triggers register replication. Best on local signals only
Debug
AttributeValuesWhereWhen to Use
MARK_DEBUGTRUE/FALSERTL+XDCMark nets for ILA debug probing
ASYNC_REGTRUE/FALSERTL+XDCMark CDC synchronizer registers
FSM
AttributeValuesWhereWhen to Use
FSM_ENCODINGone_hot/sequential/gray/johnson/user_encoding/noneRTL+XDCOverride FSM encoding
FSM_SAFE_STATEauto_safe_state/reset_state/power_on_state/default_stateRTL+XDCAdd invalid state recovery logic
IO & Clock
AttributeValuesWhereWhen to Use
IOBTRUE/FALSERTL onlyPack register into IOB
IO_BUFFER_TYPENONERTL onlyDisable automatic IO buffer insertion
CLOCK_BUFFER_TYPEBUFG/BUFH/BUFIO/BUFMR/BUFR/noneRTL+XDCSpecify clock buffer type
GATED_CLOCKyesRTL+XDCMark signal as clock for gated clock conversion
Enable & Reset
AttributeValuesWhereWhen to Use
DIRECT_ENABLEyesRTL+XDCForce signal to CE pin of register
DIRECT_RESETyesRTL+XDCForce signal to reset pin of register
EXTRACT_ENABLEyes/noRTL+XDCControl enable extraction to CE pin
EXTRACT_RESETyes/noRTL+XDCControl reset extraction (sync reset only)
DSP Folding
AttributeValuesWhereWhen to Use
DSP_FOLDINGyes/noRTL onlyFold two MAC structures into one DSP
DSP_FOLDING_FASTCLOCKyes/noRTL onlyDesignate fast clock port for DSP folding
Verilog Case Control
AttributeValuesWhereWhen to Use
FULL_CASE(presence)RTL onlyAll case values covered — suppress latch inference
PARALLEL_CASE(presence)RTL onlyBuild as parallel if-elsif, no priority
Other
AttributeValuesWhereWhen to Use
BLACK_BOX(presence)RTL onlyForce module to black box
TRANSLATE_OFF/ONcomment-basedRTL onlyExclude code from synthesis

Block-Level Synthesis (BLOCK_SYNTH)

Apply per-instance synthesis settings via XDC:

tcl
set_property BLOCK_SYNTH.<option> <value> [get_cells <instance>]
OptionTypeValuesDescription
STRATEGYSTRINGDEFAULT/AREA_OPTIMIZED/ALTERNATE_ROUTABILITY/PERFORMANCE_OPTIMIZEDPer-instance strategy
RETIMINGINT0/1Enable/disable retiming
ADDER_THRESHOLDINT4-128Adder size → CARRY chain threshold
COMPARATOR_THRESHOLDINT4-128Comparator size → CARRY chain threshold
SHREG_MIN_SIZEINT3-32SRL inference threshold
FSM_EXTRACTIONSTRINGOFF/ONE_HOT/SEQUENTIAL/GRAY/JOHNSON/AUTOFSM encoding
LUT_COMBININGINT0/1Enable/disable LUT combining
CONTROL_SET_THRESHOLDINT0-128Control set optimization threshold
MAX_LUT_INPUTINT4-64=no LUT5/6, 5=no LUT6, 6=all
MUXF_MAPPINGINT0/1Enable/disable MUXF7/F8/F9
KEEP_EQUIVALENT_REGISTERINT0/1Merge or retain equivalent registers
PRESERVE_BOUNDARYINTanyMark hierarchy as changing (for incremental)
LOGIC_COMPACTIONINT1Compact CARRY+LUT into fewer SLICEs
SRL_STYLESTRINGREGISTER/SRL/SRL_REG/REG_SRL/REG_SRL_REGSRL implementation

Note: BLOCK_SYNTH hardens the instance hierarchy. Use only where needed.


OOC (Out-of-Context) Synthesis

When to use: Large IP modules, 3rd-party netlists, modules that rarely change.

tcl
# Non-Project Mode
synth_design -top <module> -part <part> -mode out_of_context
# Project Mode: right-click module → Set As Out-of-Context for Synthesis

Key rules:

  • OOC modules are synthesized independently, treated as black boxes in top-level synthesis
  • No IO buffers are created
  • Incremental synthesis is NOT supported for OOC runs
  • Do NOT use OOC if module has AMD IP in lower levels
  • Do NOT use OOC if module ports use user-defined types

Incremental Synthesis

Detects RTL changes and only re-synthesizes modified sections. Reduces runtime and QoR fluctuation.

tcl
# Project Mode: Settings → Synthesis → Incremental synthesis
# Non-Project Mode:
synth_design -top <top> -part <part> -incremental_mode default
ModeEffect
defaultFull incremental (detect + selective re-synthesis)
quickFaster, less thorough incremental
offFull re-synthesis

Note: Not supported for OOC runs.


RTL Linter

Pre-synthesis code quality check:

tcl
synth_design -lint -top <top> -part <part>
# For OOC runs:
synth_design -lint -srcset [get_property SRCSET [get_runs my_IP_core_synth_1]]

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
132
Repository forks
16
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/shinei-nouzen-arch/fpga-agent/vivado-synth/badge)](https://verified-skill.com/skills/shinei-nouzen-arch/fpga-agent/vivado-synth)

Something wrong with this skill or its page? Tell us.