Introduction t to o AXI Custom om I IP Cristi tian Sister - - PowerPoint PPT Presentation

introduction t to o axi custom om i ip
SMART_READER_LITE
LIVE PREVIEW

Introduction t to o AXI Custom om I IP Cristi tian Sister - - PowerPoint PPT Presentation

Introduction t to o AXI Custom om I IP Cristi tian Sister erna na Universidad Nacional San Juan Argentina ICTP AXI - Custom IP Agen enda Describe the AXI4 transactions Summarize the AXI4 valid/ready acknowledgment model


slide-1
SLIDE 1

Introduction t to

  • AXI –

Custom

  • m I

IP

ICTP AXI - Custom IP

Cristi tian Sister erna na

Universidad Nacional San Juan Argentina

slide-2
SLIDE 2
  • Describe the AXI4 transactions
  • Summarize the AXI4 valid/ready acknowledgment model
  • Discuss the AXI4 transactional modes of overlap and simultaneous operations
  • Describe the operation of the AXI4 streaming protocol

Agen enda

ICTP AXI - Custom IP

slide-3
SLIDE 3
  • There is a need to get familiar with the way that different devices communicate each
  • ther in an Embedded System like a Zynq based system
  • Learning and understanding the communication among devices will facilitate the

design of Zynq based systems

  • All the devices in a Zynq system communicate each other based in a device interface

standard developed by ARM, called AXI (ARM eXtended Interface):

  • AXI define a Point to Point Master/Slave Interface

ICTP

Need eed t to Un Under erstand D Device’ e’s C Connec ectivity

AXI - Custom IP

slide-4
SLIDE 4

ICTP

Tod

  • day’s S

System em-On On-Chi Chip

CPU Vide Controller Ethernet Controller USB SPI DDR Controller Shared DRAM Memory General Purpose I/O DAC ADC

AXI - Custom IP

slide-5
SLIDE 5

Inter erfac ace Op e Option

  • ns

ICTP

Processor

P1 P2 P3 Arbiter

Peripherals

PLBv46 – Bus Spec

PLB PLB PLB PLB

Processor AXI Inteconnect

P1 P2 P3

M_AXI M_AXI M_AXI M_AXI S_AXI S_AXI S_AXI

AXI4 Defines a Point to Point Master/Slave Interface

S_AXI S_AXI M_AXI

AXI - Custom IP

slide-6
SLIDE 6
  • A standard
  • All units talk based on the same standard (same protocol, same language)
  • All units can easily talk to each other
  • Maintanence
  • Design is easily maintained/updated
  • Facilitate debug tasks
  • Re-Use
  • Developed cores can easily re-used in other systems

ICTP

Connec ectivity

  • > S

Standard

AXI - Custom IP

slide-7
SLIDE 7
  • Core Connect (IBM)
  • PLB/OPB (Power PC-FPGA bus interface)
  • WishBone
  • OpenCore Cores
  • AXI
  • ARM standard (more to come . . . )

ICTP

Co Common S SoPC PC Interf rface ces

AXI - Custom IP

slide-8
SLIDE 8

ICTP

AXI XI i is Par art t of

  • f ARM’s A

AMBA

AMBA APB AHB

AXI

Older Performance Newer

AMBA 3.0

(2003)

AMBA: Advanced Microcontroller Bus Architecture AXI: Advanced Extensible Interface

AXI - Custom IP

slide-9
SLIDE 9

ICTP

AXI XI is P Par art of

  • f A

AMBA

AMBA

APB AHB AXI AXI-4 Memory Map AXI-4 Stream AXI-4 Lite ATB

AMBA 3.0

(2003)

AMBA 4.0

(2010)

Same Spec Enhancements for FPGAs

Interface Features Burst Data Width Applications

AXI4 Traditional Address/Data Burst (single address, multiple data) Up to 256 32 to 1024 bits Embedded, Memory AXI4-Stream Data-Only, Burst Unlimited Any Number DSP, Video, Communications AXI4-Lite Traditional Address/Data—No Burst (single address, single data) 1 32 or 64 bits Small Control Logic, FSM

AXI - Custom IP

slide-10
SLIDE 10

AXI is an interconnect system used to tie processors to peripherals

  • AXI Full: Full performance bursting interconnect
  • AXI Lite: Lower performance non bursting interconnect (saves programmable logic

resources)

  • AXI Streaming: Non-addressed packet based or raw interface

