FPGA面试笔记ea-ez

ea Vivado中FIFO Generator核读模式

FIFO Generator核有两种读模式:Standard FIFO(标准模式)、First Word Fall Through(FWFT模式)

FWFT模式类似于QuartusⅡ软件中FIFO的超前输出模式,没有读延时。

注:如果选择标准模式,勾选Output Registers,会增加一个读延时;但是选择FWFT模式,勾选Output Registers,仍然没有读延时;

eb 散热方式

  • 风扇散热:FPGA芯片温度达到阈值时,拉高1个信号控制风扇的供电,从而控制风扇散热。
  • 导冷散热:在FPGA板卡上放一块金属片,金属片与发热严重芯片如FPGA主芯片之间加一层散热硅脂,金属片不会直接接触板卡,不会造成短路。金属片有铝制和铜制两种,铜制导热能力更强。

在这里插入图片描述

​ 如果使用导冷散热依旧发热严重,可以再加上风扇散热。

在工作中,如果需要去测试一个程序,一定要询问是否需要散热,一旦芯片温度过高,芯片就有报废的可能。

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

D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\FPGA官方文档\ug480_7Series_XADC.pdf

Soc:片上操作系统,ADC的位宽或精度为12,1 Mega Sample Per Second,模拟-数字转换器。

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:

在这里插入图片描述

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】: 状态寄存器只能读取

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.

在这里插入图片描述

PortI/ODescription
DI[15:0]InputsInput data bus for the DRP.
DO[15:0]OutputsOutput data bus for the DRP
DADDR[6:0]InputAddress bus for the DRP.
DENInputEnable signal for the DRP
DWEInputWrite enable for the DRP
DCLKInputClock input for the DRP
DRDYOutputData ready signal for the DRP
RESETInputAsynchronous 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:

在这里插入图片描述

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:

在这里插入图片描述

NameAddressDescription
Temperature00hThe 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
VCCINT01hThe result of the on-chip VCCINT supply monitor measurement is stored at this location.
VCCAUX02hThe 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.

在这里插入图片描述

ed XC7K325T-2FFG900C

在这里插入图片描述

需求:把电路板上的ADC、时钟合成器以及DDR3调通即可

介绍:调试过一个XC7K325T的板卡,我先描述它的硬件板块情况,首先板卡采用一个ADC板卡和一个FPGA板卡,这俩个板卡通过连接器进行连接,主要的FPGA芯片是XC7K325T- 2FFG900C,它采用底板FPGA和4片DDR3,带一个PCIE接口,其他就是电源下载器等等,采集卡的ADC型号是ADS42LB69,精度是16bit的,LVDS接口,使用两片ADC,每片两个通道,总共4个通道的采集卡,采集卡里面主要有时钟合成器HMC830LP6GE,时钟扇出器ADCLK948,时钟扇出器就是一个时钟二选一的,时钟合成器里面有pll锁相环,可以通过小数模式的spi配置寄存器改变锁相环的频率,ADC的时钟来源可以由外部时钟和PLL锁相环输出的时钟,锁相环也需要提供一个基准时钟,也就是鉴相器的输入时钟,这个鉴相器的输入时钟,可以选择板卡的125MHz晶振,也可以由外部时钟源输入来选择,我们选择的是ADCLK948,我们可以FPGA的引脚控制,接着就进行配置。


ADCLK948

source:D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\XC7K325T-2FFG900C\ADCLK948.pdf

在这里插入图片描述

在这里插入图片描述

ADCLK948是在模拟设备上制造的超快时钟扇出缓冲器。

”Low Voltage Positive Emitter-Coupled Logic“(低电压正极发射耦合逻辑)这是一种高速差分信号传输标准,通常用于时钟分配和数据通信应用。

8 LVPECL Outputs (ultrafast clock fanout buffer):

  1. 8路相同的时钟差分输出:在某些应用中,可能需要将同一信号分发到多个设备或系统中。这样可以确保所有设备都在相同的时钟下工作,从而实现精确的时间同步。
  2. 理论上,一路时钟输出可以接到多个设备的时钟输入,然而,这样做可能会引入一些问题:信号衰减、负载电容、时钟偏移,使用像ADCLK948这样的时钟分配器可以解决上述存在的问题,使每个设备都可以得到一个高质量、低抖动的时钟信号。

PIN CONFIGURATION AND FUNCTION DESCRIPTIONS

在这里插入图片描述

Pin No.MnemonicDescription
1CLK0Differential Input (Positive) 0.
2CLK0#Differential Input (Negative) 0.
5CLK1Differential Input (Positive) 1.
6CLK1#Differential Input (Negative) 1.
29,30Q0#, Q0Differential LVPECL Outputs
32IN_SELInput 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\相关文档\XC7K325T-2FFG900C\HMC830\HMC830LP6GE.pdf

在这里插入图片描述

在这里插入图片描述

