国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

FPGA面試筆記ea-ez

這篇具有很好參考價值的文章主要介紹了FPGA面試筆記ea-ez。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報違法"按鈕提交疑問。

ea Vivado中FIFO Generator核讀模式

FIFO Generator核有兩種讀模式:Standard FIFO(標(biāo)準(zhǔn)模式)、First Word Fall Through(FWFT模式)

FWFT模式類似于QuartusⅡ軟件中FIFO的超前輸出模式,沒有讀延時。

注:如果選擇標(biāo)準(zhǔn)模式,勾選Output Registers,會增加一個讀延時;但是選擇FWFT模式,勾選Output Registers,仍然沒有讀延時;

eb 散熱方式

  • 風(fēng)扇散熱:FPGA芯片溫度達(dá)到閾值時,拉高1個信號控制風(fēng)扇的供電,從而控制風(fēng)扇散熱。
  • 導(dǎo)冷散熱:在FPGA板卡上放一塊金屬片,金屬片與發(fā)熱嚴(yán)重芯片如FPGA主芯片之間加一層散熱硅脂,金屬片不會直接接觸板卡,不會造成短路。金屬片有鋁制和銅制兩種,銅制導(dǎo)熱能力更強(qiáng)。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

? 如果使用導(dǎo)冷散熱依舊發(fā)熱嚴(yán)重,可以再加上風(fēng)扇散熱。

在工作中,如果需要去測試一個程序,一定要詢問是否需要散熱,一旦芯片溫度過高,芯片就有報廢的可能。

ec 7 Series FPGAs and Zynq-7000 SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter

D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\FPGA官方文檔\ug480_7Series_XADC.pdf

Soc:片上操作系統(tǒng),ADC的位寬或精度為12,1 Mega Sample Per Second,模擬-數(shù)字轉(zhuǎn)換器。

Introduction And Overview :

  • The XADC is available in all Artix?-7, Kintex?-7, Virtex?-7, and Zynq?-7000 SoC devices. The XADC is also available in many, but not all Spartan?-7 devices.
  • The ADCs provide a general-purpose, high-precision analog interface for a range of applications.

XADC Block Diagram:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

The XADC also includes several on-chip sensors that support measurement of the on-chip power supply voltages and die temperature.

【die temperature】: 核心溫度(模具溫度)

The ADC conversion data is stored in dedicated registers called status registers.

【status register】: 狀態(tài)寄存器只能讀取

The ADC conversion data is stored in dedicated registers called status registers. These registers are accessible through the FPGA interconnect using a 16-bit synchronous read and write port called the dynamic reconfiguration port (DRP). ADC conversion data is also accessible through the JTAG TAP, either before (pre-configuration) or after configuration. For JTAG TAP, users are not required to instantiate the XADC because it is a dedicated interface that uses the existing FPGA JTAG infrastructure.

Instantiating the XADC:

if the XADC is not instantiated in a design, the only way to access this information is through the JTAG test access port (TAP). To allow access to the status registers (measurement results) from the FPGA logic, the XADC must be instantiated.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Port I/O Description
DI[15:0] Inputs Input data bus for the DRP.
DO[15:0] Outputs Output data bus for the DRP
DADDR[6:0] Input Address bus for the DRP.
DEN Input Enable signal for the DRP
DWE Input Write enable for the DRP
DCLK Input Clock input for the DRP
DRDY Output Data ready signal for the DRP
RESET Input Asynchronous reset signal for the XADC control logic.RESET will be deasserted synchronously to DCLK or the internal configuration clock when DCLK is stopped.(Active-High signal)

ADC Transfer Functions:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

The ADCs always produce a 16-bit conversion result. The 12-bit data correspond to the 12 MSBs (most significant) in the 16-bit status registers.

XADC Register Interface:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Name Address Description
Temperature 00h The result of the on-chip temperature sensor measurement is stored in this location. The data is MSB justified in the 16-bit register. The 12 MSBs correspond to the temperature sensor transfer function
VCCINT 01h The result of the on-chip VCCINT supply monitor measurement is stored at this location.
VCCAUX 02h The result of the on-chip VCCAUX data supply monitor measurement is stored at this location.

Conversion Formula:

Temperature(攝氏度) = (ADC Code * 503.975) / 4096 - 273.15 (The temperature sensor result can be found in status register 00h.)

Voltage = (ADC Code / 4096) * 3V

Single Channel Mode:

This mode is enabled when bits SEQ3 to SEQ0 in control register 41h are set to 0011

Dynamic Reconfiguration Port (DRP) Timing:

When the DEN is logic High, the DRP address (DADDR) and write enable (DWE) inputs are captured on the next rising edge of DCLK. DEN should only go high for one DCLK period.

For a write operation, the DWE signal is logic High and the DI bus and DRP address (DADDR) is captured on the next rising edge of DCLK. The DRDY signal goes logic High when the data has been successfully written to the DRP register. A new read or write operation cannot be initiated until the DRDY signal has gone low.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

ed XC7K325T-2FFG900C

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

需求:把電路板上的ADC、時鐘合成器以及DDR3調(diào)通即可

介紹:調(diào)試過一個XC7K325T的板卡,我先描述它的硬件板塊情況,首先板卡采用一個ADC板卡和一個FPGA板卡,這倆個板卡通過連接器進(jìn)行連接,主要的FPGA芯片是XC7K325T- 2FFG900C,它采用底板FPGA和4片DDR3,帶一個PCIE接口,其他就是電源下載器等等,采集卡的ADC型號是ADS42LB69,精度是16bit的,LVDS接口,使用兩片ADC,每片兩個通道,總共4個通道的采集卡,采集卡里面主要有時鐘合成器HMC830LP6GE,時鐘扇出器ADCLK948,時鐘扇出器就是一個時鐘二選一的,時鐘合成器里面有pll鎖相環(huán),可以通過小數(shù)模式的spi配置寄存器改變鎖相環(huán)的頻率,ADC的時鐘來源可以由外部時鐘和PLL鎖相環(huán)輸出的時鐘,鎖相環(huán)也需要提供一個基準(zhǔn)時鐘,也就是鑒相器的輸入時鐘,這個鑒相器的輸入時鐘,可以選擇板卡的125MHz晶振,也可以由外部時鐘源輸入來選擇,我們選擇的是ADCLK948,我們可以FPGA的引腳控制,接著就進(jìn)行配置。


ADCLK948

source:D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\XC7K325T-2FFG900C\ADCLK948.pdf

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

ADCLK948是在模擬設(shè)備上制造的超快時鐘扇出緩沖器。

”Low Voltage Positive Emitter-Coupled Logic“(低電壓正極發(fā)射耦合邏輯)這是一種高速差分信號傳輸標(biāo)準(zhǔn),通常用于時鐘分配和數(shù)據(jù)通信應(yīng)用。

8 LVPECL Outputs (ultrafast clock fanout buffer):

  1. 8路相同的時鐘差分輸出:在某些應(yīng)用中,可能需要將同一信號分發(fā)到多個設(shè)備或系統(tǒng)中。這樣可以確保所有設(shè)備都在相同的時鐘下工作,從而實(shí)現(xiàn)精確的時間同步。
  2. 理論上,一路時鐘輸出可以接到多個設(shè)備的時鐘輸入,然而,這樣做可能會引入一些問題:信號衰減、負(fù)載電容、時鐘偏移,使用像ADCLK948這樣的時鐘分配器可以解決上述存在的問題,使每個設(shè)備都可以得到一個高質(zhì)量、低抖動的時鐘信號。

PIN CONFIGURATION AND FUNCTION DESCRIPTIONS

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Pin No. Mnemonic Description
1 CLK0 Differential Input (Positive) 0.
2 CLK0# Differential Input (Negative) 0.
5 CLK1 Differential Input (Positive) 1.
6 CLK1# Differential Input (Negative) 1.
29,30 Q0#, Q0 Differential LVPECL Outputs
32 IN_SEL Input Select. Logic 0 selects CLK0 and CLK0# inputs. Logic 1 selects CLK1 and CLK1# inputs.

CLOCK INPUTS

The ADCLK948 is specifically designed to minimize added random jitter over a wide input slew rate range.

CLOCK INPUT SELECT (IN_SEL) SETTINGS

A Logic 0 on the IN_SEL pin selects the Input CLK0 and Input CLK0#. A Logic 1 on the IN_SEL pin selects Input CLK1 and Input CLK1#.