ICTP

AXI I Interconnect

AXI - Custom IP

slide-11
SLIDE 11

Channel

  • Independent collection of AXI signals associated to a VALID signal

AX AXI – Vocab abular ary

ICTP AXI - Custom IP

Interface

  • Collection of one or more channels that expose an IP core’s connecting a master to a slave
  • Each IP core may have multiple interfaces

Bus

  • Multiple-bit signal (not an interface or channel)

Transfer

  • Single clock cycle where information is communicated, qualified by a VALID handshake

Transaction

  • Complete communication operation across a channel, composed of a one or more transfers

Burst

  • Transaction that consists of more than one transfer
slide-12
SLIDE 12

AXI XI T Tran ansactio ions / / Mas aster-Slav ave

ICTP

AXI Slave

AXI Master Read Transaction Write Transaction Transactions: transfer of data from one point on the hardware to another point Responds to the initiate transaction Initiates the transaction

AXI - Custom IP

slide-13
SLIDE 13

ICTP

AXI I Interconnect

AXI Master DMA AXI Master CPU

AXI Slave SPI AXI Slave GPIO AXI Slave BRAM

?

AXI Interconnect

M_AXI S_AXI M_AXI S_AXI S_AXI M_AXI S_AXI M_AXI S_AXI M_AXI

AXI - Custom IP

slide-14
SLIDE 14

ICTP

AXI I Interconnect – Addres essing & g & Decod

  • ding

Address Range: 4K Address Offset: 0X4000_0000 Addresses: 0X4000_0000 – 0X4000_0FFF Address Range: 4K Address Offset: 0X4000_1000 Addresses: 0X4000_0000 – 0X4000_1FFF Address Range: 64K Address Offset: 0X4001_0000 Addresses: 0X4001_0000 – 0X4001_FFFF

Address Decoding Table GPIO: 0X4000_0000 SPI: 0X4000_1000 BRAM: 0X4001_0000

AXI - Custom IP

slide-15
SLIDE 15
  • Different Number of (up to 16)
  • Slave Ports
  • Master Ports
  • Data Width Conversion
  • Conversion from AXI3 to AXI4
  • Register Slices (pipelining), Input/Output FIFOs
  • Clock Domains Transfer

ICTP

AXI I Interconnect M Main F Features es

AXI - Custom IP

slide-16
SLIDE 16
  • axi_interconnect component
  • Highly configurable
  • Pass Through
  • Conversion Only
  • N-to-1 Interconnect
  • 1-to-N Interconnect
  • N-to-M Interconnect – full crossbar
  • N-to-M Interconnect – shared bus structure
  • Decoupled master and slave interfaces
  • Xilinx provides three configurable
  • AXI4 Lite Slave
  • AXI4 Lite Master
  • AXI4 Slave Burst
  • Xilinx AXI Reference Guide(UG761)

AXI I Inter erconnec ect

ICTP AXI - Custom IP

slide-17
SLIDE 17

AX AXI I Interf rface ace Example

ICTP AXI - Custom IP

slide-18
SLIDE 18

AX AXI I Interf rface ace Example le

AXI - Custom IP ICTP

slide-19
SLIDE 19

AXI S Slave Si Signals ls

ICTP AXI - Custom IP

slide-20
SLIDE 20

Basic AXI Rd/Wr Process

AXI - Custom IP ICTP

slide-21
SLIDE 21

Master asserts and hold VALID when data is available

ICTP

AXI C Chan annel els U Use e A Bas asic “VALID/READY” H Han andshake e

Master sends next DATA/other signals or deasserts VALID Data and other signals transferred when VALID and READY = ‘1’

DATA VALID READY

AXI Master AXI Slave

ACLK

AXI - Custom IP

1 1 2 2 2 2 5 3 3 3 4 4 4 1 3 3 5 5 5

Slave asserts READY if able to accept data Slave deasserts READY if no longer able to accept data

slide-22
SLIDE 22

ICTP

AXI4 L Lite

AXI Master AXI Slave

Read Address Channel Read Data Channel Address and Control Read Data Read Data Read Data Read Data

  • No Burst
  • Single address, single data
  • Data Width 32 or 64 bits