XREEP输入为125MHz,经过R DIVIDER需要小于100MHz(频率为125 / R)。后续经过闭环反馈给PD/FD,也就是说Fvco / N == 125MHz / R,其中Fvco <= 3000MHz。
最终输出频率RF(250MHz)由Fvco经过分频(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.

在这里插入图片描述

在这里插入图片描述

Fractional Frequency Tuning

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

fout = fvco / k

parametersdecription
foutis the output frequency after any potential dividers or doublers.
kis 0.5 for doubler, 1 for fundamental, or k = 1,2,4,6,…58,60,62 according to the VCO Subsystem type
Nintis the integer division ratio, Reg 03h, an integer number between 20 and 524,284
Nfracis the fractional part, from 0.0 to 0.99999…,Nfrac=Reg 04h/224
Ris 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.

在这里插入图片描述


ADS42LB69

source:D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\XC7K325T-2FFG900C\ADS42LB69\ADS42LB69.pdf

在这里插入图片描述

在这里插入图片描述

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

  • 双通道

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

  • 【最大时钟速率】:250MSPS: MegaSamples per second

  • 【双倍数据速率 (DDR) 或四倍数据速率 (QDR) 低压差分信号(LVDS)接口】: 源同步接口:输出时钟和数据;

应用:

  • 通信和线缆基础设施
  • 雷达和智能天线阵列
  • 测试和测量仪器

说明:

ADS42LB49 和 ADS42LB69 是高线性度、双通道、14 和 16 位250MSPS 模式转换器 (ADC) 系列,支持 DDR 和QDR LVDS 输出接口。已缓冲模拟输入在大大减少采样保持毛刺脉冲能量的同时,在宽频率范围内提供统一的输入阻抗

Pin Functions

I/ODESCRIPTION
INAP, INAMDifferential analog input for channel A
CLKINP, CLKINMDifferential clock input for ADC
RESETHardware reset. Active high.
SCLKSerial interface clock input
SDATASerial interface data input
SDOUTSerial interface data output
SENSerial interface enable

DDR LVDS Output Timing Diagram

在这里插入图片描述

在这里插入图片描述

  1. 上升沿得到数据偶数位
  2. 下降沿得到数据奇数位
  3. 一个时钟周期得到奇数位和偶数位(一个时钟周期T可以得到一个完整的采样点)

LVDS Buffer Differential Termination

在这里插入图片描述

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

系统同步:芯片仅提供数据给FPGA

Register Initialization

在这里插入图片描述

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.

在这里插入图片描述

Typical Application

在这里插入图片描述

由于ADS42LBx9是一款双通道设备,它可以用于双通道超外差接收机,如图109所示。在超外差接收机中,高频射频信号首先混频至较低的中频信号(IF)。ADS42LBxx可以用于中频级别,对中频信号进行采样和数字化。数字数据可以以偏移二进制或二进制补码格式编码,并传输到可编程逻辑门阵列(FPGA)或特定应用集成电路(ASIC)。在FPGA或ASIC内部,数字数据通过数字混频器和数字控制振荡器(NCO)进行下变频到基带频率。

ee 采样定理

在这里插入图片描述

D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\专业基础\信号与系统\采样专题笔记.pdf

Excerpt

采样定理是数字信号处理领域的重要定理。定理内容是连续信号(通常称作“模拟信号”)与离散信号(通常称作“数字信号”)之间的一个基本桥梁。它确定了信号带宽的上限,或能捕获连续信号的所有信息的离散采样信号所允许的采样频率的下限。

在这里插入图片描述

​ 图1:带宽限制的函数的傅里叶变换的模

严格地说,定理仅适用于具有傅里叶变换的一类数学函数,即频率在有限区域以外为零(参照图1)。离散时间傅里叶变换(泊松求和公式的一种形式)提供了实际信号的解析延拓,但只能近似该条件。直观上我们希望,当把连续函数化为采样值(叫做“样本”)的离散序列并插值到连续函数中,结果的保真度取决于原始采样的密度(或采样率)。采样定理介绍了对带宽限制的函数类型来说保真度足够完整的采样率的概念;在采样过程中"信息"实际没有损失。定理用函数的带宽来表示采样率。定理也导出了一个数学上理想的原连续信号的重构公式。

在这里插入图片描述

简介:

采样是将一个信号(例如时间或空间上连续的函数)转换为数字序列(时间或空间上离散的函数)的过程。这个定理的香农版本陈述为:[2]

如果周期函数 x(t) 不包含高于 B cps(次/秒)的频率,那么,一系列小于 1/(2_B_) 秒的x(t)函数值将会受到前一个周期的x(t)函数值影响。

因此 2_B_ 样本/秒或更高的采样频率将能使函数不受干扰。相对的,对于一个给定的采样频率 fs,完全重构的频带限制为 Bfs/2。

混叠:

在这里插入图片描述

二个正弦波的频率不同,但其采样值相关,其中至少有一个的频率超过采样率的一半

如果不能满足上述采样条件,采样后信号的频率就会重叠,即高于采样频率一半的频率成分将被重建成低于采样频率一半的信号。这种频谱的重叠导致的失真称为混叠,而重建出来的信号称为原信号的混叠替身,因为这两个信号有同样的样本值。

ef 傅里叶变换

在这里插入图片描述

若_x_(t)为一函数,其傅里叶变换_X_(f)为:

在这里插入图片描述

离散序列X(m)定义如下:

在这里插入图片描述

频谱移动Fwo

频谱右移相当于数字上变频(Digital Up Converter, DUC)

频谱左移相当于数字下变频(Digital Down Converter, DDC)

在这里插入图片描述

eg 欧拉公式

对于任意实数x, 以下等式恒成立:

eix = cosx + isinx

由此也可以推导出

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

当x = π时,欧拉公式的特殊形式为 : e + 1 = 0

在这里插入图片描述

根据欧拉公式,e-jwt = cos(wt) - jsin(wt)代入离散频率序列可得:

在这里插入图片描述

复杂的指数形式分解为两部分:实部和虚部,其中X(m)为第m个DFT输出部分,m为在频域DFT输出的序号;X(n)为输入样值序列;n为输入样值的时域序号;N为输入序列的样值数量和DFT输出频率点的数量。

eh 频率分量

不同正弦波的准确频率取决于两个因素:对原始信号采样时的采样率fs采样个数N。举个例子,假设以每秒500次的采样率对一个连续的信号进行采样,然后对样值序列进行16点DFT运算,那么得到的正弦波基础频率为fs/N=500/16’即31.25 Hz,易知其他X(m)的正弦波频率就是基本频率的整数倍,具体如下:

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点DFT的余弦波频率分量
fanalysis(m) = (m * fs) / N
所以在这个例子中,DFT运算后的X(0)项表明这个输入信号包含0Hz的DC(直流)分量的幅度

ei DFT输出结果项X(m)复数的三角关系

很多时候会对每个X(m)分量中的度和功率(幅度的平方)都非常感兴趣,如图3.1所示,可以用直角三角形来形象地表示X(m)的幅度计算。

在这里插入图片描述

用实部和虚部可以表示任意一个DFT输出值:
X(m) = Xreal(m) + jXimag(m) = 相位Xθ(m) 处的Xmag(m)

X(m)的模值

在这里插入图片描述

根据定义,X(m)的相位角Xθ(m)可以由以下公式得到:

在这里插入图片描述

X(m)的功率大小,简称功率谱,即幅度的平方,它的定义如下:

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

DFT有一个非常重要的性质——线性。这个性质可以表述为两个信号之和的DFT等于每个信号DFT之和。DFT频率分辨率是fs/N

ej FFT与DFT的关系

N点DFT中复数乘法的数量为:

在这里插入图片描述

N点FFT算法中复数乘法的数量大约是:

在这里插入图片描述

在这里插入图片描述

ek 基2FFT蝶形算法

WN = e-j2π/N => WN = Cos(2π / N) - jSin(2π / 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;

在这里插入图片描述

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均为自然数,a为正整数)

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

  • 对称性:Wk+N/2_N = -Wk_N
  • 周期性:Wk+N_N = Wk_N

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

el 传输时延(相位偏移)

情况一:两个芯片离的比较近,走线(蛇形走线)延时控制的好且工作在室温环境下,此时不需要调用IDELAY原语(时钟采样在数据的中心位置)

情况二:采样频率高、温度特性(高温、低温),总线长度影响延时

  1. FPGA调用IDELAY原语,FIXED模式调整延时(局限性:确定挡位,保证时钟和数据的相位偏移关系,使时钟采样边沿在数据的中心位置处)
  2. 动态相位调整(DPA),挡位自动调试选择(取可行挡位范围内的中间挡位)

em 动态相位调整技术DPA

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

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

概述

为了解决FPGA与高速ADC数据流传输的准确性问题,结合Xilinx FPGA器件的结构特点,引入了动态相位校准技术,有效的解决实际问题遇到的时钟与数据相位偏移问题。

引言

动态相位调整DPA(Dynamic Phase Alignment)技术,使根据当前信号各信号线的物理状态,在每次系统上电后,自动对相应信号进行去偏移操作,从而使相位调整的参数适合当前物理状态。保证了数据的可靠传输。

在这里插入图片描述

ChipSync结构图

端口I/O位数描述
ref_clockinput1校准时钟参考源
delay_resetinput1输入延迟器的复位端口
delay_data_ceinput1延迟值增减的使能端口
delay_data_incinput1控制延迟值增减,本系统设置为增加模式
delay_lockedoutput1校准时钟锁存稳定信号

在这里插入图片描述

校准设计流程图

模块设计Verilog程序相关端口

端口I/O位数描述
ad_clkinput1时钟源
rstinput1复位端口
ad_datainput14FPGA接受的14位采样数据
ad_auto_adjust_startinput1自动校准模块开始信号
ad_auto_adjust_doneoutput1自动校准模块完成信号
ad_auto_adjust_goodoutput1校准成功信号
idelay_doneoutput1延迟值增加的使能端口

en 描述一下你接触过的仿真方式

三种仿真方式:

  1. 集成开发软件调用仿真,如QuartusⅡ-Modelsim或Vivado
  2. ModelSim直接调用工程仿真
  3. 编写脚本仿真,如.do, .tcl

eo 数字滤波器

D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\专业基础\信号与系统\数字滤波器的MATLAB与FPGA实现 第2版 [杜勇 编著] 2014年版.pdf

线性时不变系统

任意序列x(n)均可表示成单位取样序列δ(n)的位移加权和,即
在这里插入图片描述

对于某个系统,我们将输入信号为δ(n)的响应称为单位取样脉冲响应h(n),即

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

根据线性时不变系统的定义很容易得出,对于任意一个输入序列,其系统响应为

在这里插入图片描述

FIR滤波器的原理

FIR(Finite Impluse Response)滤波器,即有限脉冲响应滤波器,顾名思义, 指单位脉冲响应的长度是有限的滤波器。
具体来讲, FIR 滤波器的突出特点是其单位取样响应 h(n) 是一个N点长的有限长序列,
0<=n<=N-1。滤波器的输出 y(n) 可表示为输入序列 x(n) 与单位取样响应 h(n) 的线性卷积。

在这里插入图片描述

fir1函数功能介绍

MATLAB可以使用fir1函数设计低通、带通、高通、带阻等多种类型的具有严格线性相位特性的FIR 滤波器。需要清楚的是,fir1函数设计滤波器实际上是采用了窗函数设计方 法。fir]函数的语法形式有以下儿种。

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

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

