21
XILINX CONFIDENTIAL . Design AXI Master Page 1

XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

Embed Size (px)

Citation preview

Page 1: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

Design AXI Master

Page 1

Page 2: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 Xilinx

Understanding Zynq AXI Master

IP axi_user_npi

Page 2

Agenda

Page 3: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 Xilinx

AXI is Part of AMBA: Advanced

Microcontroller

Page 3

What is AXI?

Variations of AXI

Page 4: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 Xilinx

AXI4– Memory mapped

Page 4

Variations of AXI

AXI4-Lite: – Register mapped

AXI4-Stream: – Streaming

Page 5: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 5

Why Xilinx Choose AXI?

Page 5

ExternalMemoryExternalMemory

TimerTimer SRAMSRAM UARTUARTGPIOGPIO

Microblaze

BRAM LMB

MPMC

PLBv46

Video

TEMAC

Custom IP

VFBC

Local Link

NPI

PLB to IPIF Bridge

PLB to IPIF Bridge Custom IPCustom IP

IPIF

Xilinx Cache Link

Hardware Accelerator

FSL

1

2

3

4

56

7

8

TOO COMPLEX….

Page 6: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 6

Why Xilinx Choose AXI?

Page 6

ExternalMemoryExternalMemory

TimerTimer SRAMSRAM UARTUARTGPIOGPIO

Microblaze

BRAM LMB

MPMC

AXI

Video

TEMAC

Custom IP

AXI

AXI

AXI

AXI to IPIF Bridge

AXI to IPIF Bridge Custom IPCustom IP

IPIF

AXI

Hardware Accelerator

AXI

1

2

2

2

22

2

3

Too Simple ….

Page 7: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 Xilinx

Channel– Read address

– Write address

– Read data

– Write data

– Write response

Page 7

AXI Protocol, Channel

Page 8: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 8

AXI Protocol, AXI4

Single address multiple data– Burst up to 256 data beats

Data width parameterizable– 32, 64, 128, 256

AXI4 READ

AXI4 WriteBest for memory access

Page 9: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 9

AXI Protocol, AXI4_LITE

Single address Single data– No Burst

Data width– 32

AXI4-Lite Read

AXI4-Lite Write

Best for register access

Page 10: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 10

AXI Protocol, AXI4_STREAM

No address channel

Not read and write, always just master to slave

Unlimited burst length

Best for video, audio

Page 11: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 11

ZYNQ

High Performance Port

General Performance Port

AXI Master

AXI Slave

Master

MasterSlave

Page 12: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 12

How to Design AXI Master

CIP

Select AXI type

Select Master

Page 13: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

Page 13

How to Design AXI Master, example

MPD– Default parameter

PAO– Order for synthesis

TEST_IP.VHD– Top level

USER_LOGIC.VHD– User logic

Page 14: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

Page 14

How to Design AXI Master

User_logic.vhd– Control

Burst Transaction

Page 15: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

Page 15

Why Design AXI Master

To access DDRx Memory

Why don’t you use BRAM?

Because BRAM is EASY

But BRAM is TOO SMALL

DDRx is LARGE

But DDRx is not EASY

DDRx max 1GB

Zynq Bram 220KB ~ 2180KB

Page 16: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 16

FIFO Instead of IPIC

DDRxIPIC & State

Machine

Remove Complexity

FIFOUserLogicRemove complexity…

Page 17: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 17

Master IP with FIFO, axi_user_npi

IP catalog

Bus

Port

Page 18: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 18

Master IP with FIFO, axi_user_npi

User logic interface

– Simple

– It is FIFO

component system is port (

... wr_fifo_wr_en : in std_logic; wr_fifo_clk : in std_logic; npi_wr_ready : out std_logic; rd_fifo_rd_en : in std_logic; npi_rd_ready : out std_logic; wr_fifo_data : in std_logic_vector(31 downto 0); rd_fifo_clk : in std_logic; rd_fifo_full : out std_logic; rd_fifo_data : out std_logic_vector(31 downto 0); rd_fifo_empty : out std_logic; wr_fifo_full : out std_logic; wr_fifo_empty : out std_logic ); end component;

Page 19: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 19

Master IP with FIFO, axi_user_npi

How to Run?

– Device Driver

Read– Start add– Read Burst Cnt– Repeat Cnt

Write– Start add– Read Burst Cnt– Repeat Cnt

void npi_stop(){}

void npi_start(){}

void axi_npi_rd(int reg, int src, int cnt_burst, int cnt_repeat){}

void axi_npi_wr(int reg, int src, int cnt_burst, int cnt_repeat){}

void axi_npi_reset0(){}

int npi_status(int reg){}

Page 20: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 20

Simulation Result

Burst Write

Burst Read

Page 21: XILINX CONFIDENTIAL. Design AXI Master Page 1. XILINX CONFIDENTIAL. Understanding Zynq AXI Master IP axi_user_npi Page 2 Agenda © Copyright 2012 Xilinx

XILINX CONFIDENTIAL.

© Copyright 2012 XilinxPage 21

Q&A