HMC830LP6GE

source:D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\XC7K325T-2FFG900C\HMC830\HMC830LP6GE.pdf

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

XREEP輸入為125MHz,經(jīng)過R DIVIDER需要小于100MHz(頻率為125 / R)。后續(xù)經(jīng)過閉環(huán)反饋給PD/FD,也就是說Fvco / N == 125MHz / R,其中Fvco <= 3000MHz。
最終輸出頻率RF(250MHz)由Fvco經(jīng)過分頻(VCO_Reg02h配置)得到,即Fvco / k。

VCO Auto-Calibration (AutoCal)

A simplified step tuned VCO is shown in Figure 6. A step tuned VCO is a VCO with a digitally selectable capacitor bank allowing the nominal center frequency of the VCO to be adjusted or ‘stepped’ by switching in/out VCO tank capacitors. A more detailed view of a typical VCO subsystem configuration is shown in Figure 7. A step tuned VCO allows the user to center the VCO on the required output frequency while keeping the varactor tuning voltage optimized near the mid-voltage tuning point of the PLL with Integrated VCO charge pump.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Fractional Frequency Tuning

fvco = (fxtal / R) * (Nint + Nfrac) = fint + ffrac

fout = fvco / k

parameters decription
fout is the output frequency after any potential dividers or doublers.
k is 0.5 for doubler, 1 for fundamental, or k = 1,2,4,6,…58,60,62 according to the VCO Subsystem type
Nint is the integer division ratio, Reg 03h, an integer number between 20 and 524,284
Nfrac is the fractional part, from 0.0 to 0.99999…,Nfrac=Reg 04h/224
R is the reference path division ratio, Reg 02h

Soft Reset & Power-On Reset

The PLL with Integrated VCO features a hardware Power on Reset (POR). All chip registers will be reset to default states approximately 250 μs after power up.

Writing Reg 00h[5]=1 (rst_swrst) performs a soft reset which initializes all PLL subsystem registers to their default values. It is not necessary to clear the rst_swrst bit after a soft reset. A soft reset does not clear the SPI mode of operation referred to in section 4.17.2. It should be noted that the VCO subsystem is not affected by the PLL soft reset, the VCO subsystem registers can only be reset by removing the power supply.

Write Timing Characteristics

  1. The Master (host) both asserts SEN (Serial Port Enable) and clears SDI to indicate a WRITE cycle,followed by a rising edge of SCK.
  2. The slave (synthesizer) reads SDI on the 1st rising edge of SCK after SEN. SDI low indi cates a Write cycle (/WR).
  3. Host places the six address bits on the next six falling edges of SCK, MSB first.
  4. Slave shifts the address bits in the next six rising edges of SCK (2-7).
  5. Host places the 24 data bits on the next 24 falling edges of SCK, MSB first.
  6. Slave shifts the data bits on the next 24 rising edges of SCK (8-31).
  7. The data is registered into the chip on the 32nd rising edge of SCK.
  8. SEN is cleared after a minimum delay of t5. This completes the write cycle.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)


ADS42LB69

source:D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\XC7K325T-2FFG900C\ADS42LB69\ADS42LB69.pdf

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

特性:(德州儀器:Texas Instruments)

  • 雙通道

  • 【14和16位分辨率】: 分辨率/位寬/精度

  • 【最大時鐘速率】:250MSPS: MegaSamples per second

  • 【雙倍數(shù)據(jù)速率 (DDR) 或四倍數(shù)據(jù)速率 (QDR) 低壓差分信號(LVDS)接口】: 源同步接口:輸出時鐘和數(shù)據(jù);

應(yīng)用:

  • 通信和線纜基礎(chǔ)設(shè)施
  • 雷達(dá)和智能天線陣列
  • 測試和測量儀器

說明:

ADS42LB49 和 ADS42LB69 是高線性度、雙通道、14 和 16 位250MSPS 模式轉(zhuǎn)換器 (ADC) 系列,支持 DDR 和QDR LVDS 輸出接口。已緩沖模擬輸入在大大減少采樣保持毛刺脈沖能量的同時,在寬頻率范圍內(nèi)提供統(tǒng)一的輸入阻抗

Pin Functions

I/O DESCRIPTION
INAP, INAM Differential analog input for channel A
CLKINP, CLKINM Differential clock input for ADC
RESET Hardware reset. Active high.
SCLK Serial interface clock input
SDATA Serial interface data input
SDOUT Serial interface data output
SEN Serial interface enable

DDR LVDS Output Timing Diagram

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

  1. 上升沿得到數(shù)據(jù)偶數(shù)位
  2. 下降沿得到數(shù)據(jù)奇數(shù)位
  3. 一個時鐘周期得到奇數(shù)位和偶數(shù)位(一個時鐘周期T可以得到一個完整的采樣點(diǎn))

LVDS Buffer Differential Termination

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Digital outputs are available in quadruple data rate (QDR) LVDS, and double data rate (DDR) LVDS formats,selectable by the DDR – QDR serial register bit.

DDR LVDS Outputs

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

源同步接口:芯片發(fā)送時鐘和數(shù)據(jù)給FPGA

系統(tǒng)同步:芯片僅提供數(shù)據(jù)給FPGA

Register Initialization

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Serial Register Write

The internal register of the ADS42LB49 and ADS42LB69 can be programmed following these steps:

  1. Drive SEN pin low
  2. Set the R/W bit to ‘0’ (bit A7 of the 8 bit address)
  3. Set bit A6 in the address field to ‘0’
  4. Initiate a serial interface cycle specifying the address of the register (A5 to A0) whose content must be
    written
  5. Write 8 bit data which is latched in on the rising edge of SCLK.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Typical Application

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

由于ADS42LBx9是一款雙通道設(shè)備,它可以用于雙通道超外差接收機(jī),如圖109所示。在超外差接收機(jī)中,高頻射頻信號首先混頻至較低的中頻信號(IF)。ADS42LBxx可以用于中頻級別,對中頻信號進(jìn)行采樣和數(shù)字化。數(shù)字?jǐn)?shù)據(jù)可以以偏移二進(jìn)制或二進(jìn)制補(bǔ)碼格式編碼,并傳輸?shù)娇删幊踢壿嬮T陣列(FPGA)或特定應(yīng)用集成電路(ASIC)。在FPGA或ASIC內(nèi)部,數(shù)字?jǐn)?shù)據(jù)通過數(shù)字混頻器和數(shù)字控制振蕩器(NCO)進(jìn)行下變頻到基帶頻率。

ee 采樣定理

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\專業(yè)基礎(chǔ)\信號與系統(tǒng)\采樣專題筆記.pdf

Excerpt

采樣定理是數(shù)字信號處理領(lǐng)域的重要定理。定理內(nèi)容是連續(xù)信號(通常稱作“模擬信號”)與離散信號(通常稱作“數(shù)字信號”)之間的一個基本橋梁。它確定了信號帶寬的上限,或能捕獲連續(xù)信號的所有信息的離散采樣信號所允許的采樣頻率的下限。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

? 圖1:帶寬限制的函數(shù)的傅里葉變換的模

嚴(yán)格地說,定理僅適用于具有傅里葉變換的一類數(shù)學(xué)函數(shù),即頻率在有限區(qū)域以外為零(參照圖1)。離散時間傅里葉變換(泊松求和公式的一種形式)提供了實(shí)際信號的解析延拓,但只能近似該條件。直觀上我們希望,當(dāng)把連續(xù)函數(shù)化為采樣值(叫做“樣本”)的離散序列并插值到連續(xù)函數(shù)中,結(jié)果的保真度取決于原始采樣的密度(或采樣率)。采樣定理介紹了對帶寬限制的函數(shù)類型來說保真度足夠完整的采樣率的概念;在采樣過程中"信息"實(shí)際沒有損失。定理用函數(shù)的帶寬來表示采樣率。定理也導(dǎo)出了一個數(shù)學(xué)上理想的原連續(xù)信號的重構(gòu)公式。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

簡介:

采樣是將一個信號(例如時間或空間上連續(xù)的函數(shù))轉(zhuǎn)換為數(shù)字序列(時間或空間上離散的函數(shù))的過程。這個定理的香農(nóng)版本陳述為:[2]