【window】: FDATOOL工具中对应设计方法下拉选项为窗,选项选择需要的窗口类型,比如Hamming

其中,各项参数的意义及作用如下所述。

  • b : 返回的 FIR 滤波器f(L位脉冲响应,脉冲响应为偶对称,长度为n+1。
  • n : 滤波器的阶数,需要注意的是,设计出的滤波器长度为n+1。
  • wn : 滤波器截止频率;需要注意的是,wn的取值范围为0<wn<1, 1对应为信号采样频率的1/2:如果wn是单个数值,且ftype参数为low,则表示设计截止频率为wn的低通滤波器,如ftype参数为high,则表示设计截止频率为wn的高通滤波器;如果wn 是由两个数组成的向量[wn1 wn2], ftype 为stop, 则表示设计带阻滤波器,ftype 为bandpass, 则表示设计带通滤波器; 如果wn 是由多个数组成的向量, 则表示根据ftype 的值设计多个通带或阻带范围的滤波器, ftype 为DC-1, 表示设计的第一个频带为通带, ftype 为DC-0, 表示设计的第一个频带为阻带。
  • window : 指定使用的窗函数向量, 默认为海明窗 (Hamming), 最常用的窗函数有汉宁窗 (Hanning)、海明 (Hamming) 窗、布拉克曼 (Blackman) 窗和凯塞 (Kaiser)窗, 可以在 MATLAB 界面中输入 help window 命令查询各种窗函数的名称。
  • noscale : 指定是否归一化滤波器的幅度。

函数使用方法

比如要设计一个归一化截止频率为0.2, 阶数为 11、 采用海明窗的低通滤波器, 只需在 MATLAB 命令窗口中依次输入以下几条命令, 即可获得滤波器的单位脉冲响应及滤波器的幅频响应图。

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

ep 带通采样定理

芯片只能处理数字信号,而现实生活中的很多信号是模拟信号,因此需要将模拟信号转换为数字信号。在转换过程中需要三个步骤:采样、量化、编码

采样:又称为抽样或取样,把时间连续的信号转换为时间不连续的脉冲。该脉冲信号称为采样信号,采样信号在时间轴上是离散的,但在幅度(y轴)上仍是连续的。把采样信号变为在时间上离散,在幅度上也离散的过程叫作量化。

量化:是一个数值分层过程,即四舍五入过程。

编码:是将量化后的数字信号的幅值,变换成一组组对应的二进制数组。

第一步的采样最为关键,关系到模数转换,再到数模转换。经过几次变换,传输的信号还要保持不变,这样的通信才算完整可靠。

采样定理说明采样频率与信号频谱之间的关系,是连续信号离散化的基本依据。 其采样频率能捕获连续时间信号的所有信息。

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

低通采样定理(奈奎斯特采样)是要求大于信号的最高上限频率的两倍

【提示】:此采样定理是万能的,理论上可利用此定理对带通信号采样。

2.带通采样定理

带通信号的采样频率在某时,小于低通采样频率也能无失真恢复原信号

三、带通采样定理

奈奎斯特采样定理讨论的是频谱分布在( 0,fH)上的基带信号的采样问题。但对于接收机,接收信号大多为调制的射频信号,射频信号的频率上限远高于基带信号的频率上限,且仅分布在有限的( fL, fH)范围内。

在这里插入图片描述

上图为带通信号的频谱图(一般都是已调信号)

在这里插入图片描述

对带通信号采用低通抽样定理抽样,也不会造成频谱混叠,但会发现0~fL区间频谱没有使用,且一般fH很大,所以采样率很高,大大降低了信道的利用率

现实生活中信号带宽B并不一定很宽可能为几M,但 fH可能为几十个G,AD也难以实现如此高的采样率,这时,低通采样定理已经不能满足实际中的使用要求,从而催生了带通采样的应用。

在这里插入图片描述

带通采样定理:设带通信号频带仅在( fL~fH)之间,信号带宽即为B = fH - fL,则最小采样速率fs = 2B(1 + k/n),其中k为fH/B的小数部分,n为fH/B的整数部分

在这里插入图片描述

在这里插入图片描述


带通采样的限制条件

只允许在其中一个频带上存在信号,而不允许在不同的频带同时存在信号,否则将会引起信号混叠。

eq 求输入信号的响应(卷积)

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

er 频分复用和时分复用

频分复用(FDM,Frequency Division Multiplexing)就是将用于传输信道的总带宽划分成若干个子频带(或称子信道),每一个子信道传输1路信号。频分复用要求总频率宽度大于各子信道频率之和,同时为了保证各子信道中所传输的信号互不干扰,应在各子信道之间设立隔离带,这样就保证了各路信号互不干扰(条件之一)。频分复用技术的特点是所有子信道传输的信号以并行的方式工作,每一路信号传输时可不考虑传输时延。

在这里插入图片描述

时分复用(TDM,Time Division Multiplexing)就是将提供给整个信道传输信息的时间划分成若干时间片(简称时隙),并将这些时隙分配给每一个信号源使用,每一路信号在自己的时隙内独占信道进行数据传输。时分复用技术的特点是时隙事先规划分配好且固定不变,所以有时也叫同步时分复用。其优点是时隙分配固定,便于调节控制,适于数字信息的传输,缺点是当某信号源没有数据传输时,它所对应的信道会出现空闲,而其他繁忙的信道无法占用这个空闲的信道,因此会降低线路的利用率。

es Run simulation、Synthesis、Implementation、Generate Bitstream,各自作用与区别

在Vivado 2019.1中,Flow Navigator提供了一系列主要的设计任务选项,每个选项用于不同的设计阶段。以下是这些选项的作用和区别:

  1. Run Simulation:
    • 运行仿真任务。
    • 用于验证设计的功能和时序。
    • 可以使用不同的仿真工具(如XSIM或ModelSim)来进行功能仿真或时序仿真。
    • 主要用于确认设计在逻辑上是否是正确。

【RTL Analysis】: 将用户的设计输入细化成逻辑电路,也就是常说的RTL电路。

  1. Run Synthesis:

    • 运行综合任务。
    • 将设计的高级RTL代码转换为门级表示。
    • 生成网表表示以供后续实现步骤使用。

    【门级网表】: 其表示门与门之间的虚拟连接关系,并没有规定每个门的位置以及连线的长度。

  2. Run Implementation:

    • 运行实现任务。
    • 在FPGA上实际映射、布局和布线设计,以最大的限度提高电路的性能和减少资源的使用。
    • 这是将设计映射到特定FPGA器件的阶段,它也包括了时序分析和时序优化。

    【布局】: 是将门级网表的每一个门“安置”到CLB中的过程,这是一个映射的过程。
    【布线】: 是利用FPGA内部丰富的布线资源将CLB根据逻辑关系连接在一起的过程。

  3. Generate Bitstream:

    • 生成FPGA的位流文件(Bitstream)。
    • 这是将设计编程到FPGA器件的最后一步。
    • Bitstream包含了FPGA的配置信息,用于将设计加载到FPGA上。
    • 在这一步之前,必须先完成综合、实现和位文件生成。

    【固化程序】: 还可以通过配置同时生成.bin文件。

这些选项按照设计流程的不同阶段提供了不同的功能。通常,您会按照以下顺序执行这些任务:先进行Run Simulation验证设计的正确性,然后运行Run Synthesis和Run Implementation来准备设计,最后生成Bitstream并将其加载到FPGA器件上。

et Virtual Input/Output(VIO)

D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\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.

在这里插入图片描述

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 NameI/ODescription
clkIDesign clock used to register input ports and output ports. This is required.
probe_in[ – 1:0]IInput 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]OOutput 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滤波器资源消耗

