UVM Based
Verification Of
AXI-TO-AHB Bridge
QSOCs
CONTENTS
INTRODUCTION ................................................................................................................... 2
1.
1.1
1.2
2.
2.1
2.2
3.
5.
6.
8.
9.
Page | 1
QSOCs
1. INTRODUCTION
Integrated circuits has entered the era of System -on-a-Chip (SoC), which refers to
integrating all components of a computer or other electronic system into a single
chip. It may contain digital, analog, mixed-signal, and often radio -frequency
functions all on a single chip substrate. With the increasing design size, IP is an
inevitable choice for SoC design. And the widespread use of all kinds of IPs has
changed the nature of the design flow, making On-Chip Buses (OCB) essential to
the design. Of all OCBs existing in the market, the Advanced Microcontroller Bus
Architecture (AMBA) bus system is widely used as the de facto standard SoC bus.
It facilitates development of multi-processor designs with large numbers of controllers
and peripherals. Since its inception, the scope of AMBA has, despite its name, gone far
beyond micro controller devices. Today, AMBA is widely used on a range of ASIC and
SoC parts including applications processors used in modern portable mobile devices like
smartphones. AMBA was introduced by ARM in 1996. The first AMBA buses were
Advanced System Bus (ASB) and Advanced Peripheral Bus. It is very commonly used
bus architecture.
In order to support high-speed pipelined data transfers, AMBA 4.0 supports a rich set of
bus signals, making the analysis of AMBA-based embedded systems a challenging
Proposition.
The goal of this project is to verify a AXI to AHB bridge. The bridge provides interface
between the high performance AXI and high bandwidth peripherals of AHB domain. The
AMBA (Advanced Microcontroller Bus Architecture) AXI (Advanced eXtensible
Interface) to AHB-Lite (Advanced High Performance Bus) Bridge translates AXI4
transactions into AHB-Lite transactions. It has a slave interface which receives the AXI4
master transactions and converts them to AHB master transactions and initiates them on
the AHB bus.
Page | 2
QSOCs
1.1
Page | 3
QSOCs
1.2
Page | 4
QSOCs
Page | 5
QSOCs
2.1
AXI SLAVE
AXI
AXI WRITE
STATE
MACHINE
AXI READ
STATE
MACHINE
AHB Lite
Master
AHB
STATE
MACHINE
AHB
TIME OUT
MODULE
QSOCs
requested on the AXI4 interface, the read request is given a higher priority than the write
request.
2. AXI4 Write State Machine
The AXI4 write state machine is part of the AXI4 slave interface module and functions
on AXI4 write channels. This module controls AXI4 write accesses and generates the
write response. If a bridge timeout occurs, this module completes the AXI4 write
transaction with a SLVERR response.
3. AXI4 Read State Machine
The AXI4 read state machine is part of the AXI4 slave interface module and functions
on AXI4 read channels. This module controls the AXI4 read accesses and generates the
read response. If a bridge timeout occurs, this module completes the AXI4 read
transaction with a SLVERR response.
4. AHB-Lite Master Interface
The AHB-Lite master interface module provides the AHB-Lite master interface. The
AHB-Lite address width can be configured in the Vivado IDE from values 32 to 64 bits
and the data bus width can either be 32 or 64 bits. The AXI4 to AHB-Lite Bridge
supports the same data width on both the AXI4 and AHB-Lite interfaces.
5. AHB State Machine
The AHB state machine is part of the AHB-Lite master interface module. When the
AXI4 interface initiates a write access, the AHB state machine module receives the
control signals and data from AXI4 slave interface, then transfers the same to the
equivalent AHB-Lite write access. This module also transfers the AHB-Lite write
response to the AXI4 slave interface. When the AXI4 interface initiates a read access, the
AHB state machine module receives the control signals from AXI4 slave interface, then
transfers the same to the equivalent AHB-Lite read access. This module also transfers
AHB-Lite read data and read response to the AXI4 slave interface.
6. Timeout Module
The timeout module generates the timeout when the AHB-Lite slave is not responding to
the AHB transaction. This is parameterized and generates the timeout only when that
parameter value is non-zero. If AHB-Lite slave is not responding, timeout module waits
on the number of AXI4 clocks specified through the timeout parameter for the AHB-Lite
slave response and then generates the timeout.
Page | 7
QSOCs
2.2
The Xilinx AXI to AHB-Lite Bridge is a soft IP core with the following features:
AXI4 Slave Interface:
AXI interface is based on the AXI4 specification
Supports 1:1 (AXI to AHB) synchronous clock ratio
Connects as a 32/64-bit slave on 32/64-bit AXI4
Supports incrementing burst transfers (of length 1 to 256)
Supports wrapping burst transfers of length 2, 4, 8, and 16
Supports fixed burst transfers (of length 1 to 16)
Supports narrow transfers (8/16-bit transfers on a 32-bit bus and 8/16/32-bit
transfer on a 64-bit data bus)
Supports limited cache encoding and limited protection unit support
Supports address/data phase time out AHB-Lite Master Interface.
AHB-Lite Master Interface:
Supports AHB-Lite interface
Connects as a 32/64-bit Master on 32/64-bit AHB-Lite
Supports single burst transfers
Supports wrapping burst transfers of length 4, 8 and 16 and undefined burst length
AHB-Lite master does not issue incrementing burst transfers that cross 1 kB
address boundaries
Supports limited protection control
Supports narrow transfers (8/16-bit transfers on a 32-bit data bus and 8/16/32-bit
transfers on a 64-bit data bus)
Not Supported Features/Limitations
AXI4 Slave Interface
Data bus widths greater than 64 are not supported
No registers are implemented because posted writes are not supported
Locked, Barrier, trust zone, and exclusive operations are not supported
Out-of-order read transaction completion
Out-of-order write transaction completion
Unaligned/Sparse transfers (holes in strobes) are not supported
EXOKAY and DECERR responses to AXI4 are not supported
Low-power state is not supported
Secure accesses are not supported
AHB-Lite Master interface
Data bus widths greater than 64 are not supported
No cacheable access support
Page | 8
QSOCs
axi_ahb_test
Sequence item
axi_sequence
Ahb_Sequence
env
Axi
intf
SQR
SQR
S
C
O
R
E
B
O
A
R
D
Driver
Monitor
monitor
DUT
ahb_agent
AXI
intf
driver
Driver
SQR
Monitor
monitor
axi_agent
axi_seq_item
ahb_sequence
Axi_sequence
Testbench Architecture
Page | 9
AXI TO AHB
BRIDGE
QSOCs
QSOCs
Write
Sequence
Write Address
Queue
Write Data
Queue
Read
Sequence
Driving
Logic
Read Address
Queue
Matching Queue
ID of Requests
RESPONSE
HANDLER
AXI SEQUENCE
Write Address
Response
Queue
Write Data
Response
Queue
Page | 11
AXI DRIVER
AXI Interface
QSOCs
A
H
B
DUT
AHB_DRIVER
S
E
Ahb_Interface
Q
U
AXI To AHB
Bridge
E
N
C
MEMORY
Page | 12
QSOCs
SL
NO
TEST CASE
DESCRIPTION
FEATURE
STATUS
PASS/FAIL
BASIC TRANSACTIONS
1 reset_check
2 basic_write_transaction
3 basic_read_transaction
4 multiple_read_write
4 fixed_burst_single_beat
multiple_fixed_
5
burst_varying_length
Page | 13
Checking the
functionality of
DUT when it is
in reset condition
by randomly
driving data to
all the inputs
Writing to DUT
with a basic
write transfer of
single beat and
size as 4
Completed PASS
Writing to DUT
Reading data from a
with a basic
peripheral using two
Read transfer of
different channels using
single beat and
flow control mechanisms
size as 4
Randomly
driving basic
any number of transactions
read and write
is possible in AXI to AHB
transfers for
bridge
multiple times
BURST TRANSACTIONS
Driving data as a
burst with single
beat
Completed PASS
Completed PASS
Completed PASS
Repeated driving
of data as fixed
AXI4 protocol supports
burst with
maximum beats of 256
varying length
Completed PASS
Completed PASS
QSOCs
6 INCR_burst_single_beat
7 INCR_length_check
8 INCR_burst_length_2
9 INCR_burst_length_4
10 INCR_burst_length_8
11 INCR_burst_length_16
12 WRAP_length_check
13 WRAP_burst_length_2
14 WRAP_burst_length_4
15 WRAP_burst_length_8
16 WRAP_burst_length_16
Page | 14
Driving data as
burst of INCR
with length as 1
Driving data as
burst of INCR
with varying
Length
Driving data as
burst of INCR
with length as 2
Driving data as
burst of INCR
with length as 4
Driving data as
burst of INCR
with length as 8
Driving data as
burst of INCR
with length as 16
Driving Data as
a WRAP with
varying Length
Driving data as
burst of WRAP
with length as 2
Driving data as
burst of WRAP
with length as 4
Driving data as
burst of with
length as 8
Driving data as
burst of INCR
with length as 16
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
Completed PASS
QSOCs
Driving random
bursts with
17 burst_beat_size_with_aligned_addr
aligned address
and varying size
UNALIGNED TRANSACTIONS
18 FIXED_unaligned_address
19 INCR_unaligned_address
20 WRAP_unaligned_address
Driving data as a
FIXED burst
with unaligned
address with
different size and
lengths
Driving data as a
INCR burst with
unaligned
address with
different size and
lengths
Driving data as a
WRAP burst
with unaligned
address with
different size and
lengths
21 protection_check
22 exclusive_access
23 locked_access
Page | 15
Driving random
bursts with
different levels
of Protection
Checking of
Exclusive access
of AXI by using
LOCK signal by
driving random
bursts
Checking of
Locked access
of AXI by using
LOCK signal by
driving random
bursts
Completed
Completed
Completed
QSOCs
24 normal_access
Checking of
Normal access
of AXI by using
LOCK signal by
driving random
bursts
AXI4 supports
LOCKED,NORMAL and
EXCLUSIVE access to the
slave.But DUT and AHB
doesn't support
25 cache_support_check
Checking the
cache unit of
AXI
26 out_of_order_txn
Checking out of
Order
Transaction
27 outsatnding_address_check
Checking
outstanding
addresses
transactions
Driving random
burst with out of
boundary
conditions
28 data_interleaving_Check
29 boundary_cross_check
ERROR RESPONSES
30 error_response_check
Cheecking for
different errors
responses
associated
withAXI to AHB
bridge
AXI having
OKAY,EXOKAY,DECERR
and AHB having OKAY
and ERROR.
CORNER CASES
31 same_id_check
Page | 16
QSOCs
8. Functional Coverage
Functional Coverage
Sl
No
1
2
Cover
group
Cover Point
Access
Description
Write
Read
Fixed
Increment
Wrap
6
7
8
9
10
11
12
13
14
Protect_NSD
Protect_PSD
Protect_NND
Protect_NSI
Protect_PSI
Protect_NNI
Protect_PNI
Protect_PNI
Cache
Burst
4
CG-AXI
Protect
Cache
15
16
17
18
Page | 17
Okay
Response
EXOKAY
SLVERR
DECERR
Cache
Status
Hit/Fail
QSOCs
19
20
21
Address_type
Addr_align
23
Addr_unalign
0-1000
Divisible by 4
This will transfer single
Single
transfer i,e single beat
Increment
24
Undefined
25
INCR4
26
INCR 8
Address
22
27
Burst
INCR 16
28
29
Wrap
30
Wrap 4
31
Wrap 8
32
Wrap 16
33
Idle
Busy
Non
Sequential
34
35
Page | 18
Transaction
Type
QSOCs
36
Sequential
37
38
39
40
41
Byte
Half_word
Word
Double Word
42
Page | 19
Size
Address
1000 to 2000
QSOCs
AXI_TO
AHB Bridge
doc
script
sim
src
testlib
verif
agent
env
Directory Structure
Page | 20
intf
QSOCs
10. References
1. ARM AMBA AXI4-Stream Protocol Specification
www.infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0051a/index.
html
2. UVM User Guide manual
3. www.verificationacademy.com
Page | 21