如果周期函數(shù) x(t) 不包含高于 B cps(次/秒)的頻率,那么,一系列小于 1/(2_B_) 秒的x(t)函數(shù)值將會受到前一個周期的x(t)函數(shù)值影響。

因此 2_B_ 樣本/秒或更高的采樣頻率將能使函數(shù)不受干擾。相對的,對于一個給定的采樣頻率 fs,完全重構(gòu)的頻帶限制為 Bfs/2。

混疊:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

二個正弦波的頻率不同,但其采樣值相關(guān),其中至少有一個的頻率超過采樣率的一半

如果不能滿足上述采樣條件,采樣后信號的頻率就會重疊,即高于采樣頻率一半的頻率成分將被重建成低于采樣頻率一半的信號。這種頻譜的重疊導(dǎo)致的失真稱為混疊,而重建出來的信號稱為原信號的混疊替身,因?yàn)檫@兩個信號有同樣的樣本值。

ef 傅里葉變換

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

若_x_(t)為一函數(shù),其傅里葉變換_X_(f)為:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

離散序列X(m)定義如下:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

頻譜移動Fwo

頻譜右移相當(dāng)于數(shù)字上變頻(Digital Up Converter, DUC)

頻譜左移相當(dāng)于數(shù)字下變頻(Digital Down Converter, DDC)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

eg 歐拉公式

對于任意實(shí)數(shù)x, 以下等式恒成立:

eix = cosx + isinx

由此也可以推導(dǎo)出

sinx = (eix - e-ix) / 2i 以及 cosx = (eix + e-ix) / 2

當(dāng)x = π時,歐拉公式的特殊形式為 : e + 1 = 0

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

根據(jù)歐拉公式,e-jwt = cos(wt) - jsin(wt)代入離散頻率序列可得:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

復(fù)雜的指數(shù)形式分解為兩部分:實(shí)部和虛部,其中X(m)為第m個DFT輸出部分,m為在頻域DFT輸出的序號;X(n)為輸入樣值序列;n為輸入樣值的時域序號;N為輸入序列的樣值數(shù)量和DFT輸出頻率點(diǎn)的數(shù)量。

eh 頻率分量

不同正弦波的準(zhǔn)確頻率取決于兩個因素:對原始信號采樣時的采樣率fs采樣個數(shù)N。舉個例子,假設(shè)以每秒500次的采樣率對一個連續(xù)的信號進(jìn)行采樣,然后對樣值序列進(jìn)行16點(diǎn)DFT運(yùn)算,那么得到的正弦波基礎(chǔ)頻率為fs/N=500/16’即31.25 Hz,易知其他X(m)的正弦波頻率就是基本頻率的整數(shù)倍,具體如下:

X(0)=第1個頻率分量,可以計算=0 * 31.25 = 0 Hz

【X(0)-0Hz】: 表示DC直流分量

X(1)=第2個頻率分量,可以計算=1 * 31.25 = 31.25 Hz
X(2)=第3個頻率分量,可以計算=2 * 31.25 = 62.5 Hz
X(3)=第4個頻率分量,可以計算=3 * 31.25 = 93.75 Hz

X(15)=第15個頻率分量,可以計算=14 * 31.25 = 468.75 Hz
由上可知,N點(diǎn)DFT的余弦波頻率分量
fanalysis(m) = (m * fs) / N
所以在這個例子中,DFT運(yùn)算后的X(0)項表明這個輸入信號包含0Hz的DC(直流)分量的幅度

ei DFT輸出結(jié)果項X(m)復(fù)數(shù)的三角關(guān)系

很多時候會對每個X(m)分量中的度和功率(幅度的平方)都非常感興趣,如圖3.1所示,可以用直角三角形來形象地表示X(m)的幅度計算。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

用實(shí)部和虛部可以表示任意一個DFT輸出值:
X(m) = Xreal(m) + jXimag(m) = 相位Xθ(m) 處的Xmag(m)

X(m)的模值

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

根據(jù)定義,X(m)的相位角Xθ(m)可以由以下公式得到:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

X(m)的功率大小,簡稱功率譜,即幅度的平方,它的定義如下:

XPS(m) = Xmag(m)2 = Xreal(m)2 + Ximag(m)2

DFT有一個非常重要的性質(zhì)——線性。這個性質(zhì)可以表述為兩個信號之和的DFT等于每個信號DFT之和。DFT頻率分辨率是fs/N

ej FFT與DFT的關(guān)系

N點(diǎn)DFT中復(fù)數(shù)乘法的數(shù)量為:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

N點(diǎn)FFT算法中復(fù)數(shù)乘法的數(shù)量大約是:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

ek 基2FFT蝶形算法

WN = e-j2π/N => WN = Cos(2π / N) - jSin(2π / N)

【=>左邊式子】: 旋轉(zhuǎn)因子

W2N = e-j4π/N => W2N = Cos(4π / N) - jSin(4π / N)

W3N = e-j6π/N => W3N = Cos(6π / N) - jSin(6π / N)

假如N = 4,則可得W04 = 1; W14 = -j; W24 = -1; W34 = j;

假如N = 2,則可得W02 = 1; W12 = -1;

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

W0 8 = 1; W1 8 = √2 / 2 - (√2 / 2) j; W2 8 = -j; W3 8 = -(√2 / 2) - (√ 2/ 2)j; W4 8 = -1

W5 8 = -(√2 / 2) + (√2 / 2) j; W6 8 = j; W7 8 = (√2 / 2) + (√ 2/ 2) j

W4 8 = W2 4 = W1 2 = WN 2N ; W6 8 = W3 4

Wn m = W2n 2m = Wan am ; (m >n,m和n均為自然數(shù),a為正整數(shù))

利用相位因子WN的對稱性和周期性,可用快速計算DFT,其公式表示如下:

  • 對稱性:Wk+N/2_N = -Wk_N
  • 周期性:Wk+N_N = Wk_N

a+bi與c+di的相乘結(jié)果為(ac-bd) + (ad+bc)i;
a+bi與c+di的相除:假定商的結(jié)果為x+yi,則cx-dy=a;dx+cy=b;故得到x=(ac+bd) / (c^2 + d^2);
y = (bc-ad) / (c^2 + d^2);

el 傳輸時延(相位偏移)

情況一:兩個芯片離的比較近,走線(蛇形走線)延時控制的好且工作在室溫環(huán)境下,此時不需要調(diào)用IDELAY原語(時鐘采樣在數(shù)據(jù)的中心位置)

情況二:采樣頻率高、溫度特性(高溫、低溫),總線長度影響延時

  1. FPGA調(diào)用IDELAY原語,F(xiàn)IXED模式調(diào)整延時(局限性:確定擋位,保證時鐘和數(shù)據(jù)的相位偏移關(guān)系,使時鐘采樣邊沿在數(shù)據(jù)的中心位置處)
  2. 動態(tài)相位調(diào)整(DPA),擋位自動調(diào)試選擇(取可行擋位范圍內(nèi)的中間擋位)

em 動態(tài)相位調(diào)整技術(shù)DPA

D:\.lnk\ChineseTechnology\ChineseMedicine\doc\DPA_Logic_Imple.vsdx

Sources : https://www.doc88.com/p-20487225439509.html?s=like&id=1

概述

為了解決FPGA與高速ADC數(shù)據(jù)流傳輸?shù)臏?zhǔn)確性問題,結(jié)合Xilinx FPGA器件的結(jié)構(gòu)特點(diǎn),引入了動態(tài)相位校準(zhǔn)技術(shù),有效的解決實(shí)際問題遇到的時鐘與數(shù)據(jù)相位偏移問題。

引言

動態(tài)相位調(diào)整DPA(Dynamic Phase Alignment)技術(shù),使根據(jù)當(dāng)前信號各信號線的物理狀態(tài),在每次系統(tǒng)上電后,自動對相應(yīng)信號進(jìn)行去偏移操作,從而使相位調(diào)整的參數(shù)適合當(dāng)前物理狀態(tài)。保證了數(shù)據(jù)的可靠傳輸。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

? ChipSync結(jié)構(gòu)圖

端口 I/O 位數(shù) 描述
ref_clock input 1 校準(zhǔn)時鐘參考源
delay_reset input 1 輸入延遲器的復(fù)位端口
delay_data_ce input 1 延遲值增減的使能端口
delay_data_inc input 1 控制延遲值增減,本系統(tǒng)設(shè)置為增加模式
delay_locked output 1 校準(zhǔn)時鐘鎖存穩(wěn)定信號

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