在设计FIR滤波器的时候,可以设计为对称性滤波器和非对称性滤波器。在设计滤波器的时候,假如设计滤波器的阶数为N阶,则滤波器的实际长度为(N + 1)阶。下面举例说明一下FIR滤波器资源的消耗,如果滤波器的实际长度为513阶,对称性滤波器则消耗257个DSP,非对称性滤波器则消耗513个DSP。

FIR滤波器的资源消耗还可以进一步被节省,当需要被过滤的信号是一个慢数据流,而FIR滤波器的工作时钟是一个快时钟,DSP还可以进一步复用。假如慢数据流是基于38.4MHz产生的,FIR滤波器工作时钟是230.4MHz,用一个实际长度为513阶的对称性滤波器过滤:消耗DSP为513 / 2 = 257,257 / 6 = 43个DSP。

ev AXI总线和AXI接口以及AXI协议

D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\XC7VX690T-2FFG1927I\02_XILINX ZYNQ裸机篇2019版.pdf

总线、接口和协议,这三个词经常被联系在一起,但是三者有区别。

总线是一组传输通道,是各种逻辑器件构成的传输数据的通道,一般由数据线、地址线、控制线等构成。

接口是一种连接标准,又被称为物理接口。

协议就是传输数据的规则。

概述

ZYNQ拥有ARM+FPGA 这个神奇的架构,ARM 和FPGA 通过AXI4 总线进行通信。

