FPGA DEVICES · ENGINEERING · SOURCING Source-linked information. Clear project requirements.

Tutorials

Vivado create_clock Example: Define and Verify a Primary Clock

Published · Updated

For a 50 MHz clock entering a top-level port, the primary-clock period is 20 ns. The useful part of create_clock is not the arithmetic alone: the constraint must select the right object, describe the real waveform and appear in the report for the design you are checking.

Read the oscillator, then follow the schematic

An oscillator marking is a starting point. The photographed component is marked 48.0000 MHz, so its nominal period is about 20.833 ns. The 50 MHz example in this article intentionally uses a different frequency. Do not copy the example period just because the packages look similar.

The 48.0000 MHz marking on an Epson SG531H oscillator. Its period is about 20.833 ns; the code example uses a separate 50 MHz assumption.
The 48.0000 MHz marking on an Epson SG531H oscillator. Its period is about 20.833 ns; the code example uses a separate 50 MHz assumption. Photo: Raimond Spekking. Original image, CC BY-SA 4.0.

Follow the schematic from the actual clock source to the FPGA port. Check board revision, oscillator configuration, any mux or buffer, and the top-level signal name. A package pin assignment connects an RTL port to a ball; it does not define the timing clock. Keep those two responsibilities separate in the XDC.

Use the project and version information from your Vivado setup. For an Artix-7 design, record the exact selected part, such as XC7A100T-1CSG324C, rather than assuming that the development-board photograph identifies your project.

Create a primary clock on one known port

50 MHz example: 20 ns period, 10 ns high50 MHz example: 20 ns period, 10 nshighClock01020304050 MHz example; time in ns
Original explanatory diagram. Values and assumptions are stated in the text.
set p [get_ports {clk_in}]
if {[llength $p] != 1} {error "Expected exactly one clk_in port"}
create_clock -name sys_clk -period 20.000 -waveform {0.000 10.000} $p

Here, clk_in is the top-level port; sys_clk is the name assigned to the timing clock. The waveform specifies a rising edge at 0 ns and a falling edge at 10 ns within a 20 ns period. A 40% high duty cycle at the same frequency would instead have its falling edge at 8 ns. These are timing descriptions, not hardware oscillator settings.

The explicit object-count check prevents a misspelled port from silently becoming an empty selection. Use an exact port name for this example. If a design has multiple operating clocks on the same source, its constraints need a deliberate multi-clock model; repeatedly pasting create_clock is not a substitute for that model.

A clock derived through clocking hardware or fabric requires its relationship to the master clock to be preserved. Do not create an unrelated primary clock on every internal clock net merely to remove a warning. AMD UG903 distinguishes primary and generated clocks; review the generated-clock report before adding a definition that may already be supplied by the tool or IP.

Verify the period and the clocked endpoints

Check the clock beyond its nameCheck the clock beyond its name01Source port02Clock waveform03Register endpoints04External timing
Original explanatory diagram. Values and assumptions are stated in the text.
report_clocks -file clocks.rpt
check_timing -verbose -file check_timing.rpt
report_timing_summary -report_unconstrained -file timing-summary.rpt

Confirm the reported period, waveform and source object. Then inspect representative register endpoints that should use this clock. Finding sys_clk in report_clocks proves that a clock object exists; it does not prove that every intended register is reached or that external interfaces have a timing budget.

If no_clock or unconstrained-path warnings remain, use the coverage checklist. Once the clock is correct, define the external input and output delays for synchronous interfaces. A create_clock command alone cannot supply the timing behavior of the device at the other end of a trace.

The calculator converts MHz to ns and emits this narrow primary-clock example. It accepts a simple identifier, positive frequency and a duty cycle strictly between 0 and 100%. The generated command still needs the schematic and report checks above. It does not assign pins, create an MMCM, prove clock quality or close timing.

If the constraint is present but the board does not run, separate the timing model from physical bring-up using the programmed-but-not-working checklist.

Primary-clock example builder

Inputs and exported records stay in this browser. The check evaluates the assumptions you enter; it does not inspect your project files.

Use the worked values and equations above, or download the examples below. The interactive check requires JavaScript.

Watch the short clock period decreases as frequency increases sequence

The sequence visualizes the stated example. It is not a hardware capture. The static figures and text above contain the same explanation.

Clock period decreases as frequency increases

Download the XDC example and record your schematic reference before requesting a clock-constraint review.

Download the timing and RTL examples (ZIP) · Discuss this engineering task

The ZIP includes the clock and I/O examples, timing-audit commands, counter/latch/reset RTL and testbenches. Bring the relevant exported record to the enquiry; this page does not submit it automatically.

References and example scope

Documentation checked 16 November 2026. AMD examples use the cited 2024.1 documentation baseline. Vivado commands and vendor macros were not executed for this article. Counter, latch and illustrative reset tests were executed with Icarus Verilog; latch structure was checked with Yosys. See the included commands and validation record for the exact scope.

Back to Tutorials →

Related evidence and next tasks

Continue the task with the relevant source scope. These reading paths do not establish interchangeability or current supply.

Source addresses and citation trail

Full source addresses are retained below. Read each citation with its document revision, page, table and applicability conditions above.

  1. https://commons.wikimedia.org/wiki/File:Microspot_DC-300_-_board_1_-_Seiko_Epson_SG531H_48.0000M-8682.jpg
  2. https://creativecommons.org/licenses/by-sa/4.0
  3. https://docs.amd.com/r/2024.1-English/ug903-vivado-using-constraints/Primary-Clocks?contentId=aht30C8RzSIZ5WgKnjHyjQ
  4. https://docs.amd.com/r/2024.1-English/ug835-vivado-tcl-commands/report_timing_summary