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
| Option |
Values |
Default |
Effect |
-flatten_hierarchy |
none/full/rebuilt |
rebuilt |
none: preserve RTL hierarchy. full: flatten to top only. rebuilt: flatten then rebuild similar hierarchy (best QoR + readability) |
Timing Optimization
| Option |
Values |
Default |
Effect |
-directive |
See strategy table below |
Default |
Selects preconfigured optimization strategy |
-global_retiming |
auto/on/off |
auto |
Register balancing across combinational logic. Auto = on for Versal, off for others |
-no_timing_driven |
flag |
— |
Disables timing-driven synthesis (faster, worse timing) |
Resource Control
| Option |
Values |
Default |
Effect |
-max_bram |
integer |
-1 (max) |
Limit Block RAM usage |
-max_uram |
integer |
-1 (max) |
Limit UltraRAM usage (UltraScale+) |
-max_dsp |
integer |
-1 (max) |
Limit DSP block usage |
-shreg_min_size |
integer |
3 |
Min chain length for SRL inference |
-srl_style |
register/rl/srl_reg/reg_srl/reg_srl_reg |
— |
Global SRL implementation style |
-cascade_dsp |
auto/tree/force |
auto |
DSP adder chain implementation |
-max_bram_cascade_height |
integer |
-1 |
Max BRAM cascade depth |
-max_uram_cascade_height |
integer |
-1 |
Max UltraRAM cascade depth |
-no_srlextract |
flag |
— |
Disable all SRL extraction |
-no_lc |
flag |
— |
Disable LUT combining |
FSM & Logic
| Option |
Values |
Default |
Effect |
-fsm_extraction |
auto/one_hot/sequential/gray/johnson/user_encoding/off |
auto |
FSM encoding strategy |
-resource_sharing |
auto/on/off |
auto |
Arithmetic operator sharing |
-keep_equivalent_registers |
flag |
off |
Prevent merging of equivalent registers |
-control_set_opt_threshold |
auto/integer/0 |
auto |
Fanout threshold for control set optimization. 0 = disable |
Clock & IO
| Option |
Values |
Default |
Effect |
-bufg |
integer |
12 |
Max global clock buffers to infer |
-gated_clock_conversion |
off/on/auto |
off |
Convert gated clocks to enables |
Design Entry
| Option |
Values |
Default |
Effect |
-top |
module name |
— |
Top module |
-part |
part number |
— |
Target FPGA part |
-constrset |
fileset name |
— |
Constraint fileset to use |
-include_dirs |
paths |
— |
Verilog include search dirs |
-generic |
name=value |
— |
Override Verilog parameters / VHDL generics |
-verilog_define |
macro[=text] |
— |
Define Verilog macros |
-mode |
default/out_of_context |
default |
OOC mode: no IO buffers |
Special Modes
| Option |
Values |
Default |
Effect |
-rtl |
flag |
— |
Elaborate only, don't synthesize |
-lint |
flag |
— |
Run RTL Linter only (see section below) |
-incremental_mode |
default/quick/off |
default |
Incremental synthesis mode |
-sfcu |
flag |
— |
Single-file compilation unit mode |
Debug & Performance
| Option |
Values |
Default |
Effect |
-debug_log |
flag |
— |
Extra debug info in log |
-assert |
flag |
— |
Enable VHDL assertions |
Multi-Threading
set_param general.maxThreads 8 ;# 1-8 threads for synthesis
Strategy Decision Table
Use -directive <strategy> to select:
| Scenario |
Strategy |
Key Effect |
| Default / first try |
default |
Balanced optimization |
| Fast iteration / debug |
runtimeoptimized |
Fewer optimizations, faster runtime |
| Resource-constrained |
AreaOptimized_high |
Force ternary adders, includes AreaMapLargeShiftRegToBRAM + AreaMultThresholdDSP |
| Resource-constrained (moderate) |
AreaOptimized_medium |
Area-optimized MUX, ternary adders, lower multiplier→DSP threshold |
| Timing-critical |
PerformanceOptimized |
Logic level reduction at expense of area |
| Routing congestion |
AlternateRoutability |
Less MUXF/CARRY usage for better routability |
| Minimum area |
LogicCompaction |
Compact CARRY+LUT into fewer SLICEs (negative timing impact) |
| DSP-heavy |
AreaMultThresholdDSP |
Lower threshold for multiplier→DSP inference |
| Carry-chain issues |
FewerCarryChains |
Higher threshold to use LUTs instead of carry chains |
| Large shift registers |
AreaMapLargeShiftRegToBRAM |
Implement 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
| Attribute |
Values |
Where |
When to Use |
DONT_TOUCH |
TRUE/FALSE |
RTL+XDC |
Prevent optimization AND preserve through P&R. Strongest protection |
KEEP |
TRUE/FALSE |
RTL only |
Prevent signal absorption into LUTs. Synthesis-only, NOT forwarded to P&R |
KEEP_HIERARCHY |
TRUE/SOFT/FALSE |
RTL+XDC |
SOFT (recommended): allow constant propagation. TRUE: block all cross-boundary optimization |
Resource Inference Control
| Attribute |
Values |
Where |
When to Use |
RAM_STYLE |
block/distributed/registers/ultra/mixed/auto |
RTL+XDC |
Force specific RAM implementation |
ROM_STYLE |
block/distributed/ultra |
RTL+XDC |
Force specific ROM implementation |
USE_DSP |
yes/no/logic/simd |
RTL+XDC |
Force/prevent DSP block usage. logic=XOR→DSP, simd=SIMD mode |
SHREG_EXTRACT |
yes/no |
RTL+XDC |
Enable/disable SRL inference |
SRL_STYLE |
register/srl/srl_reg/reg_srl/reg_srl_reg/block |
RTL+XDC |
Specific SRL implementation |
RAM_DECOMP |
power/area |
RTL+XDC |
RAM split: power = address decode (saves power), area = smallest |
CASCADE_HEIGHT |
integer (0=disable) |
RTL+XDC |
BRAM/URAM cascade chain length (UltraScale+ only) |
RW_ADDR_COLLISION |
auto/yes/no |
RTL only |
Read-write collision handling |
Timing Optimization
| Attribute |
Values |
Where |
When to Use |
RETIMING_FORWARD |
integer (0=off) |
RTL+XDC |
Move register forward through logic |
RETIMING_BACKWARD |
integer (0=off) |
RTL+XDC |
Move register backward through logic |
CRITICAL_SIG_OPT |
true/false |
RTL+XDC |
Shannon decomposition on critical feedback loops. Trades area for timing |
MAX_FANOUT |
integer (-1=no limit) |
RTL+XDC |
Fanout limit → triggers register replication. Best on local signals only |
Debug
| Attribute |
Values |
Where |
When to Use |
MARK_DEBUG |
TRUE/FALSE |
RTL+XDC |
Mark nets for ILA debug probing |
ASYNC_REG |
TRUE/FALSE |
RTL+XDC |
Mark CDC synchronizer registers |
FSM
| Attribute |
Values |
Where |
When to Use |
FSM_ENCODING |
one_hot/sequential/gray/johnson/user_encoding/none |
RTL+XDC |
Override FSM encoding |
FSM_SAFE_STATE |
auto_safe_state/reset_state/power_on_state/default_state |
RTL+XDC |
Add invalid state recovery logic |
IO & Clock
| Attribute |
Values |
Where |
When to Use |
IOB |
TRUE/FALSE |
RTL only |
Pack register into IOB |
IO_BUFFER_TYPE |
NONE |
RTL only |
Disable automatic IO buffer insertion |
CLOCK_BUFFER_TYPE |
BUFG/BUFH/BUFIO/BUFMR/BUFR/none |
RTL+XDC |
Specify clock buffer type |
GATED_CLOCK |
yes |
RTL+XDC |
Mark signal as clock for gated clock conversion |
Enable & Reset
| Attribute |
Values |
Where |
When to Use |
DIRECT_ENABLE |
yes |
RTL+XDC |
Force signal to CE pin of register |
DIRECT_RESET |
yes |
RTL+XDC |
Force signal to reset pin of register |
EXTRACT_ENABLE |
yes/no |
RTL+XDC |
Control enable extraction to CE pin |
EXTRACT_RESET |
yes/no |
RTL+XDC |
Control reset extraction (sync reset only) |
DSP Folding
| Attribute |
Values |
Where |
When to Use |
DSP_FOLDING |
yes/no |
RTL only |
Fold two MAC structures into one DSP |
DSP_FOLDING_FASTCLOCK |
yes/no |
RTL only |
Designate fast clock port for DSP folding |
Verilog Case Control
| Attribute |
Values |
Where |
When to Use |
FULL_CASE |
(presence) |
RTL only |
All case values covered — suppress latch inference |
PARALLEL_CASE |
(presence) |
RTL only |
Build as parallel if-elsif, no priority |
Other
| Attribute |
Values |
Where |
When to Use |
BLACK_BOX |
(presence) |
RTL only |
Force module to black box |
TRANSLATE_OFF/ON |
comment-based |
RTL only |
Exclude code from synthesis |
Block-Level Synthesis (BLOCK_SYNTH)
Apply per-instance synthesis settings via XDC:
set_property BLOCK_SYNTH.<option> <value> [get_cells <instance>]
| Option |
Type |
Values |
Description |
| STRATEGY |
STRING |
DEFAULT/AREA_OPTIMIZED/ALTERNATE_ROUTABILITY/PERFORMANCE_OPTIMIZED |
Per-instance strategy |
| RETIMING |
INT |
0/1 |
Enable/disable retiming |
| ADDER_THRESHOLD |
INT |
4-128 |
Adder size → CARRY chain threshold |
| COMPARATOR_THRESHOLD |
INT |
4-128 |
Comparator size → CARRY chain threshold |
| SHREG_MIN_SIZE |
INT |
3-32 |
SRL inference threshold |
| FSM_EXTRACTION |
STRING |
OFF/ONE_HOT/SEQUENTIAL/GRAY/JOHNSON/AUTO |
FSM encoding |
| LUT_COMBINING |
INT |
0/1 |
Enable/disable LUT combining |
| CONTROL_SET_THRESHOLD |
INT |
0-128 |
Control set optimization threshold |
| MAX_LUT_INPUT |
INT |
4-6 |
4=no LUT5/6, 5=no LUT6, 6=all |
| MUXF_MAPPING |
INT |
0/1 |
Enable/disable MUXF7/F8/F9 |
| KEEP_EQUIVALENT_REGISTER |
INT |
0/1 |
Merge or retain equivalent registers |
| PRESERVE_BOUNDARY |
INT |
any |
Mark hierarchy as changing (for incremental) |
| LOGIC_COMPACTION |
INT |
1 |
Compact CARRY+LUT into fewer SLICEs |
| SRL_STYLE |
STRING |
REGISTER/SRL/SRL_REG/REG_SRL/REG_SRL_REG |
SRL 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.
# 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.
# Project Mode: Settings → Synthesis → Incremental synthesis
# Non-Project Mode:
synth_design -top <top> -part <part> -incremental_mode default
| Mode |
Effect |
default |
Full incremental (detect + selective re-synthesis) |
quick |
Faster, less thorough incremental |
off |
Full re-synthesis |
Note: Not supported for OOC runs.
RTL Linter
Pre-synthesis code quality check:
synth_design -lint -top <top> -part <part>
# For OOC runs:
synth_design -lint -srcset [get_property SRCSET [get_runs my_IP_core_synth_1]]
Key rules detected: latch inference (INFER-1), combinational loops (INFER-4), arithmetic overflow (ASSIGN-1), mixed clock edges (CLOCK-1), mixed async resets (RESET-1), unconnected ports (ASSIGN-12). See REFERENCE.md for complete rule table.
Waivers:
create_waiver -type LINT -id ASSIGN-1 -rtl_hierarchy x/y
write_waivers -type LINT -file waivers.tcl
Synthesis-Stage Constraints
Only these constraints are used during synthesis:
| Type |
Commands |
| Timing |
create_clock, create_generated_clock, set_input_delay, set_output_delay, set_false_path, set_multicycle_path, set_max_delay, set_clock_groups, set_clock_latency, set_disable_timing |
| Object Access |
all_clocks, all_inputs, all_outputs, get_cells, get_ports, get_clocks, get_nets, get_pins |
Important: Timing analysis on synthesized design uses estimated routing delays — only post-route timing is accurate.
Attribute Propagation Rules
- Placing attribute on a hierarchy affects only its boundary, NOT signals inside (except:
DSP_FOLDING, RAM_STYLE, ROM_STYLE, SHREG_EXTRACT, USE_DSP — these DO affect internal signals)
- If same attribute is set in both RTL and XDC with different values → XDC wins
KEEP must be set in RTL; XDC does not support it.
DONT_TOUCH supports both RTL and XDC. Set it in RTL when the object may be optimized away before XDC is read. For existing applicable cells or nets, XDC can set or override the property without requiring an RTL edit. Preserve the user's requested modification scope.
1---2name: vivado-synth3description: 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.4---5
6# Vivado Synthesis Decision Guide
7
8Based 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.
9
10## synth_design Complete Options
11
12### Hierarchy Control
13| Option | Values | Default | Effect |
14|--------|--------|---------|--------|
15| `-flatten_hierarchy` | none/full/rebuilt | rebuilt | **none**: preserve RTL hierarchy. **full**: flatten to top only. **rebuilt**: flatten then rebuild similar hierarchy (best QoR + readability) |
16
17### Timing Optimization
18| Option | Values | Default | Effect |
19|--------|--------|---------|--------|
20| `-directive` | See strategy table below | Default | Selects preconfigured optimization strategy |
21| `-global_retiming` | auto/on/off | auto | Register balancing across combinational logic. Auto = on for Versal, off for others |
22| `-no_timing_driven` | flag | — | Disables timing-driven synthesis (faster, worse timing) |
23
24### Resource Control
25| Option | Values | Default | Effect |
26|--------|--------|---------|--------|
27| `-max_bram` | integer | -1 (max) | Limit Block RAM usage |
28| `-max_uram` | integer | -1 (max) | Limit UltraRAM usage (UltraScale+) |
29| `-max_dsp` | integer | -1 (max) | Limit DSP block usage |
30| `-shreg_min_size` | integer | 3 | Min chain length for SRL inference |
31| `-srl_style` | register/rl/srl_reg/reg_srl/reg_srl_reg | — | Global SRL implementation style |
32| `-cascade_dsp` | auto/tree/force | auto | DSP adder chain implementation |
33| `-max_bram_cascade_height` | integer | -1 | Max BRAM cascade depth |
34| `-max_uram_cascade_height` | integer | -1 | Max UltraRAM cascade depth |
35| `-no_srlextract` | flag | — | Disable all SRL extraction |
36| `-no_lc` | flag | — | Disable LUT combining |
37
38### FSM & Logic
39| Option | Values | Default | Effect |
40|--------|--------|---------|--------|
41| `-fsm_extraction` | auto/one_hot/sequential/gray/johnson/user_encoding/off | auto | FSM encoding strategy |
42| `-resource_sharing` | auto/on/off | auto | Arithmetic operator sharing |
43| `-keep_equivalent_registers` | flag | off | Prevent merging of equivalent registers |
44| `-control_set_opt_threshold` | auto/integer/0 | auto | Fanout threshold for control set optimization. 0 = disable |
45
46### Clock & IO
47| Option | Values | Default | Effect |
48|--------|--------|---------|--------|
49| `-bufg` | integer | 12 | Max global clock buffers to infer |
50| `-gated_clock_conversion` | off/on/auto | off | Convert gated clocks to enables |
51
52### Design Entry
53| Option | Values | Default | Effect |
54|--------|--------|---------|--------|
55| `-top` | module name | — | Top module |
56| `-part` | part number | — | Target FPGA part |
57| `-constrset` | fileset name | — | Constraint fileset to use |
58| `-include_dirs` | paths | — | Verilog include search dirs |
59| `-generic` | name=value | — | Override Verilog parameters / VHDL generics |
60| `-verilog_define` | macro[=text] | — | Define Verilog macros |
61| `-mode` | default/out_of_context | default | OOC mode: no IO buffers |
62
63### Special Modes
64| Option | Values | Default | Effect |
65|--------|--------|---------|--------|
66| `-rtl` | flag | — | Elaborate only, don't synthesize |
67| `-lint` | flag | — | Run RTL Linter only (see section below) |
68| `-incremental_mode` | default/quick/off | default | Incremental synthesis mode |
69| `-sfcu` | flag | — | Single-file compilation unit mode |
70
71### Debug & Performance
72| Option | Values | Default | Effect |
73|--------|--------|---------|--------|
74| `-debug_log` | flag | — | Extra debug info in log |
75| `-assert` | flag | — | Enable VHDL assertions |
76
77### Multi-Threading
78```tcl
79set_param general.maxThreads 8 ;# 1-8 threads for synthesis
80```
81
82---
83
84## Strategy Decision Table
85
86**Use `-directive <strategy>` to select:**
87
88| Scenario | Strategy | Key Effect |
89|----------|----------|------------|
90| Default / first try | `default` | Balanced optimization |
91| Fast iteration / debug | `runtimeoptimized` | Fewer optimizations, faster runtime |
92| Resource-constrained | `AreaOptimized_high` | Force ternary adders, includes AreaMapLargeShiftRegToBRAM + AreaMultThresholdDSP |
93| Resource-constrained (moderate) | `AreaOptimized_medium` | Area-optimized MUX, ternary adders, lower multiplier→DSP threshold |
94| Timing-critical | `PerformanceOptimized` | Logic level reduction at expense of area |
95| Routing congestion | `AlternateRoutability` | Less MUXF/CARRY usage for better routability |
96| Minimum area | `LogicCompaction` | Compact CARRY+LUT into fewer SLICEs (negative timing impact) |
97| DSP-heavy | `AreaMultThresholdDSP` | Lower threshold for multiplier→DSP inference |
98| Carry-chain issues | `FewerCarryChains` | Higher threshold to use LUTs instead of carry chains |
99| Large shift registers | `AreaMapLargeShiftRegToBRAM` | Implement large shift regs in Block RAM |
100
101**Note:** Directive values are case-sensitive in v2025.2. Use exactly as shown above.
102
103---
104
105## Synthesis Attributes Quick Reference (by scenario)
106
107### Preventing Optimization
108| Attribute | Values | Where | When to Use |
109|-----------|--------|-------|-------------|
110| `DONT_TOUCH` | TRUE/FALSE | RTL+XDC | Prevent optimization AND preserve through P&R. Strongest protection |
111| `KEEP` | TRUE/FALSE | RTL only | Prevent signal absorption into LUTs. Synthesis-only, NOT forwarded to P&R |
112| `KEEP_HIERARCHY` | TRUE/SOFT/FALSE | RTL+XDC | **SOFT** (recommended): allow constant propagation. **TRUE**: block all cross-boundary optimization |
113
114### Resource Inference Control
115| Attribute | Values | Where | When to Use |
116|-----------|--------|-------|-------------|
117| `RAM_STYLE` | block/distributed/registers/ultra/mixed/auto | RTL+XDC | Force specific RAM implementation |
118| `ROM_STYLE` | block/distributed/ultra | RTL+XDC | Force specific ROM implementation |
119| `USE_DSP` | yes/no/logic/simd | RTL+XDC | Force/prevent DSP block usage. `logic`=XOR→DSP, `simd`=SIMD mode |
120| `SHREG_EXTRACT` | yes/no | RTL+XDC | Enable/disable SRL inference |
121| `SRL_STYLE` | register/srl/srl_reg/reg_srl/reg_srl_reg/block | RTL+XDC | Specific SRL implementation |
122| `RAM_DECOMP` | power/area | RTL+XDC | RAM split: `power` = address decode (saves power), `area` = smallest |
123| `CASCADE_HEIGHT` | integer (0=disable) | RTL+XDC | BRAM/URAM cascade chain length (UltraScale+ only) |
124| `RW_ADDR_COLLISION` | auto/yes/no | RTL only | Read-write collision handling |
125
126### Timing Optimization
127| Attribute | Values | Where | When to Use |
128|-----------|--------|-------|-------------|
129| `RETIMING_FORWARD` | integer (0=off) | RTL+XDC | Move register forward through logic |
130| `RETIMING_BACKWARD` | integer (0=off) | RTL+XDC | Move register backward through logic |
131| `CRITICAL_SIG_OPT` | true/false | RTL+XDC | Shannon decomposition on critical feedback loops. Trades area for timing |
132| `MAX_FANOUT` | integer (-1=no limit) | RTL+XDC | Fanout limit → triggers register replication. Best on local signals only |
133
134### Debug
135| Attribute | Values | Where | When to Use |
136|-----------|--------|-------|-------------|
137| `MARK_DEBUG` | TRUE/FALSE | RTL+XDC | Mark nets for ILA debug probing |
138| `ASYNC_REG` | TRUE/FALSE | RTL+XDC | Mark CDC synchronizer registers |
139
140### FSM
141| Attribute | Values | Where | When to Use |
142|-----------|--------|-------|-------------|
143| `FSM_ENCODING` | one_hot/sequential/gray/johnson/user_encoding/none | RTL+XDC | Override FSM encoding |
144| `FSM_SAFE_STATE` | auto_safe_state/reset_state/power_on_state/default_state | RTL+XDC | Add invalid state recovery logic |
145
146### IO & Clock
147| Attribute | Values | Where | When to Use |
148|-----------|--------|-------|-------------|
149| `IOB` | TRUE/FALSE | RTL only | Pack register into IOB |
150| `IO_BUFFER_TYPE` | NONE | RTL only | Disable automatic IO buffer insertion |
151| `CLOCK_BUFFER_TYPE` | BUFG/BUFH/BUFIO/BUFMR/BUFR/none | RTL+XDC | Specify clock buffer type |
152| `GATED_CLOCK` | yes | RTL+XDC | Mark signal as clock for gated clock conversion |
153
154### Enable & Reset
155| Attribute | Values | Where | When to Use |
156|-----------|--------|-------|-------------|
157| `DIRECT_ENABLE` | yes | RTL+XDC | Force signal to CE pin of register |
158| `DIRECT_RESET` | yes | RTL+XDC | Force signal to reset pin of register |
159| `EXTRACT_ENABLE` | yes/no | RTL+XDC | Control enable extraction to CE pin |
160| `EXTRACT_RESET` | yes/no | RTL+XDC | Control reset extraction (sync reset only) |
161
162### DSP Folding
163| Attribute | Values | Where | When to Use |
164|-----------|--------|-------|-------------|
165| `DSP_FOLDING` | yes/no | RTL only | Fold two MAC structures into one DSP |
166| `DSP_FOLDING_FASTCLOCK` | yes/no | RTL only | Designate fast clock port for DSP folding |
167
168### Verilog Case Control
169| Attribute | Values | Where | When to Use |
170|-----------|--------|-------|-------------|
171| `FULL_CASE` | (presence) | RTL only | All case values covered — suppress latch inference |
172| `PARALLEL_CASE` | (presence) | RTL only | Build as parallel if-elsif, no priority |
173
174### Other
175| Attribute | Values | Where | When to Use |
176|-----------|--------|-------|-------------|
177| `BLACK_BOX` | (presence) | RTL only | Force module to black box |
178| `TRANSLATE_OFF/ON` | comment-based | RTL only | Exclude code from synthesis |
179
180---
181
182## Block-Level Synthesis (BLOCK_SYNTH)
183
184Apply per-instance synthesis settings via XDC:
185```tcl
186set_property BLOCK_SYNTH.<option> <value> [get_cells <instance>]
187```
188
189| Option | Type | Values | Description |
190|--------|------|--------|-------------|
191| STRATEGY | STRING | DEFAULT/AREA_OPTIMIZED/ALTERNATE_ROUTABILITY/PERFORMANCE_OPTIMIZED | Per-instance strategy |
192| RETIMING | INT | 0/1 | Enable/disable retiming |
193| ADDER_THRESHOLD | INT | 4-128 | Adder size → CARRY chain threshold |
194| COMPARATOR_THRESHOLD | INT | 4-128 | Comparator size → CARRY chain threshold |
195| SHREG_MIN_SIZE | INT | 3-32 | SRL inference threshold |
196| FSM_EXTRACTION | STRING | OFF/ONE_HOT/SEQUENTIAL/GRAY/JOHNSON/AUTO | FSM encoding |
197| LUT_COMBINING | INT | 0/1 | Enable/disable LUT combining |
198| CONTROL_SET_THRESHOLD | INT | 0-128 | Control set optimization threshold |
199| MAX_LUT_INPUT | INT | 4-6 | 4=no LUT5/6, 5=no LUT6, 6=all |
200| MUXF_MAPPING | INT | 0/1 | Enable/disable MUXF7/F8/F9 |
201| KEEP_EQUIVALENT_REGISTER | INT | 0/1 | Merge or retain equivalent registers |
202| PRESERVE_BOUNDARY | INT | any | Mark hierarchy as changing (for incremental) |
203| LOGIC_COMPACTION | INT | 1 | Compact CARRY+LUT into fewer SLICEs |
204| SRL_STYLE | STRING | REGISTER/SRL/SRL_REG/REG_SRL/REG_SRL_REG | SRL implementation |
205
206**Note:** BLOCK_SYNTH hardens the instance hierarchy. Use only where needed.
207
208---
209
210## OOC (Out-of-Context) Synthesis
211
212**When to use:** Large IP modules, 3rd-party netlists, modules that rarely change.
213
214```tcl
215# Non-Project Mode
216synth_design -top <module> -part <part> -mode out_of_context
217
218# Project Mode: right-click module → Set As Out-of-Context for Synthesis
219```
220
221**Key rules:**
222- OOC modules are synthesized independently, treated as black boxes in top-level synthesis
223- No IO buffers are created
224- Incremental synthesis is NOT supported for OOC runs
225- Do NOT use OOC if module has AMD IP in lower levels
226- Do NOT use OOC if module ports use user-defined types
227
228---
229
230## Incremental Synthesis
231
232Detects RTL changes and only re-synthesizes modified sections. Reduces runtime and QoR fluctuation.
233
234```tcl
235# Project Mode: Settings → Synthesis → Incremental synthesis
236# Non-Project Mode:
237synth_design -top <top> -part <part> -incremental_mode default
238```
239
240| Mode | Effect |
241|------|--------|
242| `default` | Full incremental (detect + selective re-synthesis) |
243| `quick` | Faster, less thorough incremental |
244| `off` | Full re-synthesis |
245
246**Note:** Not supported for OOC runs.
247
248---
249
250## RTL Linter
251
252Pre-synthesis code quality check:
253```tcl
254synth_design -lint -top <top> -part <part>
255# For OOC runs:
256synth_design -lint -srcset [get_property SRCSET [get_runs my_IP_core_synth_1]]
257```
258
259**Key rules detected:** latch inference (INFER-1), combinational loops (INFER-4), arithmetic overflow (ASSIGN-1), mixed clock edges (CLOCK-1), mixed async resets (RESET-1), unconnected ports (ASSIGN-12). See REFERENCE.md for complete rule table.
260
261**Waivers:**
262```tcl
263create_waiver -type LINT -id ASSIGN-1 -rtl_hierarchy x/y
264write_waivers -type LINT -file waivers.tcl
265```
266
267---
268
269## Synthesis-Stage Constraints
270
271Only these constraints are used during synthesis:
272
273| Type | Commands |
274|------|----------|
275| Timing | `create_clock`, `create_generated_clock`, `set_input_delay`, `set_output_delay`, `set_false_path`, `set_multicycle_path`, `set_max_delay`, `set_clock_groups`, `set_clock_latency`, `set_disable_timing` |
276| Object Access | `all_clocks`, `all_inputs`, `all_outputs`, `get_cells`, `get_ports`, `get_clocks`, `get_nets`, `get_pins` |
277
278**Important:** Timing analysis on synthesized design uses estimated routing delays — only post-route timing is accurate.
279
280---
281
282## Attribute Propagation Rules
283
284- Placing attribute on a **hierarchy** affects only its boundary, NOT signals inside (except: `DSP_FOLDING`, `RAM_STYLE`, `ROM_STYLE`, `SHREG_EXTRACT`, `USE_DSP` — these DO affect internal signals)
285- If same attribute is set in both RTL and XDC with different values → **XDC wins**
286- `KEEP` must be set in RTL; XDC does not support it.
287- `DONT_TOUCH` supports both RTL and XDC. Set it in RTL when the object may be optimized away before XDC is read. For existing applicable cells or nets, XDC can set or override the property without requiring an RTL edit. Preserve the user's requested modification scope.