AXI总线与ZYNQ的关系

AXI(Advanced eXtensible Interface)本是由ARM 公司提出的一种总线协议,Xilinx 从6 系列的FPGA 开始对AXI 总线提供支持,此时AXI 已经发展到了AXI4 这个版本

【AXI: 高速可扩展接口】:① FIR Compiler核使用的就是AXI接口,如信号S_AXIS_DATA和M_AXIS_DATA,其中S代表Slave,表示FIR核作为从机接收数据;M代表Master,表示FIR核作为主机发送数据。② MIG(Memory Interface Generator)配置时可以配置成AXI4接口,调试DDR3时并未选择AXI4接口。③ FIFO Generator核的配置中可以设置接口类型为AXI Stream。

AXI总线概述

在ZYNQ中有支持三种AXI总线,拥有三种AXI接口,当然用的都是AXI协议。其中三种AXI总线分别为:

AXI4:(For high-performance memory-mapped requirements.)主要面向高性能地址映射通信的需求,是面向地址映射的接口,允许最大256轮的数据突发传输;

AXI4-Lite:(For simple, low-throughput memory-mapped communication)是一个轻量级的地址映射单次传输接口,占用很少的逻辑单元。

AXI4-Stream:(For high-speed streaming data.)面向高速流数据传输;去掉了地址项,允许无限制的数据突发传输规模。

