Vivado TCL One-Liners

The console commands that save a GUI trip — batch builds, queries, debug.

Project-less batch build (the whole flow in one script)

# build.tcl - run with: vivado -mode batch -source build.tcl
read_verilog [glob src/*.v]
read_xdc constraints/top.xdc
synth_design -top top -part xc7a100tcsg324-1
opt_design
place_design
route_design
report_timing_summary -file timing.rpt
write_bitstream -force top.bit

Interrogating a design (post-synth or post-route)

report_utilization                       ;# LUT/FF/BRAM/DSP usage
report_utilization -hierarchical         ;# ...per module
report_timing -max_paths 10              ;# worst paths
report_timing_summary -delay_type min_max
report_clocks                            ;# what clocks exist
report_clock_interaction                 ;# cross-domain paths at a glance
report_cdc                               ;# CDC structural audit
check_timing                             ;# unconstrained endpoints
report_exceptions -ignored               ;# constraints matching nothing

Finding things (the get_* family)

get_ports clk*                           ;# ports by pattern
get_cells -hier *fifo*                   ;# cells anywhere in hierarchy
get_cells -hier -filter {REF_NAME =~ RAMB36*}   ;# all BRAMs
get_nets -of [get_pins mycell/Q]         ;# net driven by a pin
get_clocks -of [get_pins ff/C]           ;# which clock reaches this flop
llength [get_cells -hier -filter {PRIMITIVE_TYPE =~ *LUT*}]  ;# count LUTs

Programming and hardware manager

open_hw_manager
connect_hw_server
open_hw_target
program_hw_devices -bitstreams top.bit [current_hw_device]
refresh_hw_device [current_hw_device]    ;# re-read ILA cores

Quality of life

write_checkpoint -force post_route.dcp   ;# save implementation state
open_checkpoint post_route.dcp           ;# reopen later, no rebuild
set_param general.maxThreads 8           ;# use your cores
report_property [get_cells mycell]       ;# every property on an object
join [get_ports *] \n                    ;# readable list output

Habits worth forming