? 校準(zhǔn)設(shè)計流程圖

模塊設(shè)計Verilog程序相關(guān)端口

端口 I/O 位數(shù) 描述
ad_clk input 1 時鐘源
rst input 1 復(fù)位端口
ad_data input 14 FPGA接受的14位采樣數(shù)據(jù)
ad_auto_adjust_start input 1 自動校準(zhǔn)模塊開始信號
ad_auto_adjust_done output 1 自動校準(zhǔn)模塊完成信號
ad_auto_adjust_good output 1 校準(zhǔn)成功信號
idelay_done output 1 延遲值增加的使能端口

en 描述一下你接觸過的仿真方式

三種仿真方式:

  1. 集成開發(fā)軟件調(diào)用仿真,如QuartusⅡ-Modelsim或Vivado
  2. ModelSim直接調(diào)用工程仿真
  3. 編寫腳本仿真,如.do, .tcl

eo 數(shù)字濾波器

D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\專業(yè)基礎(chǔ)\信號與系統(tǒng)\數(shù)字濾波器的MATLAB與FPGA實(shí)現(xiàn) 第2版 [杜勇 編著] 2014年版.pdf

線性時不變系統(tǒng)

任意序列x(n)均可表示成單位取樣序列δ(n)的位移加權(quán)和,即
FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

對于某個系統(tǒng),我們將輸入信號為δ(n)的響應(yīng)稱為單位取樣脈沖響應(yīng)h(n),即

? h(n) = T[δ(n)]

根據(jù)線性時不變系統(tǒng)的定義很容易得出,對于任意一個輸入序列,其系統(tǒng)響應(yīng)為

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FIR濾波器的原理

FIR(Finite Impluse Response)濾波器,即有限脈沖響應(yīng)濾波器,顧名思義, 指單位脈沖響應(yīng)的長度是有限的濾波器。
具體來講, FIR 濾波器的突出特點(diǎn)是其單位取樣響應(yīng) h(n) 是一個N點(diǎn)長的有限長序列,
0<=n<=N-1。濾波器的輸出 y(n) 可表示為輸入序列 x(n) 與單位取樣響應(yīng) h(n) 的線性卷積。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

fir1函數(shù)功能介紹

MATLAB可以使用fir1函數(shù)設(shè)計低通、帶通、高通、帶阻等多種類型的具有嚴(yán)格線性相位特性的FIR 濾波器。需要清楚的是,fir1函數(shù)設(shè)計濾波器實(shí)際上是采用了窗函數(shù)設(shè)計方 法。fir]函數(shù)的語法形式有以下兒種。

【低通】: Low Pass Filter:LPF,項目中用的最多

b = fir1(n,wn)
b = fir1(n,wn,'ftype')
b = fir1(n,wn,'ftype',window)
b = fir1(...,'noscale')

【window】: FDATOOL工具中對應(yīng)設(shè)計方法下拉選項為窗,選項選擇需要的窗口類型,比如Hamming

其中,各項參數(shù)的意義及作用如下所述。

  • b : 返回的 FIR 濾波器f(L位脈沖響應(yīng),脈沖響應(yīng)為偶對稱,長度為n+1。
  • n : 濾波器的階數(shù),需要注意的是,設(shè)計出的濾波器長度為n+1。
  • wn : 濾波器截止頻率;需要注意的是,wn的取值范圍為0<wn<1, 1對應(yīng)為信號采樣頻率的1/2:如果wn是單個數(shù)值,且ftype參數(shù)為low,則表示設(shè)計截止頻率為wn的低通濾波器,如ftype參數(shù)為high,則表示設(shè)計截止頻率為wn的高通濾波器;如果wn 是由兩個數(shù)組成的向量[wn1 wn2], ftype 為stop, 則表示設(shè)計帶阻濾波器,ftype 為bandpass, 則表示設(shè)計帶通濾波器; 如果wn 是由多個數(shù)組成的向量, 則表示根據(jù)ftype 的值設(shè)計多個通帶或阻帶范圍的濾波器, ftype 為DC-1, 表示設(shè)計的第一個頻帶為通帶, ftype 為DC-0, 表示設(shè)計的第一個頻帶為阻帶。
  • window : 指定使用的窗函數(shù)向量, 默認(rèn)為海明窗 (Hamming), 最常用的窗函數(shù)有漢寧窗 (Hanning)、海明 (Hamming) 窗、布拉克曼 (Blackman) 窗和凱塞 (Kaiser)窗, 可以在 MATLAB 界面中輸入 help window 命令查詢各種窗函數(shù)的名稱。
  • noscale : 指定是否歸一化濾波器的幅度。

函數(shù)使用方法

比如要設(shè)計一個歸一化截止頻率為0.2, 階數(shù)為 11、 采用海明窗的低通濾波器, 只需在 MATLAB 命令窗口中依次輸入以下幾條命令, 即可獲得濾波器的單位脈沖響應(yīng)及濾波器的幅頻響應(yīng)圖。

b = fir(11,0.2)
plot(20*log(abs(fft(b)))/log(10))

ep 帶通采樣定理

芯片只能處理數(shù)字信號,而現(xiàn)實(shí)生活中的很多信號是模擬信號,因此需要將模擬信號轉(zhuǎn)換為數(shù)字信號。在轉(zhuǎn)換過程中需要三個步驟:采樣、量化、編碼

采樣:又稱為抽樣或取樣,把時間連續(xù)的信號轉(zhuǎn)換為時間不連續(xù)的脈沖。該脈沖信號稱為采樣信號,采樣信號在時間軸上是離散的,但在幅度(y軸)上仍是連續(xù)的。把采樣信號變?yōu)樵跁r間上離散,在幅度上也離散的過程叫作量化。

量化:是一個數(shù)值分層過程,即四舍五入過程。

編碼:是將量化后的數(shù)字信號的幅值,變換成一組組對應(yīng)的二進(jìn)制數(shù)組。

第一步的采樣最為關(guān)鍵,關(guān)系到模數(shù)轉(zhuǎn)換,再到數(shù)模轉(zhuǎn)換。經(jīng)過幾次變換,傳輸?shù)男盘栠€要保持不變,這樣的通信才算完整可靠。

采樣定理說明采樣頻率與信號頻譜之間的關(guān)系,是連續(xù)信號離散化的基本依據(jù)。 其采樣頻率能捕獲連續(xù)時間信號的所有信息。

1.低通采樣定理(奈奎斯特采樣)

低通采樣定理(奈奎斯特采樣)是要求大于信號的最高上限頻率的兩倍

【提示】:此采樣定理是萬能的,理論上可利用此定理對帶通信號采樣。

2.帶通采樣定理

帶通信號的采樣頻率在某時,小于低通采樣頻率也能無失真恢復(fù)原信號

三、帶通采樣定理

奈奎斯特采樣定理討論的是頻譜分布在( 0,fH)上的基帶信號的采樣問題。但對于接收機(jī),接收信號大多為調(diào)制的射頻信號,射頻信號的頻率上限遠(yuǎn)高于基帶信號的頻率上限,且僅分布在有限的( fL, fH)范圍內(nèi)。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

上圖為帶通信號的頻譜圖(一般都是已調(diào)信號)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

對帶通信號采用低通抽樣定理抽樣,也不會造成頻譜混疊,但會發(fā)現(xiàn)0~fL區(qū)間頻譜沒有使用,且一般fH很大,所以采樣率很高,大大降低了信道的利用率

現(xiàn)實(shí)生活中信號帶寬B并不一定很寬可能為幾M,但 fH可能為幾十個G,AD也難以實(shí)現(xiàn)如此高的采樣率,這時,低通采樣定理已經(jīng)不能滿足實(shí)際中的使用要求,從而催生了帶通采樣的應(yīng)用。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

帶通采樣定理:設(shè)帶通信號頻帶僅在( fL~fH)之間,信號帶寬即為B = fH - fL,則最小采樣速率fs = 2B(1 + k/n),其中k為fH/B的小數(shù)部分,n為fH/B的整數(shù)部分

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)


帶通采樣的限制條件

只允許在其中一個頻帶上存在信號,而不允許在不同的頻帶同時存在信號,否則將會引起信號混疊。

eq 求輸入信號的響應(yīng)(卷積)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

er 頻分復(fù)用和時分復(fù)用

