Getting Started Design With FPAG (ZYNC-ZED)
Getting Started Design With FPAG (ZYNC-ZED)
Getting Started Design With FPAG (ZYNC-ZED)
Simulink
System Generator
Vivado
Design Verification
Zedboard
PS AXI PL
PC uart ARM A GPIO
Address
X IP Core
ARM I
Data (real &
imag)
(System
Generation
designed)
Simple Logic Design Example
Signal generation
AWG
AWG (NLFM)
System Generator
Xilinx Memory Block
1 2 3 4
System Vivado Xilinx SDK Matlab
Generator
(Generate the (Modify the C (Plot the figure
(Design the bitstream file) program and after receiving
Logic Flow obtain the the data)
by using data)
Matlab file)
Matlab Programming (Signal Generation)
• When opening the main window in System Generator, it is almost the same to the Matlab.
• However, you will find some more function blocks in Simulink libraries’ list after you click the
“Simulink Library” .
• Firstly, the m-file of NLFM signal generation have to be saved in one folder which you will use.
Logic Design for Data Loading (Writing)
ADDRS 1 Data 1
2 Data 2
Real Data of NLFM
3 Data 3
ROM .
.
.
.
. .
N Data N
1 Data 1
2 Data 2
Imag Data of NLFM
ROM 3
.
Data 3
.
. .
. .
N Data N
Logic Design for Data Loading (Writing)
1 Data 1
2 Data 2
3 Data 3 Real Data of NLFM
. .
. .
. .
N Data N
Courter
1 Data 1
2 Data 2
3 Data 3 Imag Data of NLFM
. .
. .
. .
N Data N
The final design of our aim is shown as above in the Simulink.
Next let us find each block in the Simulink library and set each parameter step by step.
Detailed Steps for System Generator
Logic Design
Xilinx Token
“ROM” is the key block in this example, and widely used in FPGA design.
Here this block is added in the subsystem.
ROM Setting
Basic:
Depth: Nsample_signal
Initial value vector: real(xref_sp2)
Output:
Number of bits: 16
Binary points: 15
ROM Setting
ROM Setting
ROM Setting
Basic:
Depth: Nsample_signal
Initial value vector: imag(xref_sp2)
Output:
Number of bits: 16
Binary points: 15
Other Blocks Settings
The remained blocks are easily found and added in the design.
Reinterpret:
Tick “Force Binary Point”
Verification
Double
Click
Every design element is picked up and all the parameters are set.
Gateway In Setting
Double
Click
Gateway Out Setting
Click “Generate”
1. Input “GPIO”.
2. Choose “AXI GPIO”, and click
it.
1. Input “Concat”.
2. Choose “Concat”, and click it.
3. There are not any other
settings for “Concat”,all are
defaulted.
IP Settings
Repository Manager Add Repository
3 2
4
#include "xgpio.h"
#include "xil_printf.h"
XGpio gpio_1;
Input codes:
void init_gpio()
{
XGpio_Initialize(&gpio_1,gpio_id_1);
XGpio_SetDataDirection(&gpio_1,1,0);
XGpio_SetDataDirection(&gpio_1,2,0x1fff);
}
Find “Xgpio_WriteReg””
in “xgpio.c”
int main()
{
init_platform();
init_gpio();
u32 data_sig;
u16 data_r[5000],data_i[5000];
u32 ii=0;
for(ii=0;ii<5000;ii++)
{
XGpio_DiscreteWrite(&gpio_1,1,ii);
data_sig=XGpio_DiscreteRead(&gpio_1,2);
data_r[ii]=data_sig&0xffff;
data_i[ii]=(data_sig>>16)&0xffff;
xil_printf("%d\r\n",data_r[ii]);
xil_printf("%d\r\n",data_i[ii]);
}
cleanup_platform();
//print("Hello World\n\r");
return 0;
}
ii=find(aa>2^15);
aa(ii)=aa(ii)-2^16;
figure(1)
nlfm_real=aa(1:2:length(aa)-1);
plot(nlfm_real)
1. Load the txt file to the Matalab program.
2. Input the Matlab codes which is saved from figure(2)
the last step 。 nlfm_imag=aa(2:2:(length(aa)));
plot(nlfm_imag)
3. Run the program, the last results will be
shown in the last slide.
Thanks~~