二、輸出(并-轉(zhuǎn)-串)邏輯資源
7系列設(shè)備中的OSERDESE2是專用的 并-轉(zhuǎn)-串 轉(zhuǎn)換器,使用特定的時(shí)鐘和邏輯資源設(shè)計(jì)來使得高速源同步接口實(shí)現(xiàn)變得容易。每個(gè)OSERDESE2模塊都包含一個(gè)特定的串化器(serializer)用于數(shù)據(jù)和三態(tài)(3-state)控制。數(shù)據(jù)和3態(tài)(3-state)串化器都可以配置成SDR和DDR模式。數(shù)據(jù)串行化的位寬可以達(dá)到8:1(如果使用原語模塊級(jí)聯(lián),則可以到10:1和14:1)。3態(tài)的串行化最高可達(dá)14:1,有一個(gè)專用的DDR3模式可用于支持高速內(nèi)存應(yīng)用程序。
The OSERDESE2 in 7 series devices is a dedicated parallel-to-serial converter with specific
clocking and logic resources designed to facilitate the implementation of high-speed
source-synchronous interfaces. Every OSERDESE2 module includes a dedicated serializer
for data and 3-state control. Both data and 3-state serializers can be configured in SDR and
DDR mode. Data serialization can be up to 8:1 (10:1 and 14:1 if using OSERDESE2 Width
Expansion). 3-state serialization can be up to 14:1. There is a dedicated DDR3 mode to
support high-speed memory applications.
Figure 3-13 shows a block diagram of the OSERDESE2, highlighting all the major
components and features of the block.
下圖是 OSERDESE2的模塊圖,顯示了主要的組成部件和特性:
![pYYBAGIMohSAekpWAADG7NZR0NU226.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMohSAekpWAADG7NZR0NU226.png)
2.1數(shù)據(jù)(并-轉(zhuǎn)-串)轉(zhuǎn)換器
在一個(gè)OSERDESE2塊中,數(shù)據(jù)(并-轉(zhuǎn)-串)轉(zhuǎn)換器接收2-8位的并行數(shù)據(jù) (14位:使用OSERDESE2 位寬擴(kuò)展),將數(shù)據(jù)串行化,然后通過OQ輸出接口傳遞給IOB。并行數(shù)據(jù)串行化是從從最低位開始。也就是說:從D1管腳輸入的數(shù)據(jù)最先傳輸?shù)絆Q輸出管腳。數(shù)據(jù)并串轉(zhuǎn)換器支持兩種模式:SDR和DDR。
OSERDESE2數(shù)據(jù)比率轉(zhuǎn)換使用兩個(gè)時(shí)鐘:CLK 和 CLKDIV。CLK是高度的串行時(shí)鐘,CLKDIV是分頻并行時(shí)鐘。CLK和CLKDIV必須相位對(duì)齊。
在使用之前,必須對(duì)OSERDESE2進(jìn)行復(fù)位操作。OSERDESE2包含一個(gè)內(nèi)部計(jì)數(shù)器用來控制數(shù)據(jù)流。如果沒有成功對(duì)復(fù)位同步(CLKDIV時(shí)鐘域)釋放,則會(huì)引起非預(yù)期的輸出。
The data parallel-to-serial converter in one OSERDESE2 blocks receives two to eight bits of
parallel data from the fabric (14 bits if using OSERDESE2 Width Expansion), serializes the
data, and presents it to the IOB via the OQ outputs. Parallel data is serialized from lowest
order data input pin to highest (i.e., data on the D1 input pin is the first bit transmitted at
the OQ pins). The data parallel-to-serial converter is available in two modes: single-data
rate (SDR) and double-data rate (DDR).
The OSERDESE2 uses two clocks, CLK and CLKDIV, for data rate conversion. CLK is the
high-speed serial clock, CLKDIV is the divided parallel clock. CLK and CLKDIV must be
phase aligned. See OSERDESE2 Clocking Methods.
Prior to use, a reset must be applied to the OSERDESE2. The OSERDESE2 contains an
internal counter that controls dataflow. Failure to synchronize the reset deassertion with
the CLKDIV will produce an unexpected output
2.2 3-State Parallel-to-Serial Conversion
除了數(shù)據(jù)的并串轉(zhuǎn)換之外,一個(gè)OSERDESE2模塊還包含了一個(gè)3態(tài)并串轉(zhuǎn)換器。與數(shù)據(jù)的并串轉(zhuǎn)換不同,3態(tài)轉(zhuǎn)換器串行化最高只能支持4位的并行3態(tài)信號(hào)。3態(tài)轉(zhuǎn)換器不能進(jìn)行級(jí)聯(lián)。
In addition to parallel-to-serial conversion of data, an OSERDESE2 module also contains a
parallel-to-serial converter for 3-state control of the IOB. Unlike data conversion, the
3-state converter can only serialize up to four bits of parallel 3-state signals. The 3-state
converter cannot be cascaded.
三、OSERDESE2原語介紹
3.1 OSERDESE2框圖
![poYBAGIMohaAQ9_cAAD4qNA6nKY323.png](https://file.elecfans.com/web2/M00/30/CB/poYBAGIMohaAQ9_cAAD4qNA6nKY323.png)
3.2 OSERDESE2例化
掃一眼,直接看3.3
OSERDESE2 #(
.DATA_RATE_OQ("DDR"), // DDR, SDR
.DATA_RATE_TQ("DDR"), // DDR, BUF, SDR
.DATA_WIDTH(4), // Parallel data width (2-8,10,14)
.INIT_OQ(1'b0), // Initial value of OQ output (1'b0,1'b1)
.INIT_TQ(1'b0), // Initial value of TQ output (1'b0,1'b1)
.SERDES_MODE("MASTER"), // MASTER, SLAVE
.SRVAL_OQ(1'b0), // OQ output value when SR is used (1'b0,1'b1)
.SRVAL_TQ(1'b0), // TQ output value when SR is used (1'b0,1'b1)
.TBYTE_CTL("FALSE"), // Enable tristate byte operation (FALSE, TRUE)
.TBYTE_SRC("FALSE"), // Tristate byte source (FALSE, TRUE)
.TRISTATE_WIDTH(4) // 3-state converter width (1,4)
)
OSERDESE2_inst (
.OFB(OFB), // 1-bit output: Feedback path for data
.OQ(OQ), // 1-bit output: Data path output
// SHIFTOUT1 / SHIFTOUT2: 1-bit (each) output: Data output expansion (1-bit each)
.SHIFTOUT1(SHIFTOUT1),
.SHIFTOUT2(SHIFTOUT2),
.TBYTEOUT(TBYTEOUT), // 1-bit output: Byte group tristate
.TFB(TFB), // 1-bit output: 3-state control
.TQ(TQ), // 1-bit output: 3-state control
.CLK(CLK), // 1-bit input: High speed clock
.CLKDIV(CLKDIV), // 1-bit input: Divided clock
// D1 - D8: 1-bit (each) input: Parallel data inputs (1-bit each)
.D1(D1),
.D2(D2),
.D3(D3),
.D4(D4),
.D5(D5),
.D6(D6),
.D7(D7),
.D8(D8),
.OCE(OCE), // 1-bit input: Output data clock enable
.RST(RST), // 1-bit input: Reset
// SHIFTIN1 / SHIFTIN2: 1-bit (each) input: Data input expansion (1-bit each)
.SHIFTIN1(SHIFTIN1),
.SHIFTIN2(SHIFTIN2),
// T1 - T4: 1-bit (each) input: Parallel 3-state inputs
.T1(T1),
.T2(T2),
.T3(T3),
.T4(T4),
.TBYTEIN(TBYTEIN), // 1-bit input: Byte group tristate
.TCE(TCE) // 1-bit input: 3-state clock enable
);
3.3 OSERDESE2端口
為了便于查看,后文對(duì)端口的進(jìn)一步介紹一并寫到表格。
![poYBAGIMohiAUDMIAAITqpKKNg0517.jpg](https://file.elecfans.com/web2/M00/30/CB/poYBAGIMohiAUDMIAAITqpKKNg0517.jpg)
下圖為原文:
![pYYBAGIMoh2AT2yQAAL23OKY9Kg856.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMoh2AT2yQAAL23OKY9Kg856.png)
3.4 OSERDESE2屬性
![poYBAGIMoiCAJ_RgAAFgLhGOnkg380.jpg](https://file.elecfans.com/web2/M00/30/CB/poYBAGIMoiCAJ_RgAAFgLhGOnkg380.jpg)
下圖為原文:
![pYYBAGIMoiOAB6kOAAI_GiTzLWI853.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMoiOAB6kOAAI_GiTzLWI853.png)
下圖為OSERDESE2屬性組合:
![poYBAGIMoiSABW1rAABE7VyZGLc757.png](https://file.elecfans.com/web2/M00/30/CB/poYBAGIMoiSABW1rAABE7VyZGLc757.png)
3.5 OSERDESE2時(shí)鐘
在并轉(zhuǎn)串過程中,CLK和 CLKDIV的相位關(guān)系是非常重要的。理想情況下,CLK和 CLKDIV是相位對(duì)齊的。在FPGA中有好幾種時(shí)鐘設(shè)置方式來幫助設(shè)計(jì)滿足CLK和 CLKDIV的相位關(guān)系要求。對(duì)于OSERDESE2來說,只有一種是有效的:
- CLK由BUFIO驅(qū)動(dòng),CLKDIV由BUFR驅(qū)動(dòng)
- CLK和CLKDIV由同一個(gè)MMCM或PLL驅(qū)動(dòng) (常用)
當(dāng)使用一個(gè)MMCM來驅(qū)動(dòng)OSERDESE2的CLK 和CLKDIV時(shí),buffer類型不能混用。舉個(gè)栗子:如果CLK由BUFG驅(qū)動(dòng),CLKDIV也必須由BUFG驅(qū)動(dòng)。
The phase relationship of CLK and CLKDIV is important in the parallel-to-serial
conversion process. CLK and CLKDIV are (ideally) phase-aligned within a tolerance.
There are several clocking arrangements within the FPGA to help the design meet the
phase relationship requirements of CLK and CLKDIV. The only valid clocking
arrangements for the OSERDESE2 are:
? CLK driven by BUFIO, CLKDIV driven by BUFR
? CLK and CLKDIV driven by CLKOUT[0:6] of the same MMCM or PLL
When using a MMCM to drive the CLK and CLKDIV of the OSERDESE2 the buffer types
suppling the OSERDESE2 can not be mixed. For example, if CLK is driven by a BUFG,
CLKDIV must be driven by a BUFG as well.
3.6 OSERDESE2級(jí)聯(lián)
用兩個(gè)OSERDESE2模塊級(jí)聯(lián)來構(gòu)造一個(gè)超過8:1的并-串轉(zhuǎn)換器。通過連接主OSERDESE2的SHIFTIN端口和從OSERDESE2的SHIFTOUT端口,轉(zhuǎn)換器可以擴(kuò)展為10:1和14:1(僅DDR模式)。(注:筆者感覺有點(diǎn)懵,曾在項(xiàng)目用主的SHIFTOUT端口接到從的SHIFTIN端口 = =||)。對(duì)于差分輸出,連接_P管腳。當(dāng)輸出不是差分信號(hào)時(shí),從OSERDESE2的輸出buffer是不允許的,位寬擴(kuò)展無法使用。
當(dāng)使用補(bǔ)充的signal-ended標(biāo)準(zhǔn)時(shí)(也就是說DIFF_HSTL和DIFF_SSTL),位寬擴(kuò)展可能不能使用。這是因?yàn)樵贗/O塊的OLOGICE2/3塊全部用作補(bǔ)充的signal-ended標(biāo)準(zhǔn)來傳輸這兩個(gè)補(bǔ)充的信號(hào),沒有多余的OLOOGICE2/3資源可用來位寬擴(kuò)展。
The OSERDESE2 modules be used to build a parallel-to-serial converter larger than 8:1. In
every I/O tile there are two OSERDESE2 modules; one master and one slave. By
connecting the SHIFTIN ports of the master OSERDESE2 to the SHIFTOUT ports of the
slave OSERDESE2, the parallel-to-serial converter can be expanded to up to 10:1 and 14:1
(DDR mode only). For a differential output, the master OSERDESE2 must be on the
positive (_P pin) side of the differential output pair. When the output is not differential, the
output buffer associated with the slave OSERDESE2 is not available and width expansion
cannot be used.
When using complementary single-ended standards (e.g., DIFF_HSTL and DIFF_SSTL),
width expansion might not be used. This is because both OLOGICE2/3 blocks in an I/O
tile are used by the complementary single-ended standards to transmit the two
complementary signals, leaving no OLOGICE2/3 blocks available for width expansion
purposes.
下圖是10:1DDR模式并-串轉(zhuǎn)換器,使用一主一從兩個(gè)OSERDESE2模塊。在這個(gè)例子中中從OSERDES端口D3-D4被用作并行數(shù)據(jù)接口的最后兩位。
![pYYBAGIMoieAFs29AAENdLub_bk445.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMoieAFs29AAENdLub_bk445.png)
注:位寬擴(kuò)展時(shí),從OSERDESE2模塊使用端口D3-D8; D1-D2不用。
3.7 OSERDESE2潛伏期
之前文章也介紹過:
Delay:延遲,延遲時(shí)間后才發(fā)生
Latency:潛伏,潛伏時(shí)間后信號(hào)才穩(wěn)定
OSERDESE2塊輸入到輸出的潛伏期由DATA_RATE和DATA_WIDTH屬性決定。潛伏期被定義為事件a到事件b的一段時(shí)間:(a)當(dāng)CLKDIV的上升沿,D1-D8的數(shù)據(jù)輸入到OSERDESE2,(b)當(dāng)串行數(shù)據(jù)流的第一位出現(xiàn)在OQ。簡(jiǎn)單解釋下:就是輸入到輸出的時(shí)間。下圖整理了不同OSERDESE2潛伏期的值。
The input to output latencies of OSERDESE2 blocks depend on the DATA_RATE and
DATA_WIDTH attributes. Latency is defined as a period of time between the following
two events: (a) when the rising edge of CLKDIV clocks the data at inputs D1–D8 into the
OSERDESE2, and (b) when the first bit of the serial stream appears at OQ. Table 3-11
summarizes the various OSERDESE2 latency values.
![pYYBAGIMoimAZCnjAAFDhphQa50531.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMoimAZCnjAAFDhphQa50531.png)
四、圖解OSERDES串行化數(shù)據(jù)流
4.1 案例①SDR模式
2:1 SDR 數(shù)據(jù)串行化的時(shí)序圖:
![poYBAGIMoiuAV_CaAADhxULQYeI084.png](https://file.elecfans.com/web2/M00/30/CB/poYBAGIMoiuAV_CaAADhxULQYeI084.png)
Clock Event 1:
在CLKDIV的上升沿,由FPGA邏輯驅(qū)動(dòng)的字AB給到OSERDESE2的輸入端D1和D2(經(jīng)過一些傳播延遲)
Clock Event 2 :
在CLKDIV的上升沿,由D1和D2輸入的字AB被采樣到OSERDES。
Clock Event 3
在AB被采樣進(jìn)入OSERDESE2后,數(shù)據(jù)A在OQ輸出一個(gè)CLK時(shí)鐘周期。這個(gè)潛伏期由3.7章節(jié)的表格查詢可知。
4.2 案例②DDR模式
8:1 DDR數(shù)據(jù)串行化時(shí)序圖:
![pYYBAGIMoi6ACK1mAAFbyKtgZ7s480.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMoi6ACK1mAAFbyKtgZ7s480.png)
Clock Event 1:
在CLKDIV的時(shí)鐘上升沿,由FPGA邏輯驅(qū)動(dòng)的字ABCDEFGH給到OSERDESE2的輸入管腳D1-D8。
Clock Event 2:
在CLKDIV的時(shí)鐘上升沿,D1-D8輸入的ABCDEFGH被采樣進(jìn)OSERDESE2。
Clock Event 3:
在ABCDEFGH被采樣進(jìn)OSERDESE2后,數(shù)據(jù)位A首先在OQ輸出4個(gè)CLK周期。這個(gè)潛伏期由3.7章節(jié)的表格查詢可知。
D1-D8輸入的第二個(gè)字 IJKLMNOP 被采樣進(jìn)入 OSERDESE2 。
Clock Event 4
在Clock Events 3和4之間, ABCDEFGH整個(gè)字被連續(xù)的傳輸?shù)絆Q,,一個(gè)完整的8位傳輸在一個(gè)CLKDIV周期內(nèi)完成。
4.3 案例③3-state
The operation of a 3-state controller:
![pYYBAGIMojKAXcBYAAEAopB6ghs172.png](https://file.elecfans.com/web2/M00/30/D2/pYYBAGIMojKAXcBYAAEAopB6ghs172.png)
Clock Event 1
T1,T2,T4被驅(qū)動(dòng)位低電平來釋放3-態(tài)條件。OSERDESE2的T1-T4和D1-D4串行化路徑是完全相同的(包括潛伏期),所以EFGH和0010在Clock Event 1是始終對(duì)齊的。
Clock Event 2
在EFGH被采樣進(jìn)入OSERDESE2后,數(shù)據(jù)位E出現(xiàn)在OQ一個(gè)CLK周期,潛伏期可看3.7。
在0010被采樣進(jìn)入OSERDESE2 3態(tài)塊后,三態(tài)輸入的0在TQ輸出一個(gè)CLK周期,潛伏期可看3.7。
看圖得知:OBUFT的輸出端O輸出EFH,對(duì)應(yīng)三態(tài)輸入0釋放掉三態(tài)條件時(shí)候的D1-D4輸入,并且輸出在TQ為低時(shí)有效。(這是筆者根據(jù)上圖猜測(cè)的結(jié)論,實(shí)際上筆者還沒使用過 = =)
五、后記
最后的I/O FIFO先略過。
加上前兩篇,《UG471-SelectIO》(1-3) 基本翻譯完成。
算是小小的成就,給自己打Call~
如有錯(cuò)誤,歡迎拍磚~
但是,本系列UG471文章還停留在翻譯介紹階段,下一步我會(huì)將其整理到LVDS接口的使用中進(jìn)行介紹。未完待續(xù)。
審核編輯:符乾江
-
FPGA
+關(guān)注
關(guān)注
1631文章
21806瀏覽量
606612 -
Xilinx
+關(guān)注
關(guān)注
71文章
2172瀏覽量
122313
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
AI助力實(shí)時(shí)翻譯耳機(jī)
![AI助力實(shí)時(shí)<b class='flag-5'>翻譯</b>耳機(jī)](https://file1.elecfans.com/web3/M00/07/0F/wKgZPGeTBkSAKN_4AAAG9-FEI2g792.png)
調(diào)試Xilinx Zynq + ADS58C48,ADC使用的是LVDS模式,ADC不能正常工作怎么解決?
MSP430F471x3,MSP430F471x6, MSP430F471x7混合信號(hào)微控制器數(shù)據(jù)表
![MSP430F<b class='flag-5'>471x3</b>,MSP430F<b class='flag-5'>471</b>x6, MSP430F<b class='flag-5'>471</b>x7混合信號(hào)微控制器數(shù)據(jù)表](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
IPC-6012E CN 2020中文 CN 剛性印制板的鑒定及性能規(guī)范
FPGA | Xilinx ISE14.7 LVDS應(yīng)用
Xilinx ISE14.7 LVDS的應(yīng)用
![<b class='flag-5'>Xilinx</b> ISE14.7 LVDS的應(yīng)用](https://file1.elecfans.com/web2/M00/E1/E4/wKgZomY58jWAUBNbAAAxSgxBW_4570.png)
W5500V1.3中文數(shù)據(jù)手冊(cè)
Xilinx SelectIO資源內(nèi)部的IDELAYE2應(yīng)用介紹
![<b class='flag-5'>Xilinx</b> SelectIO資源內(nèi)部的IDELAYE<b class='flag-5'>2</b>應(yīng)用<b class='flag-5'>介紹</b>](https://file1.elecfans.com/web2/M00/DB/DC/wKgaomYrIXOAWSeKAAAMaeHDBsc496.jpg)
評(píng)論