頻分復(fù)用(FDM,F(xiàn)requency Division Multiplexing)就是將用于傳輸信道的總帶寬劃分成若干個子頻帶(或稱子信道),每一個子信道傳輸1路信號。頻分復(fù)用要求總頻率寬度大于各子信道頻率之和,同時為了保證各子信道中所傳輸?shù)男盘柣ゲ桓蓴_,應(yīng)在各子信道之間設(shè)立隔離帶,這樣就保證了各路信號互不干擾(條件之一)。頻分復(fù)用技術(shù)的特點(diǎn)是所有子信道傳輸?shù)男盘栆圆⑿械姆绞焦ぷ?,每一路信號傳輸時可不考慮傳輸時延。

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

時分復(fù)用(TDM,Time Division Multiplexing)就是將提供給整個信道傳輸信息的時間劃分成若干時間片(簡稱時隙),并將這些時隙分配給每一個信號源使用,每一路信號在自己的時隙內(nèi)獨(dú)占信道進(jìn)行數(shù)據(jù)傳輸。時分復(fù)用技術(shù)的特點(diǎn)是時隙事先規(guī)劃分配好且固定不變,所以有時也叫同步時分復(fù)用。其優(yōu)點(diǎn)是時隙分配固定,便于調(diào)節(jié)控制,適于數(shù)字信息的傳輸,缺點(diǎn)是當(dāng)某信號源沒有數(shù)據(jù)傳輸時,它所對應(yīng)的信道會出現(xiàn)空閑,而其他繁忙的信道無法占用這個空閑的信道,因此會降低線路的利用率。

es Run simulation、Synthesis、Implementation、Generate Bitstream,各自作用與區(qū)別

在Vivado 2019.1中,F(xiàn)low Navigator提供了一系列主要的設(shè)計任務(wù)選項,每個選項用于不同的設(shè)計階段。以下是這些選項的作用和區(qū)別:

  1. Run Simulation:
    • 運(yùn)行仿真任務(wù)。
    • 用于驗(yàn)證設(shè)計的功能和時序。
    • 可以使用不同的仿真工具(如XSIM或ModelSim)來進(jìn)行功能仿真或時序仿真。
    • 主要用于確認(rèn)設(shè)計在邏輯上是否是正確。

【RTL Analysis】: 將用戶的設(shè)計輸入細(xì)化成邏輯電路,也就是常說的RTL電路。

  1. Run Synthesis:

    • 運(yùn)行綜合任務(wù)。
    • 將設(shè)計的高級RTL代碼轉(zhuǎn)換為門級表示。
    • 生成網(wǎng)表表示以供后續(xù)實(shí)現(xiàn)步驟使用。

    【門級網(wǎng)表】: 其表示門與門之間的虛擬連接關(guān)系,并沒有規(guī)定每個門的位置以及連線的長度。

  2. Run Implementation:

    • 運(yùn)行實(shí)現(xiàn)任務(wù)。
    • 在FPGA上實(shí)際映射、布局和布線設(shè)計,以最大的限度提高電路的性能和減少資源的使用。
    • 這是將設(shè)計映射到特定FPGA器件的階段,它也包括了時序分析和時序優(yōu)化。

    【布局】: 是將門級網(wǎng)表的每一個門“安置”到CLB中的過程,這是一個映射的過程。
    【布線】: 是利用FPGA內(nèi)部豐富的布線資源將CLB根據(jù)邏輯關(guān)系連接在一起的過程。

  3. Generate Bitstream:

    • 生成FPGA的位流文件(Bitstream)。
    • 這是將設(shè)計編程到FPGA器件的最后一步。
    • Bitstream包含了FPGA的配置信息,用于將設(shè)計加載到FPGA上。
    • 在這一步之前,必須先完成綜合、實(shí)現(xiàn)和位文件生成。

    【固化程序】: 還可以通過配置同時生成.bin文件。

這些選項按照設(shè)計流程的不同階段提供了不同的功能。通常,您會按照以下順序執(zhí)行這些任務(wù):先進(jìn)行Run Simulation驗(yàn)證設(shè)計的正確性,然后運(yùn)行Run Synthesis和Run Implementation來準(zhǔn)備設(shè)計,最后生成Bitstream并將其加載到FPGA器件上。

et Virtual Input/Output(VIO)

D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\FPGA官方文檔\XilinxIP\pg159-vio.pdf

Introduction

The LogiCORE? IP Virtual Input/Output (VIO) core is a customizable core that can both monitor and drive internal FPGA signals in real time.

Features

  • Includes optional activity detectors on input ports to detect rising and falling transitions between samples.
  • Includes custom output initialization that allows you to specify the value of the VIO
    core outputs immediately following device configuration and start-up.

Overview

The VIO core is a customizable core that can both monitor and drive internal FPGA signals in real time. Unlike the ILA core, no on-chip or off-chip RAM is required.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Product Specification

The VIO core is used to drive data into your design and read data from your design through the JTAG port. The core is designed to replace or augment board-level I/O components such
as status indicators (for example, LEDs) and low-bandwidth controls (for example, buttons or DIP switches).

Performance

The VIO core is designed to run at design clock frequencies up to 250 MHz, but maximum clock frequency could be limited by other factors in the design such as overall utilization or routing congestion.

Port Description

Signal Name I/O Description
clk I Design clock used to register input ports and output ports. This is required.
probe_in[ – 1:0] I Input probe port number (where can be 0 to 256) of width (where can be 1 to 256). For a 1-bit wide port, use probe_in[0:0].
probe_out[ – 1:0] O Output probe port number (where can be 0 to 256) of width (where can be 1 to 256). For a 1-bit wide port, use probe_out[0:0].

eu FIR濾波器資源消耗

在設(shè)計FIR濾波器的時候,可以設(shè)計為對稱性濾波器和非對稱性濾波器。在設(shè)計濾波器的時候,假如設(shè)計濾波器的階數(shù)為N階,則濾波器的實(shí)際長度為(N + 1)階。下面舉例說明一下FIR濾波器資源的消耗,如果濾波器的實(shí)際長度為513階,對稱性濾波器則消耗257個DSP,非對稱性濾波器則消耗513個DSP。

FIR濾波器的資源消耗還可以進(jìn)一步被節(jié)省,當(dāng)需要被過濾的信號是一個慢數(shù)據(jù)流,而FIR濾波器的工作時鐘是一個快時鐘,DSP還可以進(jìn)一步復(fù)用。假如慢數(shù)據(jù)流是基于38.4MHz產(chǎn)生的,F(xiàn)IR濾波器工作時鐘是230.4MHz,用一個實(shí)際長度為513階的對稱性濾波器過濾:消耗DSP為513 / 2 = 257,257 / 6 = 43個DSP。

ev AXI總線和AXI接口以及AXI協(xié)議

D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\XC7VX690T-2FFG1927I\02_XILINX ZYNQ裸機(jī)篇2019版.pdf

總線、接口和協(xié)議,這三個詞經(jīng)常被聯(lián)系在一起,但是三者有區(qū)別。

總線是一組傳輸通道,是各種邏輯器件構(gòu)成的傳輸數(shù)據(jù)的通道,一般由數(shù)據(jù)線、地址線、控制線等構(gòu)成。

接口是一種連接標(biāo)準(zhǔn),又被稱為物理接口。

協(xié)議就是傳輸數(shù)據(jù)的規(guī)則。

概述

ZYNQ擁有ARM+FPGA 這個神奇的架構(gòu),ARM 和FPGA 通過AXI4 總線進(jìn)行通信。

AXI總線與ZYNQ的關(guān)系

AXI(Advanced eXtensible Interface)本是由ARM 公司提出的一種總線協(xié)議,Xilinx 從6 系列的FPGA 開始對AXI 總線提供支持,此時AXI 已經(jīng)發(fā)展到了AXI4 這個版本

【AXI: 高速可擴(kuò)展接口】:① FIR Compiler核使用的就是AXI接口,如信號S_AXIS_DATA和M_AXIS_DATA,其中S代表Slave,表示FIR核作為從機(jī)接收數(shù)據(jù);M代表Master,表示FIR核作為主機(jī)發(fā)送數(shù)據(jù)。② MIG(Memory Interface Generator)配置時可以配置成AXI4接口,調(diào)試DDR3時并未選擇AXI4接口。③ FIFO Generator核的配置中可以設(shè)置接口類型為AXI Stream。