(Xilinx IP only support 32)

  • Very small size
  • The AXI Interconnect is

automatically generated

Write Address Channel Write Data Channel Write Response Channel Address and Control Write Data Write Data Write Data Write Data Write Response

AXI Master AXI Slave

AXI - Custom IP

slide-23
SLIDE 23

ICTP

AXI C Channel els

AXI4 Read AXI4 Master AXI4 Slave

Read Address Channel Read Data Channel Write Address Channel Write Data Channel Write Response Channel Address and Control Read Data Read Data Read Data Read Data Address and Control Write Data Write Data Write Data Write Data Write Response

AXI4 Master AXI4 Slave AXI4 Write

AXI - Custom IP

slide-24
SLIDE 24

ICTP

AXI4 Lite R e Read

AXI Master AXI Slave

Read Address Channel Read Data Channel Address and Control Read Data Read Data Read Data Read Data

AXI - Custom IP

slide-25
SLIDE 25

ICTP

AXI4 Lite W e Write e

Write Address Channel Write Data Channel Write Response Channel Address and Control Write Data Write Data Write Data Write Data Write Response

AXI Master AXI Slave

AXI - Custom IP

slide-26
SLIDE 26

ICTP

AXI4 I4 (F (Full ll) )

AXI Master AXI Slave

Read Address Channel Read Data Channel Address and Control Read Data Read Data Read Data Read Data

  • Sometimes called “Full AXI”
  • r “AXI Memory Mapped”
  • Single address multiple data
  • Burst up to 256 data
  • Data Width parameterizable
  • 32, 64, 128, 256, 512, 1024

bits

Write Address Channel Write Data Channel Write Response Channel Address and Control Write Data Write Data Write Data Write Data Write Response

AXI Master AXI Slave

AXI - Custom IP

slide-27
SLIDE 27

ICTP

AXI4 S Stream eam

Write Data Channel Write Data Write Data Write Data Write Data

AXI Master AXI Slave

  • No address channel, no read

and write, always just Master to Slave

  • Just an AXI4 Write Channel
  • Unlimited burst length
  • Supports sparse, continuous,

aligned, unaligned streams

AXI - Custom IP

slide-28
SLIDE 28

ICTP

AX AXI S Stream

AXI Master AXI Slave AXI Slave Data Data AXIS_S AXIS_S AXIS_M

AXI - Custom IP

slide-29
SLIDE 29

AXI - Custom IP ICTP

AXI4 – AXI L Lite: Si Signals ls Available

slide-30
SLIDE 30

Custom AXI IPs

ICTP AXI - Custom IP

slide-31
SLIDE 31

Soft IP Cores

Pros Cons HDL (hardware description language) End user can modify it Vendor will not support if IP is modified Encrypted HDL Configurable using parameters Customization is limited to the available parameters Sported by the vendor Gate-Level Netlist High performance Customization is limited to the available parameters Synthesis , Place and Route are controlled by the end user

Differ eren ent Sof Soft IP Core res

AXI - Custom IP ICTP

slide-32
SLIDE 32

 Consistent, easy access  Support for multiple physical locations, including

shared network drives

 Access to the latest version of Xilinx-delivered IP  Access to IP customization and generation using the

Vivado IDE

 IP example designs  Catalog filter options that let you filter by Supported

Output Products, Supported Interfaces, Licensing, Provider, or Status

ICTP

IP C Catal alog M g Mai ain F Features es

AXI - Custom IP

slide-33
SLIDE 33

33

ICTP

IP Pa Packager

 The IP Packager allows a core to be packaged and included in the IP Catalog, or

for distribution

 IP-XACT Industry Standard (IEEE) XML format to describe IP using meta-data

  • Ports
  • Interfaces
  • Configurable Parameters
  • Files, documentation
  • IP-XACT only describes high level information about IP, not low level description, so

does not replace HDL or Software

 Complete set of files include

 Source code, Constraints, Test Benches (simulation files), documentation

 IP Packager can be run from Vivado on the current project, or on a specified

directory

slide-34
SLIDE 34

34

ICTP

My I IP

slide-35
SLIDE 35

35

ICTP

Simplest C Case e – Case 1 e 1

slide-36
SLIDE 36

36

ICTP

Simplest C Case e – Case 1 e 1

