Return to previous page Advance to next page

Using Global Clock Buffers


For designs with global signals, use global clock buffers to take advantage of the low-skew, high-drive capabilities of the dedicated global buffer tree of the target device. Your synthesis tool automatically inserts a clock buffer whenever an input signal drives a clock signal or whenever an internal clock signal reaches a certain fanout. The Xilinx implementation software automatically selects the clock buffer that is appropriate for your specified design architecture.

Some synthesis tools also limit global buffer insertions to match the number of buffers available on the device. Refer to your synthesis tool documentation for detailed information.

You can instantiate the clock buffers if your design requires a special architecture-specific buffer or if you want to specify how the clock buffer resources should be allocated.

Table 5-1 summarizes global buffer (BUFG) resources in Virtex, Virtex-E, Virtex-II, Virtex-II Pro, and Spartan-II devices.
Table 5-1 Global Buffer Resources
Buffer Type
Virtex
Virtex-E
Virtex-II/II Pro
Spartan-II
BUFG
4
4
N/A
4
BUFGMUX
N/A
N/A
16
N/A

Virtex/E/II/II Pro, and Spartan-II devices include two tiers of global routing resources referred to as primary global and secondary local clock routing resources.

Note In Virtex-II/II Pro, BUFG is available for instantiation, but will be implemented with BUFGMUX.

Inserting Clock Buffers

Many synthesis tools automatically insert a global buffer (BUFG) when an input port drives a register's clock pin or when an internal clock signal reaches a certain fanout. A BUFGP (an IBUFG-BUFG connection) is inserted for the external clock whereas a BUFG is inserted for an internal clock. Most synthesis tools will also allow you to control BUFG insertions manually if you have more clock pins than the available BUFGs resources.

FPGA Express will infer up to four clock buffers for pure clock nets. FPGA Express will not infer a BUFG on a clock line that only drives one flip-flop.You can also instantiate clock buffers or assign them via the Express Constraints Editor.

Note Synthesis tools currently insert simple clock buffers, BUFGs, for all Virtex/E/II/II Pro and Spartan-II designs. For Virtex-II/II Pro , some tools provide an attribute to use BUFGMUX as an enabled clock buffer. To use BUFGMUX as a real clock multiplexer in Virtex-II/II Pro, it must be instantiated.

LeonardoSpectrum will force clock signals to global buffers when the resources are available. The best way to control unnecessary BUFG insertions is to turn off global buffer insertion, then use the buffer_sig attribute to push BUFGs onto the desired signals. By doing this the user will not have to instantiate any BUFG components. As long as "chip" options is used to optimize the IBUFs, they will be auto-inserted for the input.

The following is a syntax example of the buffer_sig attribute.

set_attribute -port clk1 -name buffer_sig -value BUFG 
set_attribute -port clk2 -name buffer_sig -value BUFG 

Synplify will assign a BUFG to any input signal that directly drives a clock. The maximum number of global buffers is defined as 4. Auto-insertion of the BUFG for internal clocks occur with a fanout threshold of 16 loads. To turn off automatic clock buffers insertion, use the syn_noclockbuf attribute. This attribute can be applied to the entire module/architecture or a specific signal. To change the maximum number of global buffer insertion, you may set an attribute in the .sdc file as follows.

define_global_attribute xc_global buffers (8) 

XST will assign a BUFG to any input signal that directly drives a clock. The default number of global buffers for the Virtex, Virtex-E, Virtex-II, Virtex-II Pro, and Spartan-II device is 4. Starting with software release 4.1i the default number of global buffer insertions for the Virtex-II device is 8. The number of BUFGs used for a design can be modified by the XST option bufg by either inserting it in HDL, the XST constraints file or via a command line switch. To specify a clock port on a black box as a clock, the 'sig_isclock' attribute can be specified either through HDL or the XST constraints file.

Refer to your synthesis tool documentation for a detailed syntax information.

Instantiating Global Clock Buffers

You can instantiate global buffers in your code as described in this section.

Instantiating Buffers Driven from a Port

You can instantiate global buffers and connect them to high-fanout ports in your code rather than inferring them from a synthesis tool script. If you do instantiate global buffers, verify that the Pad parameter is not specified for the buffer.

In Virtex/E/II and Spartan-II designs, synthesis tools insert BUFGP for clock signals which access a dedicated clock pin. To have a regular input pin to a clock buffer connection, you must use an IBUF-BUFG connection. This is done by instantiating BUFG after disabling global buffer insertion.

Instantiating Buffers Driven from Internal Logic

Some synthesis tools require you to instantiate a global buffer in your code to use the dedicated routing resource if a high-fanout signal is sourced from internal flip-flops or logic (such as a clock divider or multiplexed clock), or if a clock is driven from a non-dedicated I/O pin. The following VHDL and Verilog examples instantiate a BUFG for an internal multiplexed clock circuit.

Note Synplify will infer a global buffer for a signal that has 16 or greater fanouts.


Return to previous page Advance to next page