AXI總線概述

在ZYNQ中有支持三種AXI總線,擁有三種AXI接口,當(dāng)然用的都是AXI協(xié)議。其中三種AXI總線分別為:

AXI4:(For high-performance memory-mapped requirements.)主要面向高性能地址映射通信的需求,是面向地址映射的接口,允許最大256輪的數(shù)據(jù)突發(fā)傳輸;

AXI4-Lite:(For simple, low-throughput memory-mapped communication)是一個輕量級的地址映射單次傳輸接口,占用很少的邏輯單元。

AXI4-Stream:(For high-speed streaming data.)面向高速流數(shù)據(jù)傳輸;去掉了地址項,允許無限制的數(shù)據(jù)突發(fā)傳輸規(guī)模。

AXI4總線和AXI4-Lite總線具有相同的組成部分:

  1. 讀地址通道,包含ARVALID, ARADDR, ARREADY信號;
  2. 讀數(shù)據(jù)通道,包含RVALID, RDATA, RREADY, RRESP 信號;
  3. 寫地址通道,包含AWVALID,AWADDR, AWREADY 信號;
  4. 寫數(shù)據(jù)通道,包含WVALID, WDATA,WREADY,WSTRB 信號;
  5. 寫應(yīng)答通道,包含BVALID, BRESP, BREADY 信號;
  6. 系統(tǒng)通道,包含:ACLK,ARESETN 信號。

AXI4總線和AXI4-Lite總線的信號也有他的命名特點(diǎn):

  • 讀地址信號都是以AR 開頭(A:address;R:read)
  • 寫地址信號都是以AW 開頭(A:address;W:write)
  • 讀數(shù)據(jù)信號都是以R 開頭(R:read)
  • 寫數(shù)據(jù)信號都是以W 開頭(W:write)
  • 應(yīng)答型號都是以B 開頭(B:back(answer back))

了解到總線的組成部分以及命名特點(diǎn),那么在后續(xù)的實(shí)驗(yàn)中您將逐漸看到他們的身影。每個信號的作用暫停不表,放在后面一一介紹。

AXI4-Stream總線的組成有:

  1. ACLK信號:總線時鐘,上升沿有效;

  2. ARESETN信號:總線復(fù)位,低電平有效;

  3. TREADY信號:從機(jī)告訴主機(jī)做好傳輸準(zhǔn)備;

  4. TDATA信號:數(shù)據(jù),可選寬度32,64,128,256bit;

  5. TSTRB信號:每一bit 對應(yīng)TDATA 的一個有效字節(jié),寬度為TDATA/8;

    【STRB】: strobe選通

  6. TLAST信號:主機(jī)告訴從機(jī)該次傳輸為突發(fā)傳輸?shù)慕Y(jié)尾;

  7. TVALID信號:主機(jī)告訴從機(jī)數(shù)據(jù)本次傳輸有效;

  8. TUSER信號 :用戶定義信號,寬度為128bit。

AXI協(xié)議之握手協(xié)議

AXI4所采用的是一種READY,VALID 握手通信機(jī)制,簡單來說主從雙方進(jìn)行數(shù)據(jù)通信前,有一個握手的過程。傳輸源產(chǎn)生VLAID信號來指明何時數(shù)據(jù)或控制信息有效。而目的源產(chǎn)生READY信號來指明已經(jīng)準(zhǔn)備好接受數(shù)據(jù)或控制信息。傳輸發(fā)生在VALID 和READY 信號同時為高的時候。VALID 和READY 信號的出現(xiàn)有三種關(guān)系。

(1)VALID 先變高READY 后變高。時序圖如下:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

在箭頭處信息傳輸發(fā)生。
(2)READY 先變高VALID 后變高。時序圖如下:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

同樣在箭頭處信息傳輸發(fā)生。
(3)VALID 和READY 信號同時變高。時序圖如下:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

在這種情況下,信息傳輸立馬發(fā)生,如圖箭頭處指明信息傳輸發(fā)生。
需要強(qiáng)調(diào)的是,AXI 的五個通道,每個通道都有握手機(jī)制

突發(fā)式讀寫

1、突發(fā)式讀的時序圖如下:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

當(dāng)?shù)刂烦霈F(xiàn)在地址總線后,傳輸?shù)臄?shù)據(jù)將出現(xiàn)在讀數(shù)據(jù)通道上。設(shè)備保持VALID 為低直到讀數(shù)據(jù)有效。為了表明一次突發(fā)式讀寫的完成,設(shè)備用RLAST 信號來表示最后一個被傳輸?shù)臄?shù)據(jù)。
2、 突發(fā)式寫時序圖如下:

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

這一過程的開始時,主機(jī)發(fā)送地址和控制信息到寫地址通道中,然后主機(jī)發(fā)送每一個寫數(shù)據(jù)到寫數(shù)據(jù)通道中。當(dāng)主機(jī)發(fā)送最后一個數(shù)據(jù)時,WLAST 信號就變?yōu)楦?。?dāng)設(shè)備接收完所有數(shù)據(jù)之后他將一個寫響應(yīng)發(fā)送回主機(jī)來表明寫事務(wù)完成。

ew Serial RapidIO(SRIO)

D:\.lnk\ChineseTechnology\ChineseMedicine\相關(guān)文檔\FPGA官方文檔\XilinxIP\pg007_srio_gen2.pdf

Introduction

The SRIO Gen2 Endpoint supports 1x, 2x, and 4x lane widths. It comes with a configurable buffer design, reference clock module, reset module, and configuration fabric reference design. The SRIO Gen2 Endpoint uses AXI4-Stream interfaces for high-throughput data transfer and AXI4-Lite interfaces for the configuration (maintenance) interfaces.

【x1, x2, x4】: 1對,2對,4對差分

Features

  • Supports 1x, 2x and 4x operation with the ability to train down to 1x from 2x or 4x
  • Supports per-lane speeds of 1.25, 2.5, 3.125, 5.0, and 6.25 Gbaud

【3.125】: 傳輸帶寬 = (per-lane speeds) * (lane widths),如3.125 * 4 = 12.5Gbps

Logical Layer

  • Concurrent Initiator and Target operations
  • Doorbell and Message support
  • Dedicated port for maintenance transactions
  • Simple handshaking mechanism to control data flow using standard AXI4-Lite and AXI4-Stream interfaces
  • Programmable source ID on all outgoing packets
  • Optional large system support for 16-bit device IDs
LogiCORE IP Facts Table Core Specifics
Supported Device Family UltraScale+? Families,
UltraScale? Architecture, Zynq?-7000,
Virtex?-7, Kintex?-7, Artix?-7
Supported User Interfaces AXI4-Stream, AXI4-Lite

Overview

The RapidIO Interconnect Architecture, designed to be compatible with the most popular integrated communications processors, host processors, and networking digital signal processors, is a high-performance, packet-switched, interconnect technology. It addresses the need of the high-performance embedded industry for reliability, increased bandwidth, and faster bus speeds in an intra-system interconnect.

The RapidIO standard is defined in three layers: logical, transport and physical. The logical layer defines the overall protocol and packet formats. This is the information necessary for endpoints to initiate and complete a transaction. The transport layer provides the route information necessary for a packet to move from endpoint to endpoint. The physical layer describes the device-level interface specifics such as packet transport mechanisms, flow control, electrical characteristics, and low-level error management. This partitioning provides the flexibility to add new transaction types to the logical specification without requiring modification to the transport or physical layer specifications.

Serial RapidIO System Overview

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

gt: Giga Transceivers

Recommended Speed Grade Details

Link
Width
Performance per
Lane (Gb/s)
Artix-7 Kintex-7 Virtex-7 Zynq-7000 UltraScale
1x 3.125/2.5/1.25 1, 2L 1, 2L 1, 2L 1 1, 1L
5 2, 2L 1, 2L 1, 2L 1 1
6.25 2, 2L 1, 2L 1, 2L 1 1
2x 3.125/2.5/1.25 1, 2L 1, 2L 1, 2L 1 1, 1L
5 2, 2L 1, 2L 1, 2L 1 1
6.25 NA 1, 2L 1, 2L 1 1
4x 3.125/2.5/1.25 1, 2L
(3.125 no 2L support)
1, 2L 1, 2L 1 1, 1L
5 NA 2 2, 2L 2 2
6.25 NA 3 3 3 3