my_pw pwm_i _ip_c _c1_0_S_A _AXI.vh vhd: This VHDL file is the one that has the AXI Lite interface. You can open this file and try to understand the code by mainly reading the comments. etc.

slide-37
SLIDE 37

37

ICTP

Simplest C Case e – Case 1 e 1

slide-38
SLIDE 38

38

ICTP

Simplest C Case e – Case 1 e 1

slide-39
SLIDE 39

39

ICTP

Sum ummary

slide-40
SLIDE 40

40

ICTP

Sum ummary

slide-41
SLIDE 41

41

ICTP

Us Using M g My I IP i in V Vivad ado

slide-42
SLIDE 42

42

ICTP

Us Using M g My I IP i in V Vivad ado

slide-43
SLIDE 43

43

ICTP

Us Using M g My I IP i in S SDK

slide-44
SLIDE 44

44

ICTP

Us Using M g My I IP i in S SDK

slide-45
SLIDE 45

45

ICTP

My I IP – Case 2 e 2

This is the VHDL instantiation statement that is necessary to write in the my_pwm_ip_c1_0_S_AXI_inst.vhd file

slide-46
SLIDE 46

46

ICTP

My I IP – Case 2 e 2

slide-47
SLIDE 47

47

ICTP

My I IP – Case 2 e 2

slide-48
SLIDE 48

48

ICTP

My I IP – Case 3 e 3

slide-49
SLIDE 49

49

ICTP

My I IP – Case 3 e 3

slide-50
SLIDE 50

La Lab Cust stom IP IP

AXI - Custom IP ICTP

slide-51
SLIDE 51

Basic PWM Functionality

AXI - Custom IP ICTP

Lab ab Custo stom IP

slide-52
SLIDE 52

AXI - Custom IP ICTP

VHD HDL Co Code de fo for PWM S Simple

slide-53
SLIDE 53

AXI - Custom IP ICTP

VHD HDL Co Code de fo for PWM S Simple

slide-54
SLIDE 54

AXI - Custom IP ICTP

PWM I IP Core - Case 1 e 1

slide-55
SLIDE 55

AXI - Custom IP ICTP

PWM I IP Core - Case2 e2

slide-56
SLIDE 56

AXI - Custom IP ICTP

VHD HDL co code fo for PW PWM C Com

  • mple

lete (1)

slide-57
SLIDE 57

AXI - Custom IP ICTP

VHD HDL co code fo for PW PWM C Com

  • mple

lete (2)

slide-58
SLIDE 58

AXI - Custom IP ICTP

VHD HDL co code fo for PW PWM C Com

  • mple

lete (3)

slide-59
SLIDE 59

AXI - Custom IP ICTP

VHD HDL co code fo for PW PWM C Com

  • mple

lete (4)

slide-60
SLIDE 60

AXI - Custom IP ICTP

VHD HDL co code fo for PW PWM C Com

  • mple

lete (5)

slide-61
SLIDE 61

AXI - Custom IP ICTP

VHD HDL co code fo for PW PWM C Com

  • mple

lete (3)

slide-62
SLIDE 62

AXI - Custom IP ICTP

PWM I IP Core – Case 3 e 3

slide-63
SLIDE 63

Apen endi dix

AXI - Custom IP ICTP

slide-64
SLIDE 64

 Create and Package IP Wizard  Generates HDL template for

Slave/Master AXI Lite/Full/Stream

 Optionally Generates

  • Software Driver
  • Only for AXI Lite and Full slave interface
  • Test Software Application
  • AXI4 BFM Example

IP M P Man anag ager

ICTP AXI - Custom IP

slide-65
SLIDE 65

ICTP

Crea eate C e Custom

  • m

AXI XI4 IP

AXI - Custom IP

slide-66
SLIDE 66

ICTP

Crea eate C e Custom

  • m

AXI XI4 IP

AXI - Custom IP

slide-67
SLIDE 67

ICTP

Crea eate C e Custom

  • m

AXI XI4 IP

AXI - Custom IP

slide-68
SLIDE 68

ICTP

Edit C Creat ated Custom

  • m AXI

XI4 I IP

AXI - Custom IP

slide-69
SLIDE 69

ICTP

Edit C Creat ated Custom m AXI4 I IP

AXI - Custom IP

slide-70
SLIDE 70

ICTP

Hierarch chy o y of My IP