AXI4总线和AXI4-Lite总线具有相同的组成部分:

  1. 读地址通道,包含ARVALID, ARADDR, ARREADY信号;
  2. 读数据通道,包含RVALID, RDATA, RREADY, RRESP 信号;
  3. 写地址通道,包含AWVALID,AWADDR, AWREADY 信号;
  4. 写数据通道,包含WVALID, WDATA,WREADY,WSTRB 信号;
  5. 写应答通道,包含BVALID, BRESP, BREADY 信号;
  6. 系统通道,包含:ACLK,ARESETN 信号。

AXI4总线和AXI4-Lite总线的信号也有他的命名特点:

  • 读地址信号都是以AR 开头(A:address;R:read)
  • 写地址信号都是以AW 开头(A:address;W:write)
  • 读数据信号都是以R 开头(R:read)
  • 写数据信号都是以W 开头(W:write)
  • 应答型号都是以B 开头(B:back(answer back))

了解到总线的组成部分以及命名特点,那么在后续的实验中您将逐渐看到他们的身影。每个信号的作用暂停不表,放在后面一一介绍。

AXI4-Stream总线的组成有:

  1. ACLK信号:总线时钟,上升沿有效;

  2. ARESETN信号:总线复位,低电平有效;

  3. TREADY信号:从机告诉主机做好传输准备;

  4. TDATA信号:数据,可选宽度32,64,128,256bit;

  5. TSTRB信号:每一bit 对应TDATA 的一个有效字节,宽度为TDATA/8;

    【STRB】: strobe选通

  6. TLAST信号:主机告诉从机该次传输为突发传输的结尾;

  7. TVALID信号:主机告诉从机数据本次传输有效;

  8. TUSER信号 :用户定义信号,宽度为128bit。

AXI协议之握手协议

AXI4所采用的是一种READY,VALID 握手通信机制,简单来说主从双方进行数据通信前,有一个握手的过程。传输源产生VLAID信号来指明何时数据或控制信息有效。而目的源产生READY信号来指明已经准备好接受数据或控制信息。传输发生在VALID 和READY 信号同时为高的时候。VALID 和READY 信号的出现有三种关系。

(1)VALID 先变高READY 后变高。时序图如下:

在这里插入图片描述

在箭头处信息传输发生。
(2)READY 先变高VALID 后变高。时序图如下:

在这里插入图片描述

同样在箭头处信息传输发生。
(3)VALID 和READY 信号同时变高。时序图如下:

在这里插入图片描述

在这种情况下,信息传输立马发生,如图箭头处指明信息传输发生。
需要强调的是,AXI 的五个通道,每个通道都有握手机制

突发式读写

1、突发式读的时序图如下:

在这里插入图片描述

当地址出现在地址总线后,传输的数据将出现在读数据通道上。设备保持VALID 为低直到读数据有效。为了表明一次突发式读写的完成,设备用RLAST 信号来表示最后一个被传输的数据。
2、 突发式写时序图如下:

在这里插入图片描述

在这里插入图片描述

这一过程的开始时,主机发送地址和控制信息到写地址通道中,然后主机发送每一个写数据到写数据通道中。当主机发送最后一个数据时,WLAST 信号就变为高。当设备接收完所有数据之后他将一个写响应发送回主机来表明写事务完成。

ew Serial RapidIO(SRIO)

D:\.lnk\ChineseTechnology\ChineseMedicine\相关文档\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 TableCore Specifics
Supported Device FamilyUltraScale+™ Families,
UltraScale™ Architecture, Zynq®-7000,
Virtex®-7, Kintex®-7, Artix®-7
Supported User InterfacesAXI4-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

在这里插入图片描述

gt: Giga Transceivers

Recommended Speed Grade Details

Link
Width
Performance per
Lane (Gb/s)
Artix-7Kintex-7Virtex-7Zynq-7000UltraScale
1x3.125/2.5/1.251, 2L1, 2L1, 2L11, 1L
52, 2L1, 2L1, 2L11
6.252, 2L1, 2L1, 2L11
2x3.125/2.5/1.251, 2L1, 2L1, 2L11, 1L
52, 2L1, 2L1, 2L11
6.25NA1, 2L1, 2L11
4x3.125/2.5/1.251, 2L
(3.125 no 2L support)
1, 2L1, 2L11, 1L
5NA22, 2L22
6.25NA3333

【SPARTAN-7】: 该系列芯片没有高速串行收发器
Reference Clock Frequency: 配置SRIO核时提供的参考时钟数值,可选125MHz或156.25MHz
【Shared Logic】: 一个GTX Quad包含一个GTX Common,如果多个GTX接SRIO核,则第一个核配置需要选择Include Shared Logic in Core输出时钟信号,其他SRIO核连接该输出信号线即可。·

在这里插入图片描述

LOG Interfaces

在这里插入图片描述

SignalDirectionDescription
log_lcl_log_clkOutputClock 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_rstInputReset for LOG. Must deassert synchronously to log_clk. See Resets in Chapter 3.
log_lcl_cfg_clkInputConfiguration 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_rstInputConfiguration 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
SignalDirectionDescription
s_axis_ireq_tvalidInputIndicates that the information on the interface is valid.
s_axis_ireq_treadyOutputHandshaking signal. Indicates that the data from the source is accepted (if valid).
s_axis_ireq_tkeep[7:0]InputByte 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_tlastInputIndicates the last beat of a packet.
s_axis_ireq_tuser[31:0]InputHELLO 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 TypeFTYPETTYPETransmit PortReceive PortDescription
NREAD00100100Condensed I/O: iotx; Initiator/Target: ireqCondensed I/O: iorx; Initiator/Target: treqBasic read request transaction. Request does not have a data payload. Results in a response with data.
NWRITE01010100Condensed I/O: iotx; Initiator/Target: ireqCondensed I/O: iorx; Initiator/Target: treqBasic write operation. Request has a data payload. Does not result in a response.
NWRITE_R01010101Condensed I/O: iotx; Initiator/Target: ireqCondensed I/O: iorx; Initiator/Target: treqBasic write operation. Request has a data payload. Results in a response with no data.
SWRITE0110N/ACondensed I/O: iotx; Initiator/Target: ireqCondensed I/O: iorx; Initiator/Target: treqStreaming write operation (uses less header fields than NWRITE). Request has a data payload. Does not result in a response.
DOORBELL1010N/ACondensed I/O: iotx; Initiator/Target: ireqCondensed I/O: iorx; Initiator/Target: treqVery 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.

在这里插入图片描述

HELLO Format Detail

FieldBitsDescription
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.

在这里插入图片描述

ex Git指令

在这里插入图片描述

%查看当前Git软件的安装版本
git -v
git --version

%获取软件的配置信息
git config -l

%名称和邮箱,设定全局用户
git config --global user.name test
git config --global user.email test@atguigu.com

%初始化版本库
git init

%查看版本库状态
git status

%将文件纳入到版本库的管理
git add test.txt

%确定要把文件放置在版本库中
# commit表示真正地纳入到版本库中
# -m 表示提交时的信息(message),是必须输入的。用于描述不同版本之间的差别信息
git commit -m "my first git file"

%查看当前提交
git show

%查看版本库文件历史
git log --oneline

%从版本库中恢复文件
git restore test.txt