【SPARTAN-7】: 該系列芯片沒有高速串行收發(fā)器
Reference Clock Frequency: 配置SRIO核時提供的參考時鐘數(shù)值,可選125MHz或156.25MHz
【Shared Logic】: 一個GTX Quad包含一個GTX Common,如果多個GTX接SRIO核,則第一個核配置需要選擇Include Shared Logic in Core輸出時鐘信號,其他SRIO核連接該輸出信號線即可。·

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

LOG Interfaces

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

Signal Direction Description
log_lcl_log_clk Output Clock for the LOG. In example design, log_clk depends on line rate and link width (a core trained down from Nx to 1x still uses the Nx clock rate). See Clocking in Chapter 3 for more information.
Note: This signal is the same as log_clk, which is the name used in other areas of this document.
log_rst Input Reset for LOG. Must deassert synchronously to log_clk. See Resets in Chapter 3.
log_lcl_cfg_clk Input Configuration Register Interface clock. If the AXI4-Lite Maintenance Port and the Configuration Fabric reference design are in use, this must be equivalent to log_clk. Otherwise, this clock is independent of log_clk.
Note: This signal is the same as cfg_clk, which is the name used in other areas of this document.
log_lcl_cfg_rst Input Configuration Register Interface reset. Clears LOG registers to default values. Must deassert synchronously to cfg_clk.
Note: This signal is the same as cfg_rst, which is the name used in other areas of this document.

I/O Port
The I/O port can be configured in one of two styles: Condensed I/O or Initiator/Target. The signals available depend on the style selected during core generation.

The I/O port is built from AXI4-Stream channels. Two packet formats are available:

  • HELLO
  • SRIO Stream
Signal Direction Description
s_axis_ireq_tvalid Input Indicates that the information on the interface is valid.
s_axis_ireq_tready Output Handshaking signal. Indicates that the data from the source is accepted (if valid).
s_axis_ireq_tkeep[7:0] Input Byte qualifier that indicates whether the content of the associated byte of data is valid. If port is configured to use the HELLO format, this must be tied to 8’hFF. For ports configured to use the SRIO Stream format, this input should be set to 8’hFF except when tlast is asserted.
Bit 7 corresponds to the most significant byte of data (tdata[63:56]), and bit 0 corresponds to the least significant byte (tdata[7:0]).
s_axis_ireq_tlast Input Indicates the last beat of a packet.
s_axis_ireq_tuser[31:0] Input HELLO Format: Valid on the first beat of a packet, this signal consists of the Source ID (31:16) and Destination ID (15:0) for the packet. If using 8-bit Device IDs, the most significant byte of each ID should be padded with 0s. In the default example design, Device ID is connected to the Source ID. However, those with a custom design should make the necessary connection.
SRIO Stream Format: In this format, tuser is only 8 bits wide. Bit 1 is used to set the Critical Request Flow (CRF) flag for the packet, and should be tied to zero if CRF support is disabled. All other bits are reserved.
On subsequent beats within a packet, this field is reserved.

HELLO Packet Format

Supported Transaction Types and Corresponding Ports

Packet Type FTYPE TTYPE Transmit Port Receive Port Description
NREAD 0010 0100 Condensed I/O: iotx; Initiator/Target: ireq Condensed I/O: iorx; Initiator/Target: treq Basic read request transaction. Request does not have a data payload. Results in a response with data.
NWRITE 0101 0100 Condensed I/O: iotx; Initiator/Target: ireq Condensed I/O: iorx; Initiator/Target: treq Basic write operation. Request has a data payload. Does not result in a response.
NWRITE_R 0101 0101 Condensed I/O: iotx; Initiator/Target: ireq Condensed I/O: iorx; Initiator/Target: treq Basic write operation. Request has a data payload. Results in a response with no data.
SWRITE 0110 N/A Condensed I/O: iotx; Initiator/Target: ireq Condensed I/O: iorx; Initiator/Target: treq Streaming write operation (uses less header fields than NWRITE). Request has a data payload. Does not result in a response.
DOORBELL 1010 N/A Condensed I/O: iotx; Initiator/Target: ireq Condensed I/O: iorx; Initiator/Target: treq Very short message between processing elements. Request has no data payload. Results in a response with no data.

To simplify packet construction, the user interface ports can be configured to use the Header Encoded Logical Layer Optimized (HELLO) format.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

HELLO Format Detail

Field Bits Description
TID [63:56] The Transaction ID for the packet. The RapidIO Specification allows for only one outstanding packet with a given TID and Source/Destination ID pair at any given time.
FTYPE [55:52] The Transaction Class for the packet. Supported FTYPEs for HELLO format are 2, 5, 6, A, B, and D. The core might only support a subset of these, based on selections made when the core was generated.
TTYPE [51:48] Transaction Type for the packet. Only used for FTYPE 2, 5 and 13 to define additional functionality within the Transaction Class.
size [43:36] Data payload size in bytes, minus one. Limitations exist; read this section thoroughly.

The size field in the HELLO packet is the number of bytes in the transfer minus one (valid
range is 0 to 255
, which corresponds to a true size of 1 to 256 bytes). The size and address
fields must correspond to valid size, address, and for the corresponding
RapidIO packet type.

Basic HELLO Packet Transfer on User Interface

Figure 3-3 shows a typical transfer with data on one of the user interface ports. This particular transfer has a data payload of four DWORDs (32 bytes). On the interface, it takes five total cycles including the transfer of the header.

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

ex Git指令

FPGA面試筆記ea-ez,FPGA面試筆記,筆記,面試,fpga開發(fā)

%查看當(dāng)前Git軟件的安裝版本
git -v
git --version

%獲取軟件的配置信息
git config -l

%名稱和郵箱,設(shè)定全局用戶
git config --global user.name test
git config --global user.email test@atguigu.com

%初始化版本庫
git init

%查看版本庫狀態(tài)
git status

%將文件納入到版本庫的管理
git add test.txt

%確定要把文件放置在版本庫中
# commit表示真正地納入到版本庫中
# -m 表示提交時的信息(message),是必須輸入的。用于描述不同版本之間的差別信息
git commit -m "my first git file"

%查看當(dāng)前提交
git show

%查看版本庫文件歷史
git log --oneline

%從版本庫中恢復(fù)文件
git restore test.txt

%將版本庫文件重置到某一個版本
# 這里的f2f113f就是版本Hash值,用于唯一確定版本庫中此版本的標(biāo)記
# 當(dāng)然了這是一個簡短版,完整的比較長
# 如果不記得具體的版本值,版本值也可以使用HEAD值,比如最新的上一個版本:HEAD^
# 如果后退更多的版本,可以使用 HEAD~N
git reset --hard f2f113f

%創(chuàng)建分支
# git branch 分支名稱
git branch b1
git branch b2

%查看分支
git branch -v

%切換分支
# git checkout 分支名稱
git checkout b1

%刪除分支
# git branch -d 分支名稱
Git branch -d b2

%其他分支
# 基于主干分支的內(nèi)容,我們創(chuàng)建其他分支,并直接切換到新的分支
# git checkout -b 分支名稱
git checkout -b new_branch

%查看一下Git軟件的操作日志
git log --graph

%將遠(yuǎn)程倉庫克隆到本地
# 克隆遠(yuǎn)程倉庫 => 用戶@主機(jī)名:倉庫地址
git clone -b main --single-branch git@linux1:/home/git/git-rep/test.git

%關(guān)聯(lián)遠(yuǎn)程倉庫,增加遠(yuǎn)程地址
git remote add origin git@github.com:Aitiger-coffee/git-study.git

%將本地倉庫同步到遠(yuǎn)程倉庫
# 同步遠(yuǎn)程倉庫
# 遠(yuǎn)程倉庫默認(rèn)有個別名叫origin,將本地倉庫的文件推送(push)到遠(yuǎn)程倉庫
# git push 遠(yuǎn)程倉庫別名 分支名稱
git push origin master

Linux系統(tǒng)操作指令

指令 含義 說明
cd 目錄 change directory 改變操作目錄
cd … 退回到上一級目錄
pwd Print work directory 打印當(dāng)前工作目錄
ls list directory contents 顯示當(dāng)前目錄的文件及子文件目錄
ll ls -l 簡化版本 更詳細(xì)地顯示當(dāng)前目錄的文件及子文件目錄
mkdir 文件夾名稱 make directory 新建一個文件夾
rm 文件 remove 刪除文件
rm -r 文件夾 Remove 刪除文件目錄
touch 文件 如果創(chuàng)建的文件不存在,那么創(chuàng)建一個空文件
reset 清屏
clear 清屏
exit 退出終端窗口

