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

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 simulation strategy, flow selection, and debugging. This includes behavioral simulation (RTL functional verification), post-synthesis simulation (netlist functional verification), post-implementation timing simulation (SDF back-annotation, timing verification), Vivado Simulator xsim usage (xvlog/xvhdl/xelab/xsim three-step flow, launch_simulation Project Mode), third-party simulator integration (Questa/ModelSim/VCS/Xcelium/Riviera/ActiveHDL, compile_simlib, export_simulation), SAIF/VCD power simulation (open_saif/log_saif, open_vcd/log_vcd, read_saif + report_power), simulation netlist generation (write_verilog -mode funcsim/timesim, write_sdf), xsim debugging commands (add_force, add_wave, log_wave, add_bp, step, run, restart, get_objects, get_value), simulation properties and settings, glbl.v usage, or any question about choosing the right simulation approach for verification or power analysis.

Install

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

SKILL.md

Vivado Simulation Decision Guide

Based on UG900 (v2025.2). For complete command syntax and property tables, see REFERENCE.md.

Simulation Flow Overview

RTL + Testbench ──→ Behavioral Sim (functional verification, fastest)
↓ synth_design
Synthesized Netlist ──→ Post-Synth Sim (synthesis correctness, optional)
↓ place_design + route_design
Implemented Netlist + SDF ──→ Timing Sim (timing verification, slowest)
↓
SAIF/VCD ──→ report_power (power analysis)
Three Simulation Stages
StageInputPurposeSpeedAccuracy
Behavioral (RTL)RTL source + TBFunctional verificationFastestNo timing
Post-SynthesisSynth netlistVerify synthesis correctnessMediumFunctional only
Post-ImplementationImpl netlist + SDFTiming verificationSlowestFull timing
When to Use Each Stage
  • Daily development → Behavioral sim only
  • Functional mismatch after synthesis → Post-synthesis sim to isolate
  • Timing closure verification → Post-implementation timing sim
  • Power estimation → Any stage + SAIF dump → report_power

Vivado Simulator (xsim) — Project Mode

Recommended for interactive development with Vivado GUI/project.

tcl
# Configure simulation settings
set_property -name {xsim.simulate.runtime} -value {1000ns} -objects [get_filesets sim_1]
set_property -name {xsim.simulate.log_all_signals} -value {true} -objects [get_filesets sim_1]
set_property -name {xsim.elaborate.debug_level} -value {typical} -objects [get_filesets sim_1]
# Launch behavioral simulation
launch_simulation
run 100ns
close_sim
Simulation Modes in Project Mode
tcl
launch_simulation -mode behavioral ;# RTL sim (default)
launch_simulation -mode post-synthesis -type functional ;# Post-synth functional
launch_simulation -mode post-synthesis -type timing ;# Post-synth timing
launch_simulation -mode post-implementation -type functional ;# Post-impl functional
launch_simulation -mode post-implementation -type timing ;# Post-impl timing
Generate Scripts Without Running
tcl
launch_simulation -scripts_only ;# Generate sim scripts only
launch_simulation -scripts_only -absolute_path ;# With absolute paths

Vivado Simulator (xsim) — Non-Project Mode (Scripted)

Three-step flow: Compile → Elaborate → Simulate