AXI - Custom IP

slide-71
SLIDE 71

ICTP

Pa Package t the IP

AXI - Custom IP

slide-72
SLIDE 72

ICTP

Compatib ibil ilit ity of

  • f My

y IP P

AXI - Custom IP

slide-73
SLIDE 73

ICTP

Up Updating G Gener erated Files es

AXI - Custom IP

slide-74
SLIDE 74

ICTP

Checkin ing P Par arameters an and I/O Por

  • rts

AXI - Custom IP

(This ends the Works on the edit_ip environment)

slide-75
SLIDE 75

ICTP

Add My I IP t to the R e Rep epository

AXI - Custom IP

These steps shold be done in the Vivado Environment

slide-76
SLIDE 76

ICTP

led_ip Now A Available i in the e IP List

AXI - Custom IP

slide-77
SLIDE 77

component.xml

  • IP XACT description

.bd

  • Block Diagram tcl file

drivers

  • SDK and software files (c code)
  • Simple register/memory read/write

functionality

  • Simple SelfTest code

hdl

  • Verilog/VHDL source

xgui

  • GUI tcl file

Fi Files es c crea eated ed

ICTP AXI - Custom IP

slide-78
SLIDE 78
  • Create an AXI Slave/Master IP Core
  • Use the Wizard to generate an AXI

Slave/Master ‘device’

  • Set the number of registers
  • Building the Complete Zynq system
  • Creating a Zynq based System
  • Adding the necessary Ips
  • Adding our custom AXI IP Core
  • Edit Address Space

ICTP

Ste teps f for Custo tom I IP - Summ mmar ary

  • Customize the IP Core
  • File structure of the IP Cores
  • Edit the HDL generated by the wizard
  • Updating the IP Core and repack
  • Rebuild the system
  • Programming the device
  • Open SDK. Creating a Application and BSP

project

  • Write the “C” code to Wr/Rd the IP Cores

registers

  • Edit Space

AXI - Custom IP

slide-79
SLIDE 79

AXI4-Lite Custom IP The VHDL Underneath

AXI - Custom IP ICTP

slide-80
SLIDE 80

AX AXI4-Lit ite Si Sign gnal l Names

ICTP AXI - Custom IP

slide-81
SLIDE 81

AX AXI4-Lit ite Si Sign gnal l Names

ICTP AXI - Custom IP

  • During the creation of a Xilinx IP block, the

Vivado tools can be used to map each AXI signal onto the signal name that the designer used when creating the IP

  • However in order to make the life of the

designer much easier, the signal names shown here are recommended when designing a custom AXI slave in VHDL

  • Using these signal names will allow the

Vivado design tools to automatically detect the signal names during the “create and package IP” step (described later on).

slide-82
SLIDE 82

AX AXI4-Li Lite A Address Dec ss Decoding

ICTP AXI - Custom IP

  • In previous versions of the Xilinx design flow (where PLB and OPB peripherals were typically used)

it was necessary for each IP peripheral connected to the processor to individually decode all transactions that were presented by a master on the bus (“multi-drop”). it was the responsibility

  • f each peripheral to accept or reject each bus transaction depending on the address that was

placed on the address bus.

  • With AXI4-lite, the interconnect does not use a multi-drop architecture, but uses a scheme where

each transaction from the master(s) is specifically routed to a single slave IP depending on the address provided by the master.

  • This premise permits a completely different design methodology to be adopted by the creator of

a slave IP, in that any transactions which reach the slave’s interface ports are already known to be destined for that peripheral.

  • The designer merely needs to decode enough of the incoming address bus to determine which
  • f the registers in the slave IP should be read or written
slide-83
SLIDE 83

ICTP

My V VHD HDL C Code e – Address Dec ss Decoding

Address Decode & Write Enable AXI4-Lite IP

AXI - Custom IP

slide-84
SLIDE 84

AXI4-Lite te – Implem emen enti ting A g Addres essab able R e Reg egister ers

ICTP AXI - Custom IP

  • Using the address decoding scheme above, it is extremely simple to implement registers in VHDL

which can receive data values written by a master on the AXI4-lite interconnect. The following extract of code shows how an individual register can be quickly and easily implemented (in this case mapped to BASEADDR + 0x00, as has been coded in the previous VHDL snippet).

Read Transaction WriteTransaction