ey 什么是競爭與冒險現(xiàn)象?如何判斷?怎樣消除?

組合電路中,某一輸入信號經(jīng)過不同的途徑傳播后,由于路徑延遲不同,使得到達(dá)電路中某一個邏輯門會合點(diǎn)的時間有先有后,這種現(xiàn)象叫做競爭,由于由競爭而產(chǎn)生的尖脈沖或者說毛刺就叫做冒險。

判斷方法:

  • 代數(shù)法:如果布爾表達(dá)式中有相反的信號則可能產(chǎn)生競爭和冒險的現(xiàn)象。如果表達(dá)式為:F = A + A‘,就會產(chǎn)生“1”冒險;F = A * A’,就會產(chǎn)生“0”冒險;

  • 卡諾圖:有兩個相切的卡諾圈并且相切處沒有被其他卡諾圈包圍,就有可能出現(xiàn)競爭冒險;

  • 實(shí)驗(yàn)法:示波器觀察

消除方法:文章來源地址http://www.zghlxwxcb.cn/news/detail-834169.html

  • 接入濾波器電容;消除毛刺影響;
  • 利用可靠性編碼;
  • 可以在表達(dá)式中增加冗余項消除邏輯冒險。

ez 阻塞性賦值與非阻塞性賦值的區(qū)別

阻塞賦值 非阻塞賦值
符號 = <=
執(zhí)行順序 順序執(zhí)行 并發(fā)執(zhí)行
應(yīng)用 組合邏輯塊 時序邏輯塊

到了這里,關(guān)于FPGA面試筆記ea-ez的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Fpga開發(fā)筆記(一):高云FPGA芯片介紹,入手開發(fā)板套件、核心板和底板介紹

    Fpga開發(fā)筆記(一):高云FPGA芯片介紹,入手開發(fā)板套件、核心板和底板介紹

    若該文為原創(chuàng)文章,轉(zhuǎn)載請注明原文出處 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/135551179 紅胖子網(wǎng)絡(luò)科技博文大全:開發(fā)技術(shù)集合(包含Qt實(shí)用技術(shù)、樹莓派、三維、OpenCV、OpenGL、ffmpeg、OSG、單片機(jī)、軟硬結(jié)合等等)持續(xù)更新中… 上一篇:沒有了 下一篇:《Fpga開

    2024年02月02日
    瀏覽(27)
  • NES(FC) FPGA游戲卡開發(fā)筆記(1)---- 開始篇

    NES(FC) FPGA游戲卡開發(fā)筆記(1)---- 開始篇

    目錄 簡介 技術(shù)要求 參考 1) 國內(nèi)玩家自制游戲卡 2)N8 N8pro 3)powerpak 4)FC模擬器軟件 N8 pro的實(shí)現(xiàn)方案的信息收集 先了解一下各個芯片的功能 N8開發(fā)者提供的資源信息 Powerpak ?Nesdev wiki和forum 整個開發(fā)的目的就是做一個FPGA實(shí)現(xiàn)的,可以支持多種FC游戲(多種mapper)的游戲卡。

    2024年02月07日
    瀏覽(21)
  • NES(FC) FPGA游戲卡開發(fā)筆記(3)---- AGM AG32VF407開發(fā)環(huán)境的使用

    NES(FC) FPGA游戲卡開發(fā)筆記(3)---- AGM AG32VF407開發(fā)環(huán)境的使用

    AG32VF407是內(nèi)帶2K FPGA邏輯單元的MCU芯片。雖然目前不考慮這款FPGA芯片,因?yàn)槭情_發(fā)筆記,就記錄一下我的學(xué)習(xí)使用過程。使用這個IDE就是想了解一下這塊MCU到底如何使用的。 http://www.tcx-micro.com/doc_25499579.html提供了AGM MCU的開發(fā)軟件下載。需要安裝python3.8版本以上(因?yàn)锳GM boar

    2024年02月16日
    瀏覽(29)
  • FPGA面試題【FPGA如何進(jìn)行資源評估】

    FPGA面試題【FPGA如何進(jìn)行資源評估】

    目錄 題目 核心思路 答案 FPGA全貌 FPGA如何進(jìn)行資源評估 八股文咯 大家在項目中一般會要遇到需要資源評估的情況,例如立了新項目,前期需要確定使用什么FPGA片子,做到成本越小越好。這就要對即將要實(shí)現(xiàn)的功能進(jìn)行下資源評估。 如何評估 1、你需要一個參考工程 一般來

    2024年02月20日
    瀏覽(24)
  • FPGA面試題(3)

    FPGA面試題(3)

    FPGA:現(xiàn)場可編程門陣列 CPLD:復(fù)雜可編程邏輯器件 慢時鐘域-快時鐘域:同步打拍 快時鐘域-慢時鐘域:先拓展位寬再同步打拍 1.異步FIFO 2.保持寄存器+握手信號 3.特殊的具體應(yīng)用電路結(jié)構(gòu),根據(jù)應(yīng)用的不同而不同 BLOCK RAM:由一定數(shù)量固定大小的存儲塊構(gòu)成的,不占用額外的邏

    2024年02月04日
    瀏覽(53)
  • FPGA面試題(7)

    FPGA面試題(7)

    0 1 時鐘極性CPOL 空閑狀態(tài)為低電平 空閑狀態(tài)為高電平 時鐘相位CPHA 在第一個跳變沿采樣 在第二個跳變沿采樣 模式 CPOL CPHA 描述 模式0 0 0 sclk上升沿采樣,sclk下降沿發(fā)送 模式1 0 1 sclk上升沿發(fā)送,sclk下降沿采樣 模式2 1 0 sclk上升沿發(fā)送,sclk下降沿采樣 模式3 1 1 sclk上升沿采樣,

    2024年02月05日
    瀏覽(21)
  • FPGA面試題(2)

    同步復(fù)位:當(dāng)clk有效時,復(fù)位才有效。 優(yōu)點(diǎn):有利于時序分析,防止毛刺現(xiàn)象出現(xiàn)。 缺點(diǎn):復(fù)位信號必須大于時鐘周期,大部分邏輯器件中D觸發(fā)器都只有異步復(fù)位端口,需要在寄存器數(shù)據(jù)輸入插入組合邏輯,需要考慮組合邏輯延遲因素。 異步復(fù)位:復(fù)位信號與clk無關(guān),只與

    2024年02月07日
    瀏覽(29)
  • FPGA面試題整理1

    FPGA面試題整理1

    有關(guān)FPGA的簡答題 FPGA和CPLD都是數(shù)字電路的可編程邏輯器件,它們的主要區(qū)別在于規(guī)模和靈活性。 FPGA(FieldProgrammable_GateArray是一種可編程邏輯器件,由大量的可編程邏輯單元(例如邏輯門、寄存器等)和可編程的互連資源(例如通道、開關(guān)、線纜等)組成。FPGA可實(shí)現(xiàn)復(fù)雜的數(shù)

    2024年02月08日
    瀏覽(30)
  • FPGA 面試經(jīng)歷分享

    大家好,我是小菜鳥。寒假期間經(jīng)過師兄推薦面試了一個 FPGA 崗位的實(shí)習(xí),共經(jīng)歷了兩次技術(shù)面試,雖然最后沒有通過,但是這次面試收獲還是蠻多的。 這是我第一次面試 FPGA 方向的崗位,一時竟不知要從哪下手,師兄建議準(zhǔn)備下 FPGA 的底層原理,當(dāng)時還說會有手撕代碼的環(huán)

    2024年02月17日
    瀏覽(29)
  • FPGA面試-常用知識點(diǎn)

    FPGA面試-常用知識點(diǎn)

    本貼記錄一下自己找工作過程中順下來的知識點(diǎn),如有錯誤的,請不吝指出,共同進(jìn)步! ? a) FPGA FPGA 基于 LUT ,LUT本質(zhì)上就是一個RAM,每一個LUT可以看成一個有4位地址線的16x1的RAM。這也是為什么FPGA需要外接一個rom來上電配置。 包括 CLBs , I/O 塊, RAM 塊和可編程連線 。 在

    2024年04月26日
    瀏覽(26)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包