tcl
# Step 1: Compile
exec xvlog design.v tb.v ;# Verilog
exec xvlog -sv design.sv ;# SystemVerilog
exec xvhdl design.vhd ;# VHDL
exec xvhdl -2008 design.vhd ;# VHDL-2008
# Step 2: Elaborate (link)
exec xelab -debug typical tb_top -s sim_snap
# Step 3: Simulate
exec xsim sim_snap -runall
exec xsim sim_snap -t run.tcl ;# With TCL script
exec xsim sim_snap -gui ;# With GUI
xelab Debug Level Decision
ScenarioOptionEffect
Waveform + breakpoints-debug typicalStandard debugging (recommended)
All signals observable-debug allFull visibility, slower elaboration
Fastest simulation-debug offNo debug, maximum speed
Line stepping-debug lineSource-level stepping
xelab Key Options
OptionPurpose
-d MACRO=valueVerilog \`define
-i <path>Verilog include search path
-L <library>Library search order
-s <snapshot>Output snapshot name
-timescale 1ns/1psDefault timescale
-mt <N>Multi-threading (2, 4, 8, off)
-transport_int_delaysTransport delay mode (timing sim)
-pulse_r 0 -pulse_e 0Pulse rejection/error (timing sim)
-sdfroot <instance>SDF annotation root instance
-generic_top <param=val>Override top-level generics (VHDL)
-override_timeunitOverride module timeunit with -timescale

xsim Runtime / Debug Commands

CommandDescription
run <time>Run simulation for specified time
run -allRun until $finish or breakpoint
restartReset simulation to time 0
step / step <N>Single-step (N statements)
current_timeReturn current simulation time
add_force <signal> <value> [<time> <value>...]Force signal value (supports sequences)
remove_forces <signal>Remove forced values
add_wave <signal>Add signal to waveform viewer
log_wave -r /Log all signals to WDB (waveform database)
add_bp <file> <line>Add breakpoint at source line
add_bp -condition {<expr>}Conditional breakpoint
remove_bp <id>Remove breakpoint
get_objects -r *List all objects (hierarchical)
get_value <signal>Read current signal value
set_value <signal> <value>Set signal value (non-persistent)
report_valuesReport all signal values
add_force Examples
tcl
# Constant force
add_force clk 0
# Clock pattern: 0 at 0ns, 1 at 5ns, repeat every 10ns
add_force clk {0} {1 5ns} -repeat_every 10ns
# Reset pulse: 1 at 0ns, 0 at 100ns
add_force rst {1} {0 100ns}
# With radix
add_force -radix hex data_in 0xFF

Timing Simulation (Post-Implementation)

Netlist Generation
tcl
# Post-synthesis functional netlist
open_checkpoint post_synth.dcp
write_verilog -mode funcsim -force post_synth_func.v
# Post-implementation timing netlist + SDF
open_checkpoint post_route.dcp
write_verilog -mode timesim -sdf_anno true -force post_impl_timing.v
write_sdf -force post_impl_timing.sdf
# VHDL variants
write_vhdl -mode funcsim -force post_synth_func.vhd
write_verilog -mode Options
ModePurpose
funcsimFunctional simulation netlist (no timing)
timesimTiming simulation netlist (with SDF annotation)
designDesign netlist (non-simulation)
synth_stubSynthesis stub for OOC
pin_planningI/O pin planning
SDF Back-Annotation

xelab handles SDF automatically when -sdf_anno true is used in write_verilog:

tcl
# xelab with timing simulation netlist
exec xelab -debug typical tb_top glbl \
-transport_int_delays \
-pulse_r 0 -pulse_e 0 \
-s timing_sim_snap

For manual SDF specification:

tcl
exec xelab -debug typical tb_top glbl \
-sdfroot /tb_top/uut \
-transport_int_delays \
-pulse_r 0 -pulse_e 0 \
-s timing_sim_snap
Process Corner Selection
tcl
write_sdf -process_corner fast -force fast_corner.sdf ;# Best case
write_sdf -process_corner slow -force slow_corner.sdf ;# Worst case (default)
glbl.v Requirements
Stageglbl.v Needed?Reason
BehavioralOnly if using MMCM/PLL/GT primitivesGlobal set/reset signals
Post-SynthesisYesNetlist references global signals
Timing SimRequiredSDF annotation depends on it

Path: $XILINX_VIVADO/data/verilog/src/glbl.v

tcl
# Include glbl.v in compilation and elaboration
exec xvlog $::env(XILINX_VIVADO)/data/verilog/src/glbl.v
exec xelab tb_top glbl -debug typical -s sim_snap

Third-Party Simulator Integration

Supported Simulators
Simulator-simulator valueVendor
Questa Advanced SimulatorquestaSiemens EDA
ModelSimmodelsimSiemens EDA
VCSvcsSynopsys
XceliumxceliumCadence
Riviera-PROrivieraAldec
Active-HDLactivehdlAldec
Step 1: Compile Simulation Libraries (One-Time)
tcl
compile_simlib -simulator questa -directory /path/to/compiled_libs \
-family all -language all
Step 2: Set Target Simulator
tcl
set_property target_simulator Questa [current_project]
# Or: ModelSim, VCS, Xcelium, Riviera, ActiveHDL
Step 3: Export Simulation Scripts
tcl
# Option A: export_simulation (flexible, supports Non-Project)
export_simulation -simulator questa -directory ./sim_scripts \
-use_ip_compiled_libs
# Option B: launch_simulation -scripts_only (Project Mode only)
launch_simulation -scripts_only
export_simulation vs launch_simulation -scripts_only
Featureexport_simulationlaunch_simulation -scripts_only
Custom output dirYesProject default
Non-Project ModeYesNo
IP compiled libs-use_ip_compiled_libsAutomatic
All sim typesYesCurrent mode only

SAIF/VCD Power Simulation

SAIF Collection (Recommended for report_power)
tcl
# During simulation (xsim)
open_saif /path/to/output.saif
log_saif [get_objects -r *] ;# Or specific hierarchy
run 1000ns
close_saif
# Power analysis
open_checkpoint post_route.dcp
read_saif /path/to/output.saif
report_power -file power.rpt
VCD Collection
tcl
open_vcd /path/to/output.vcd
log_vcd [get_objects -r *]
run 1000ns
close_vcd
SAIF vs VCD
FeatureSAIFVCD
File sizeSmall (statistical summary)Large (full waveform)
report_power supportDirect read_saifNeeds conversion
Best forVivado power analysisThird-party tools / waveform viewing
RecommendedYes (for power)When waveform needed

Simulation Properties Quick Reference

tcl
# Runtime
set_property -name {xsim.simulate.runtime} -value {1000ns} -objects [get_filesets sim_1]
# Log all signals
set_property -name {xsim.simulate.log_all_signals} -value {true} -objects [get_filesets sim_1]
# Debug level: typical | all | off
set_property -name {xsim.elaborate.debug_level} -value {typical} -objects [get_filesets sim_1]
# Additional xsim options
set_property -name {xsim.simulate.xsim.more_options} -value {-testplusarg FAST} -objects [get_filesets sim_1]
# Additional xelab options
set_property -name {xsim.elaborate.xelab.more_options} -value {-mt 4} -objects [get_filesets sim_1]
# Waveform database file
set_property -name {xsim.simulate.wdb} -value {my_sim.wdb} -objects [get_filesets sim_1]
# Target simulator
set_property target_simulator Questa [current_project]
Simulation Fileset Management
tcl
# Add simulation source
add_files -fileset sim_1 tb_top.v
# Set top module
set_property top tb_top [get_filesets sim_1]
# Set top library
set_property top_lib work [get_filesets sim_1]
# Create additional sim fileset
create_fileset -simset sim_2
Language Support
LanguageStandardxsim Support
VerilogIEEE 1364-2001/2005Full
SystemVerilogIEEE 1800-2012 (partial 2017)Full
VHDLIEEE 1076-1993/2008Full
Mixed LanguageVerilog/SV + VHDLSupported

Security

  • Security scanPassed, 100 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-sim/badge)](https://verified-skill.com/skills/shinei-nouzen-arch/fpga-agent/vivado-sim)

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