【FPGA】Buffer專題介紹(一)
目錄
背景
BUFG
BUFGCE
BUFGCE_1
BUFGMUX and?BUFGMUX_1
BUFGP
BUFH
BUFIO2
BUFIO2FB
背景
在數據手冊 Spartan-6 Libraries Guide for HDL Designs中看到了有關buffer的一些介紹,這里就根據掌握簡記之。
從手冊的開頭聲明,或許可以看出看這些東西有什么用途:
This HDL guide is part of the ISE documentation collection. A separate version of this guide is available if you prefer to work with schematics.
This guide contains the following:
? Introduction.
? A list of design elements supported in this architecture, organized by functional categories.
? Individual descriptions of each available primitive.
此HDL指南是ISE文檔集的一部分。 如果您更喜歡使用原理圖,可以使用本指南的單獨版本。
本指南包含以下內容:
? 介紹。
?此體系結構中支持的設計元素列表,按功能類別組織。
?每個可用原語的單獨描述。
即便如此,即使我不喜歡用原理圖設計,了解這部分知識也大有裨益,作為一個硬件工作中,怎么能不了解FPGA設計中支持的設計元素呢?并且一些原語的描述對于我們了解它們在FPGA電路中的作用是很有幫助的。
在正式介紹本部分知識之前,還有必要掌握一些前提性的知識:
For each design element in this guide, Xilinx evaluates the four options and recommends what we believe is the best solution for you. The four options are:
? Instantiation - This component can be instantiated directly into the design. This method is useful if you want to control the exact placement of the individual blocks.
? Inference - This component can be inferred by most supported synthesis tools. You should use this method if you want to have complete flexibility and portability of the code to multiple architectures. Inference also gives the tools the ability to optimize for performance, area, or power, as specified by the user to the synthesis tool.
? Coregen & Wizards - This component can be used through Coregen or Wizards. You should use this method if you want to build large blocks of any FPGA primitive that cannot be inferred. When using this flow, you will have to re-generate your cores for each architecture that you are targeting.
? Macro Support - This component has a UniMacro that can be used. These components are in the UniMacro library in the Xilinx tool, and are used to instantiate primitives that are complex to instantiate by just using the primitives. The synthesis tools will automatically expand the unimacros to their underlying primitives.
對于本指南中的每個設計元素,Xilinx評估了四個選項,并推薦我們認為最適合您的解決方案。 四個選項是:
?實例化 - 可以將此組件直接實例化到設計中。 如果要控制各個塊的確切位置,此方法很有用。
buffer原語一般只需要實例化就可以用了。
?推理 - 大多數支持的綜合工具都可以推斷出該組件。 如果希望將代碼具有完全的靈活性和可移植性,則應使用此方法。 推理還使工具能夠根據用戶對綜合工具的指定來優化性能,面積或功率。
這個我還不是太了解,我們還是用到了再分析吧。
?Coregen和Wizards - 此組件可通過Coregen或Wizards使用。 如果要構建無法推斷的任何FPGA原語的大塊,則應使用此方法。 使用此方法時,您必須為要定位的每個體系結構重新生成核。
這個就比較常見了,就是產生一個IP核。
?宏支持 - 該組件具有可以使用的UniMacro。 這些組件位于Xilinx工具的UniMacro庫中,用于實例化一些很難僅通過原語實例化的原語。 綜合工具將自動將unimacros擴展到其底層原語。
宏就是賽靈思提供的一些硬件宏,例如MUX,RAM等。
好了,大致了解這么多就可以了,本博文是有關buffer的專題介紹,那就開始這塊內容了。
BUFG
全局時鐘Buffer
This design element is a high-fanout buffer that connects signals to the global routing resources for low skew distribution of the signal. BUFGs are typically used on clock nets.
該設計元素是一個高扇出緩沖器,它將信號連接到全局布線資源,以實現信號的低偏斜分布。 BUFG通常用于時鐘網。
可以使用實例化(Instantiation),Verilog HDL的實例化模板如下:
Verilog Instantiation Template
// BUFG: Global Clock Buffer (source by an internal signal)
// All FPGAs
// Xilinx HDL Libraries Guide, version 11.2
BUFG BUFG_inst (
.O(O), // Clock buffer output
.I(I) // Clock buffer input
);
// End of BUFG_inst instantiation
BUFGCE
帶有時鐘使能的全局時鐘Buffer
This design element is a global clock buffer with a single gated input. Its O output is "0" when clock enable (CE) is Low (inactive). When clock enable (CE) is High, the I input is transferred to the O output.
此設計元素是具有單門控輸入的全局時鐘緩沖器。 當時鐘使能(CE)為低(無效)時,其O輸出為“0”。 當時鐘使能(CE)為高電平時,I輸入被傳送到O輸出。
Verilog 例化模板如下:
Verilog Instantiation Template
// BUFGCE: Global Clock Buffer with Clock Enable (active high)
// Virtex-4/5/6, Spartan-3/3E/3A/6
// Xilinx HDL Libraries Guide, version 11.2
BUFGCE BUFGCE_inst (
.O(O), // Clock buffer output
.CE(CE), // Clock enable input
.I(I) // Clock buffer input
);
// End of BUFGCE_inst instantiation
BUFGCE_1
與BUFGCE的區別在于時鐘使能(CE)為0時,輸出狀態為1。
This design element is a multiplexed global clock buffer with a single gated input. Its O output is High (1) when clock enable (CE) is Low (inactive). When clock enable (CE) is High, the I input is transferred to the O output.
該設計元素是具有單門控輸入的多路復用全局時鐘緩沖器。 當時鐘使能(CE)為低(無效)時,其O輸出為高(1)。 當時鐘使能(CE)為高電平時,I輸入被傳送到O輸出。
Verilog HDL例化模板:
Verilog Instantiation Template
// BUFGCE_1: Global Clock Buffer with Clock Enable (active low)
// Virtex-4/5/6, Spartan-3/3E/3A/6
// Xilinx HDL Libraries Guide, version 11.2
BUFGCE_1 BUFGCE_1_inst (
.O(O), // Clock buffer output
.CE(CE), // Clock enable input
.I(I) // Clock buffer input
);
// End of BUFGCE_1_inst instantiation
BUFGMUX and?BUFGMUX_1
BUFGMUX is a multiplexed global clock buffer that can select between two input clocks: I0 and I1. When the select input (S) is Low, the signal on I0 is selected for output (O). When the select input (S) is High, the signal on I1 is selected for output.
BUFGMUX and BUFGMUX_1 are distinguished by the state the output assumes when that output switches between clocks in response to a change in its select input. BUGFMUX assumes output state 0 and BUFGMUX_1 assumes output state 1.
BUFGMUX是一個多路復用的全局時鐘緩沖器,可以在兩個輸入時鐘之間進行選擇:I0和I1。 當選擇輸入(S)為低時,選擇I0上的信號作為輸出(O)。 當選擇輸入(S)為高電平時,選擇I1上的信號進行輸出。
BUFGMUX和BUFGMUX_1的區別在于當輸出在時鐘之間切換以響應其選擇輸入的變化時輸出的狀態。 BUGFMUX假定輸出狀態為0,BUFGMUX_1為輸出狀態1。
Note: BUFGMUX guarantees that when S is toggled, the state of the output remains in the inactive state until the next active clock edge (either I0 or I1) occurs.
注意:BUFGMUX保證當S切換時,輸出狀態保持無效狀態,直到出現下一個有效時鐘沿(I0或I1)。
這個Available Attributes是什么意思呢?
字面上翻譯是可用的屬性:
CLK_SEL_TYPE:Specifies synchronous or asynchronous clock.
指定同步或異步時鐘。默認為同步時鐘(SYNC)。
DISABLE_VALUE:Specifies the state the output assumes when switching between inputs.
指定輸入之間切換時輸出的狀態。默認的是低電平(LOW)。
Verilog 例化模板:
Verilog Instantiation Template
// BUFGMUX: Global Clock Buffer 2-to-1 MUX
// Spartan-3/3E/3A/6
// Xilinx HDL Libraries Guide, version 11.2
BUFGMUX BUFGMUX_inst (
.O(O), // Clock MUX output
.I0(I0), // Clock0 input
.I1(I1), // Clock1 input
.S(S) // Clock select input
);
// End of BUFGMUX_inst instantiation
下面貼出BUFGMUX_1的真值表,BUFGMUX_1與BUFGMUX的區別僅僅是選擇輸入變化時,輸出的狀態,BUFGMUX_1輸出的狀態為1,BUFGMUX輸出的狀態為0,如下圖:
、
下面給出實例模板:
Verilog Instantiation Template
// BUFGMUX_1: Global Clock Buffer 2-to-1 MUX (inverted select)
// Spartan-3/3E/3A/6
// Xilinx HDL Libraries Guide, version 11.2
BUFGMUX_1 BUFGMUX_1_inst (
.O(O), // Clock MUX output
.I0(I0), // Clock0 input
.I1(I1), // Clock1 input
.S(S) // Clock select input
);
// End of BUFGMUX_1_inst instantiation
BUFGP
用于驅動時鐘或延長線的主要全局緩沖器
This design element is a primary global buffer that is used to distribute high fan-out clock or control signals throughout in FPGA devices. It is equivalent to an IBUFG driving a BUFG.
This design element provides direct access to Configurable Logic Block (CLB) and Input Output Block (IOB) clock pins and limited access to other CLB inputs. The input to a BUFGP comes only from a dedicated IOB.
Because of its structure, this element can always access a clock pin directly. However, it can access only one of the F3, G1, C3, or C1 pins, depending on the corner in which the BUFGP is placed. When the required pin cannot be accessed directly from the vertical line, PAR feeds the signal through another CLB and uses general purpose routing to access the load pin.
該設計元素是主要的全局緩沖區,用于在FPGA器件中分配高扇出時鐘或控制信號。 它相當于駕駛BUFG的IBUFG。
該設計元素提供對可配置邏輯塊(CLB)和輸入輸出塊(IOB)時鐘引腳的直接訪問以及對其他CLB輸入的有限訪問。 BUFGP的輸入僅來自專用IOB。
由于其結構,該元件可以始終直接訪問時鐘引腳。 但是,它只能訪問F3,G1,C3或C1引腳中的一個,具體取決于放置BUFGP的角落。 當無法直接從垂直線訪問所需的引腳時,PAR通過另一個CLB饋送信號,并使用通用布線(routing)訪問負載引腳。
BUFH
單個時鐘區域的時鐘緩沖器
The BUFH primitive is provided to allow instantiation capability to access the HCLK clock buffer resources.
提供BUFH原語以允許實例化能力訪問HCLK時鐘緩沖器資源。
Verilog Instantiation Template
// BUFH: Clock buffer for a single clocking region
// Virtex-6
// Xilinx HDL Language Template, version 11.4
BUFH BUFH_inst (
.O(O), // 1-bit The output to the BUFH
.I(I) // 1-bit The input to the BUFH
);
// End of BUFH_inst instantiation
BUFIO2
雙時鐘緩沖器和選通脈沖
This primitive takes a clock input and generates two clock outputs and a strobe pulse. The IOCLK output is a buffered version of the input clock. The period and duty cycle of the DIVCLK output is dependent on the attribute setting. If the DIVIDE_BYPASS is set to TRUE then the DIVCLK output is a buffered version of the input clock and the SERDESSTOBE output is driven to 1. If DIVIDE_BYPASS is set to FALSE then the DIVCLK and SERDESSTROBE output are divided input clock by the setting of the divide attribute.
該原語采用時鐘輸入并產生兩個時鐘輸出和一個選通脈沖。 IOCLK輸出是輸入時鐘的緩沖版本。 DIVCLK輸出的周期和占空比取決于屬性設置。 如果DIVIDE_BYPASS設置為TRUE,則DIVCLK輸出是輸入時鐘的緩沖版本,SERDESSTOBE輸出驅動為1.如果DIVIDE_BYPASS設置為FALSE,則DIVCLK和SERDESSTROBE輸出通過除法設置分頻輸入時鐘 屬性。
Verilog Instantiation Template
// BUFIO2: Dual Clock Buffer and Strobe Pulse
// Spartan-6
// Xilinx HDL Language Template, version 11.1
BUFIO2 #(
.DIVIDE(1), // Set the DIVCLK divider divide-by value.
.DIVIDE_BYPASS("TRUE"), // DIVCLK output sourced from Divider (FALSE) or from I input, bypassing Divider
// (TRUE).
.I_INVERT("FALSE"),
.USE_DOUBLER("FALSE")
)
BUFIO2_inst (
.DIVCLK(DIVCLK), // 1-bit Output divided clock
.IOCLK(IOCLK), // 1-bit Output clock
.SERDESSTROBE(SERDESSTROBE), // 1-bit Output SERDES strobe (Clock Enable)
.I(I) // 1-bit Clock input
);
// End of BUFIO2_inst instantiation
BUFIO2FB
This component is a simple buffer that has an attribute to determine the output delay. If DIVIDE_BYPASS is set to TRUE then the delays are equivalent to the BUFIO2 bypass delay. When set to FALSE, the delays are similar to the BUFIO2 DIVCLK outputs to keep the outputs of the BUFIO2 and BUFIO2FB phase aligned.
該組件是一個簡單的緩沖區,具有確定輸出延遲的屬性。 如果DIVIDE_BYPASS設置為TRUE,則延遲等同于BUFIO2旁路延遲。 設置為FALSE時,延遲類似于BUFIO2 DIVCLK輸出,以保持BUFIO2和BUFIO2FB相位的輸出對齊。
DIVIDE_BYPASS
DIVCLK output sourced from Divider (FALSE) or from I input, bypassing Divider (TRUE). If FALSE, also need to set CLKDIV DIVIDE value to 1.
DIVCLK輸出來自Divider(FALSE)或I輸入,繞過Divider(TRUE)。 如果為FALSE,還需要將CLKDIV DIVIDE值設置為1。
Verilog Instantiation Template
// BUFIO2FB: Feedback Clock Buffer
// Spartan-6
// Xilinx HDL Language Template, version 11.1
BUFIO2FB #(
.DIVIDE_BYPASS("TRUE") // DIVCLK output sourced from Divider (FALSE) or from I input, bypassing Divider
// (TRUE) Note: if FALSE, also need to set CLKDIV DIVIDE value to 1.
)
BUFIO2FB_inst (
.O(O), // 1-bit Output feedback clock
.I(I) // 1-bit Feedback clock input
);
// End of BUFIO2FB_inst instantiation
先記到這里,這種類似的Buffer太多了,下一篇繼續總結。
【FPGA】Buffer專題介紹(二)
FPGA 單片機
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。