Generate a Bitstream for an Artix-7 Board in Vivado
Build a bitstream for an Artix-7 board in Vivado 2024.1 with a non-project Tcl script, an XDC constraint file, implementation and write_bitstream.

Vivado is AMD's FPGA design suite, and it is required for most Xilinx 7-series work, including the Artix-7 on boards such as the Digilent Arty A7. It has a graphical interface, but the same steps run from a Tcl script in batch mode, which is better for reproducible builds. This post builds a bitstream for an Arty A7-35T, whose FPGA is the XC7A35T in a 324-ball CSG package, using the non-project flow in Vivado 2024.1. It covers the Verilog, the XDC constraint file, the Tcl script, what each Vivado stage reports and how to program the board. Part names and pins come from Digilent's published Arty A7 documentation and master XDC file, and you should verify them for your board.
The design
The Arty A7 has a 100 MHz oscillator and four green user LEDs. A counter drives a blinking pattern:
module blink_arty (
input wire CLK100MHZ,
output wire [3:0] led
);
reg [27:0] counter = 28'd0;
always @(posedge CLK100MHZ)
counter <= counter + 28'd1;
assign led = counter[27:24];
endmoduleAt 100 MHz, bit 27 of a free-running counter toggles every 2^27 cycles, which is about 1.34 seconds. Bits 24 to 27 give four LEDs counting in binary, with the fastest toggling every 2^24 cycles, about 0.17 seconds.
The constraint file
Vivado reads constraints from an XDC file, which is Tcl-based. It does the work of both the pin file and the timing file. For this board, the clock and the LEDs:
## Clock
set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports { CLK100MHZ }]
create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports { CLK100MHZ }]
## LEDs
set_property -dict { PACKAGE_PIN H5 IOSTANDARD LVCMOS33 } [get_ports { led[0] }]
set_property -dict { PACKAGE_PIN J5 IOSTANDARD LVCMOS33 } [get_ports { led[1] }]
set_property -dict { PACKAGE_PIN T9 IOSTANDARD LVCMOS33 } [get_ports { led[2] }]
set_property -dict { PACKAGE_PIN T10 IOSTANDARD LVCMOS33 } [get_ports { led[3] }]
## Configuration
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports { CLK100MHZ }] assigns a ball and a standard to a port. get_ports selects design ports by name, and braces around a name with brackets avoid Tcl treating the brackets as command substitution.
create_clock declares a clock on the port with a period of 10 ns, which is 100 MHz, and a waveform that rises at 0 and falls at 5 ns. This is a timing constraint, and without it Vivado has no target and reports that the clock is unconstrained. The -add option appends the definition without replacing others.
The last two properties tell the configuration logic the bank voltage convention, CFGBVS, and the configuration voltage. Without them, Vivado emits warnings and, at bitstream generation, a design rule check that stops the bitstream. They match the Arty A7's wiring, and Digilent's master XDC includes them.
The Tcl script
Vivado's non-project mode keeps everything in memory and writes only the outputs you request. A script runs the whole flow:
set part xc7a35ticsg324-1L
set top blink_arty
read_verilog blink_arty.v
read_xdc arty.xdc
synth_design -top $top -part $part
write_checkpoint -force post_synth.dcp
report_utilization -file post_synth_util.rpt
opt_design
place_design
phys_opt_design
route_design
write_checkpoint -force post_route.dcp
report_timing_summary -file post_route_timing.rpt
report_utilization -file post_route_util.rpt
report_drc -file post_route_drc.rpt
write_bitstream -force blink_arty.bitThe part string xc7a35ticsg324-1L names the chip: a 7-series Artix-7 with 35,000-class logic, speed grade -1L, in the CSG324 package, as used on Arty A7-35T boards. Check the board's documentation, because the 100T version has a different part.
Each command is a stage. read_verilog and read_xdc load sources. synth_design runs synthesis and produces the netlist in memory. opt_design runs logic optimisation, place_design places cells, phys_opt_design performs optional timing-driven optimisation after placement, and route_design routes. The reports are written to files so you can read them without the graphical interface. write_bitstream writes the .bit file.
Run it in batch mode from a shell:
vivado -mode batch -source build.tclVivado prints a long log. The lines that matter appear at the end of each stage. After routing, the log reports whether any nets failed to route or whether timing was met:
INFO: [Route 35-16] Router Completed Successfullyand the timing summary report states whether all user-specified timing constraints are met:
All user specified timing constraints are met.A failed constraint instead reports the worst negative slack, abbreviated WNS, which is negative when a path is too slow. The text of these messages is stable across recent versions, though message numbers differ, so search by phrase.
Reading the reports
The timing summary has a header table of worst slacks. The values are produced by the run and differ per build. What you read is the sign: positive setup slack means the path has margin, negative means failure. In the same file, the clock summary should list sys_clk_pin with period 10.000 ns and frequency 100.000 MHz, which confirms the constraint was applied.
The utilisation report counts slice LUTs, slice registers, block RAM and DSPs, with percentages of the device. A 28-bit counter uses 28 registers and roughly 28 LUTs for the incrementer, with the carry chain handled by CARRY4 cells, each covering four bits. That is a tiny fraction of the device, and the report shows the exact figures.
The DRC report lists design rule checks. Warnings about unconstrained ports or missing CFGBVS appear here, and errors in this report stop write_bitstream.
Programming the board
With the board connected over USB, the Hardware Manager programs it, and a Tcl script can do it without the GUI:
open_hw_manager
connect_hw_server
open_hw_target
set dev [lindex [get_hw_devices xc7a35t_0] 0]
current_hw_device $dev
set_property PROGRAM.FILE blink_arty.bit $dev
program_hw_devices $dev
close_hw_managerThis loads the bitstream into the FPGA's configuration SRAM, and it is lost at power-off. To keep the design across power cycles, write it to the board's SPI flash, which needs a configuration memory device definition and a second command, program_hw_cfgmem, with a .bin or .mcs file produced by write_cfgmem. That is more involved, so do the quick SRAM load while developing.
Alternatively, the open openFPGALoader tool programs Xilinx boards without Vivado: openFPGALoader -b arty blink_arty.bit loads the SRAM, and -f writes the flash.
Differences from the open flow
Vivado does the same job as Yosys and nextpnr in the same order, with a few differences. Its synthesis and implementation are timing-driven by default and take more time and memory. Constraints go in a Tcl-based XDC file with powerful selectors, instead of separate pin and frequency options. It reports every stage in files you can query. It also knows the full device: clocking primitives, block RAM and DSP slices, high-speed transceivers and the hard memory controller, so features that are out of reach of the open tools work here. The price is size, installation time and a licence. The WebPACK or Standard edition of Vivado supports the Arty A7-35T part without a paid licence. Check AMD's current device support list, as licence coverage changes between releases.
Common problems
**
[Place 30-574]or a similar error about a clock on a non-clock-capable pin.** Vivado wants clocks on clock-capable pins. The board's designer placed the oscillator correctly, so this usually means a wrong pin number.**
[DRC NSTD-1]for unspecified I/O standards.** A port has noIOSTANDARD. Add it in the XDC file.**
[DRC UCIO-1]for unconstrained logical ports.** A port has noPACKAGE_PIN. Either assign one or, for a quick test, allow it withset_property SEVERITY {Warning} [get_drc_checks UCIO-1], which should not stay in a real design.Timing not met. Open the post-route timing report and read the worst path.
The board does not program. Check the cable, the driver installation and that Hardware Manager sees the device
xc7a35t_0.