%将版本库文件重置到某一个版本
# 这里的f2f113f就是版本Hash值,用于唯一确定版本库中此版本的标记
# 当然了这是一个简短版,完整的比较长
# 如果不记得具体的版本值,版本值也可以使用HEAD值,比如最新的上一个版本:HEAD^
# 如果后退更多的版本,可以使用 HEAD~N
git reset --hard f2f113f

%创建分支
# git branch 分支名称
git branch b1
git branch b2

%查看分支
git branch -v

%切换分支
# git checkout 分支名称
git checkout b1

%删除分支
# git branch -d 分支名称
Git branch -d b2

%其他分支
# 基于主干分支的内容,我们创建其他分支,并直接切换到新的分支
# git checkout -b 分支名称
git checkout -b new_branch

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

%将远程仓库克隆到本地
# 克隆远程仓库 => 用户@主机名:仓库地址
git clone -b main --single-branch git@linux1:/home/git/git-rep/test.git

%关联远程仓库,增加远程地址
git remote add origin git@github.com:Aitiger-coffee/git-study.git

%将本地仓库同步到远程仓库
# 同步远程仓库
# 远程仓库默认有个别名叫origin,将本地仓库的文件推送(push)到远程仓库
# git push 远程仓库别名 分支名称
git push origin master

Linux系统操作指令

指令含义说明
cd 目录change directory改变操作目录
cd …退回到上一级目录
pwdPrint work directory打印当前工作目录
lslist directory contents显示当前目录的文件及子文件目录
llls -l 简化版本更详细地显示当前目录的文件及子文件目录
mkdir 文件夹名称make directory新建一个文件夹
rm 文件remove删除文件
rm -r 文件夹Remove删除文件目录
touch 文件如果创建的文件不存在,那么创建一个空文件
reset清屏
clear清屏
exit退出终端窗口

ey 什么是竞争与冒险现象?如何判断?怎样消除?

组合电路中,某一输入信号经过不同的途径传播后,由于路径延迟不同,使得到达电路中某一个逻辑门会合点的时间有先有后,这种现象叫做竞争,由于由竞争而产生的尖脉冲或者说毛刺就叫做冒险。

判断方法:

  • 代数法:如果布尔表达式中有相反的信号则可能产生竞争和冒险的现象。如果表达式为:F = A + A‘,就会产生“1”冒险;F = A * A’,就会产生“0”冒险;

  • 卡诺图:有两个相切的卡诺圈并且相切处没有被其他卡诺圈包围,就有可能出现竞争冒险;

  • 实验法:示波器观察

消除方法:

  • 接入滤波器电容;消除毛刺影响;
  • 利用可靠性编码;
  • 可以在表达式中增加冗余项消除逻辑冒险。

ez 阻塞性赋值与非阻塞性赋值的区别

阻塞赋值非阻塞赋值
符号=<=
执行顺序顺序执行并发执行
应用组合逻辑块时序逻辑块
  • 29
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
FPGA是一种可编程逻辑器件,其内部包含大量的逻辑门和触发器,可以根据需要进行配置和重新编程,从而实现特定的电路功能。在FPGA面试过程中,通常会涉及以下几个重要的问题和笔记讲解: 1. 请简要介绍FPGA的工作原理和优点。 FPGA的工作原理是通过可编程逻辑器件中的LUT(查找表)和触发器来实现逻辑和存储单元的功能。其优点包括可重构性、灵活性和性能高。相比于ASIC芯片,FPGA可以根据需求进行可编程配置,无需重新设计和制造新的芯片,节约了时间和成本。 2. 请描述FPGA的编程方式和常用的编程语言。 FPGA的编程方式主要包括硬件描述语言和图形化编程工具。硬件描述语言常用的有VHDL和Verilog,这些语言允许开发人员以类似于C或C++的语法描述硬件电路。另一种方式是使用图形化编程工具,如Xilinx的Vivado和Altera的Quartus等。 3. 请解释PLL和内存单元在FPGA中的作用。 PLL(锁相环)在FPGA中用于时钟生成和时钟管理,可以将输入的低频时钟调频到更高的频率,并提供稳定的时钟信号给FPGA内部的逻辑电路。内存单元主要用于存储临时数据和状态信息,提供给FPGA内部的逻辑进行读写操作。 4. 请描述FPGA的时序约束和时序分析。 在FPGA设计中,时序约束是用来定义时钟信号和数据之间的关系,以确保设计在指定的时钟频率下能够正常工作。时序分析则是通过对设计的时序约束与实际电路的延时关系进行比较,评估设计是否满足时序要求。 总结:FPGA是一种可编程逻辑器件,广泛应用于数字电路设计和嵌入式系统开发面试过程中,除了上述问题,还可能涉及到FPGA的资源利用率、功耗优化、时序约束设置、时序分析方法等方面的考察。因此,熟悉FPGA的工作原理和编程方式,以及掌握相关的设计技巧和工具是非常重要的。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值