Professional Documents
Culture Documents
AXI 3 VPlan DOC
AXI 3 VPlan DOC
v0.1
AIonsi
Author:Chitaranjan Nayak
Siddeshwar Shenoy
Date: 22/12/2021
Version Information
VIP can pass either stimulus directly through sequence or it can generate
random stimulus through transaction class or it can have constraint to generate
random stimulus.
So, based on all the above conditions we have three types of stimulus.
Constraint:-
◦ constraint AW_ADDR_SIZE{AWSIZE inside {[0:7]};
AWADDR inside {[1:4090]};}
◦ constraint AR_ADDR_SIZE{ARSIZE inside {[0:7]};
ARADDR inside {[1:4090]};}
◦ constraint
BRUST_S{AWBURST!=2'b11; ARBURST!=2'b11;}
◦ constraint len_same{AWLEN==ARLEN;}
if(AWBURST == 2'b00)
AWLEN inside { 0, 1 };
else if(AWBURST == 2'b10)
AWLEN inside {1, 3, 7, 15 };}
◦ constraint AR_LEN_VAL {
solve ARBURST before ARLEN;
if(ARBURST == 2'b00)
ARLEN inside { 0, 1 };
else if(ARBURST == 2'b10)
ARLEN inside { 1, 3, 7, 15 };}
◦ constraint wdata_size{WDATA.size==AWLEN+1'b1;}
◦ constraint wstrb_size{WSTRB.size==AWLEN+1'b1;}
◦ constraint ATOMIC_ACESS{ARLOCK!=2'b11;
AWLOCK!=2'b11;}
◦ constraint PROTECTION_S{AWPROT inside
{1,2,3};}
◦ constraint PROTECTION_S1{ARPROT inside
{1,2,3};}
bit ARESETn;
bit ACLK;
logic [3:0]AWID;
logic [31:0]AWADDR;
logic [3:0]AWLEN;
logic [2:0]AWSIZE;
logic [1:0]AWBURST;
logic AWVALID;
logic AWREADY;
logic [3:0]WID;
logic [31:0]WDATA;
logic [3:0]WSTRB;
logic WLAST;
logic WVALID;
logic WREADY;
logic [3:0]BID;
logic [1:0]BRESP;
logic BVALID;
logic BREADY;
logic [3:0]ARID;
logic [31:0]ARADDR;
logic [3:0]ARLEN;
logic[2:0]ARSIZE;
logic[1:0]ARBURST;
logic ARVALID;
logic ARREADY;
logic [3:0]RID;
logic [31:0]RDATA;
logic [1:0]RRESP;
logic RLAST;
Inputs to DUT
◦ ARESETn;
◦ ACLK;
◦ [3:0]AWID;
◦ [31:0]AWADDR;
◦ [3:0]AWLEN;
◦ [2:0]AWSIZE;
◦ [1:0]AWBURST;
◦ AWVALID;
◦ [3:0]WID;
◦ [31:0]WDATA;
◦ [3:0]WSTRB;
◦ WLAST;
◦ WVALID;
◦ BREADY;
◦ [3:0]ARID;
◦ [31:0]ARADDR;
◦ [3:0]ARLEN;
◦ [2:0]ARSIZE;
◦ [1:0]ARBURST;
◦ ARVALID;
◦ RREADY;
Siginals to TB
Output from TB
◦ ACLK;
◦ ARESETn;
◦ [3:0]AWID;
◦ [31:0]AWADDR;
◦ [3:0]AWLEN;
◦ [2:0]AWSIZE;
◦ [1:0]AWBURST;
◦ AWVALID;
◦ [3:0]WID;
◦ [31:0]WDATA;
◦ [3:0]WSTRB;
◦ WLAST;
◦ WVALID;
◦ BREADY;
◦ [3:0]ARID;
◦ [31:0]ARADDR;
◦ [3:0]ARLEN;
◦ [2:0]ARSIZE;
◦ [1:0]ARBURST;
◦ ARVALID;
◦ logic RREADY;
▪ Input to TB
◦ AWREADY;
◦ WREADY;
◦ [3:0]BID;
◦ [1:0]BRESP;
◦ BVALID;
◦ ARREADY;
◦ [3:0]RID;
◦ [31:0]RDATA;
3.Features
In smart register IP, the following are the features
3.1. Reset.
3.2. Burst-based transactions with only start address.
3.3 Separate read and write data channels.
3.4 Multiple outstanding addresses.
3.5 Out-of-order transaction completion.
3.6 Unaligned data transfers using byte strobes.
3.7 Atomic operations.
3.8 Protection unit support.
3.9 System cache support.
3.10 Siginaling Response
3.1 Reset
ARESETn is active low reset,when ARESETn=0 all siginals goes zero.
In this IP, reset have two feature
3.1.1. Start of simulation reset
3.1.2. On the fly reset
ARBURST[1:0]/
AWBURST[1:0] Burst type Description Access
b00 FIXED Fixed-address burst FIFO-type
Steps of implmentation
Steps-1:
For write
Apply AWBURST=’b0; AWLOCK=’b0; AWID,AWADDR,AWLEN,
AWSIZE, AWLOCK,AWCACHE,AWPROT,WID,WDATA,WSTRB are
constraint random data
For Read
Apply ARBURST=0; ARLOCK=’b0 ARID,ARADDR,ARLEN,
Steps-2:-
For write
Check all the write chhannle siginals in slave,weather it same or not.
For Read
Check all the read chhannle siginals in slave,weather it same or not.
ARBURST[1:0]/
AWBURST[1:0] Burst type Description Access
b01 INCR Incrementing-address burst Normal
sequential
memory
Steps of implmentation
Steps-1:
For write
Apply AWBURST=’b01;AWLOCK=’b0; AWID,AWADDR,AWLEN,
AWSIZE, AWLOCK,AWCACHE,AWPROT,WID,WDATA,WSTRB are
constraint random data
For Read
Apply ARBURST=’b01;ARLOCK=’b0; ARID,ARADDR,ARLEN,
ARSIZE,ARBURST,ARLOCK,ARCACHE,ARPROT are constraint
random data.
Steps-2:-
For write
Check all the write chhannle siginals in slave,weather it same or not.
ARBURST[1:0]/
AWBURST[1:0] Burst type Description Access
b10 WRAP Incrementing-address Cache line
burst that wraps to a lower
address at the wrap boundary
Formulas for determining the address and byte lanes of transfers within a
burst. The formulas use the following variables:
Start_Address = ADDR
Number_Bytes = 2 SIZE
Burst_Length = LEN + 1
Aligned_Address = (INT( Start_Address / Number_Bytes ) ) x Number_Bytes
Use this equation to determine the address of the first transfer in a burst:
Address_1 = Start_Address .
Use this equation to determine the address of any transfer after the first
transfer in a burst:
Address_N = Aligned_Address + (N – 1) x Number_Bytes .
Use these equations to determine which byte lanes to use for the first transfer
in a burst:
Lower_Byte_Lane = Start_Address - ( INT ( Start_Address /
Data_Bus_Bytes ))x Data_Bus_Bytes
Steps-2:-
For write
Check all the write chhannle siginals in slave,weather it same or not.
For Read
Check all the write chhannle siginals in slave,weather it same or not.
Description
Master have the capability to do separete read and write.Master also do both
read and write operaion at same time.
Steps of implmentation
Steps-1:
For write
Apply ARESETn=’b1;AWLOCK=’b0; AWID,AWADDR,AWLEN,
AWSIZE,AWLOCK,AWCACHE,AWPROT,WID,WDATA,WSTRB are
constraint random data
For Read
Apply ARESETn=’b1;ARLOCK=’b0; ARID,ARADDR,ARLEN,
Steps-2:-
For write
Check all the write chhannle siginals in slave,weather it same or not.
For Read
Check all the write chhannle siginals in slave,weather it same or not.
The ability to issue multiple outstanding addresses means that masters can
issue transaction addresses without waiting for earlier transactions to complete.
This feature can improve system performance because it enables parallel
processing of transactions,.
Description
The transactions which are yet to be completed are called outstanding
transactions.for example: Let us say we have 10 Write's initiated from Master
component. Out of 10, only 3 of them have received OKAY response from
slave.In such case, the rest of the 7 writes whose responses are yet to be
received are called outstanding transactions.
Steps of implmentation
Steps-1:
Initiate 10-20 writes/reads.
Steps-2:-
Check the BRESP,BID for write response.(if it got 4-5 response and remening
are pending it is outstanding response).
Steps of implmentation
Steps-1:
Initiate 3 write and read with different ID ex:-A11,A21,A31
Steps-2:-
Check the WDATA,RDATA order.
Steps of implmentation
Steps-1:
Apply ADDR= Unaligned address, //siginals
Steps-2:-
check first transfer is unaligned and rest are aligned.
Description
The exclusive access mechanism enables the implementation of semaphore
type operations without requiring the bus to remain locked to a particular
master for the duration of the operation. The advantage of exclusive access is
that semaphore type operations do not impact either the critical bus access
latency or the maximum achievable bandwidth.
Steps of implmentation
Steps-1:
Apply ARLOCK/AWLOCK=1,
Steps-2:-
Do an exclusive read from an address location. All read chhannle siginals
are constraint random siginals.
Steps-3:-
At some later time, the master attempts to complete the exclusive operation by
performing an exclusive write to the same address location.All write
chhannle siginals are constraint random siginals.
Steps-4:-
check the RRESP[1:0] or BRESP[1:0].
Steps of implmentation
Steps-1:
Apply ARLOCK/AWLOCK=’b10,others are constraint random.
Steps-2:-
apply lock sequence,do the operation to paticular slave address from master-
1.
Steps-3:-
After some time do the operation to same slave address from master-2.
Steps-4:-
Check master-2 should not get the access to that slave address.
1 1 = nonsecure access
0 = secure access
Cache encoding
ARCACHE[3:0]
AWCACHE[3:0]
WA RA C B Transaction attributes
0 0 0 0 Noncacheable and nonbufferable
0 0 0 1 Bufferable only
0 0 1 0 Cacheable, but do not allocate
0 0 1 1 Cacheable and bufferable, but do not allocate
0 1 0 0 Reserved
0 1 0 1 Reserved
0 1 1 0 Cacheable write-through, allocate on reads only
0 1 1 1 Cacheable write-back, allocate on reads only
1 0 0 0 Reserved
1 0 0 1 Reserved
1 0 1 0 Cacheable write-through, allocate on writes only
1 0 1 1 Cacheable write-back, allocate on writes only
1 1 0 0 Reserved
1 1 0 1 Reserved
1 1 1 0 Cacheable write-through, allocate on both reads andwrites
1 1 1 1 Cacheable write-back, allocate on both reads and writes
Steps of implmentation
Steps-1:
Apply ARCACHE/AWCACHE=constraint random ,all siginals are
constraint random
Steps-2:-
For writes,check number of different writes can be merged together or not.
For reads,check that a location can be pre-fetched or can be fetched or not.
Steps of implmentation
Steps-1:
Apply ARCACHE/AWCACHE=constraint random ,all siginals are
constraint random
Steps-2:-
check for write, weather the cheche is allocated or not.
RRESP[1:0]
BRESP[1:0] Response Meaning
b00 OKAY Normal access okay indicates if a normal access has been
successful. Can also indicatean exclusive access failure.
3.10.1 OKAY
Description
The OKAY response indicates:
the success of a normal access
the failure of an exclusive access
an exclusive access to a slave that does not support exclusive access.
Steps of implmentation
Steps-1:
Apply ARLOCK/AWLOCK=1
Steps-2:-
check BRESP/RRESP, it will give EXOKAY
3.10.3 SLVERR
Description
The SLVERR response indicates an unsuccessful transaction.
Steps of implmentation
Steps-1:
Apply any above condition.(stimulus should be constraint random)
Steps-2:-
check BRESP/RRESP, it will give SLVERR
3.10.4 DECERR
Description
In a system without a fully-decoded address map, there can be addresses at
which there are no slaves to respond to a transaction. In such a system, the
interconnect must provide a suitable error response to flag the access as illegal
and also to prevent the system from locking up by trying to access a
nonexistent slave.
Steps of implmentation
Steps-1:
Apply out of bound address.(siginals are constraint random)
Steps-2:-
check BRESP/RRESP, it will give DECERR
4.2.3.1.rst driver
4.2.3.2. rst monitor
4.2.3.3. rst sequencer
4.2.3.4. rst sequence
4.2.4.1. Environment
Environment contains all the agents and scoreboard,virtual
sequncer,coverage collector.
4.2.4.2. Scoreboard
Scoreboard will collect all the transction from monitor.
Scoreboard will compare Excepted output with autual output after
receive the excepted output from referance logic and autual from DUT.
4.2.4.3. Virtual sequencer
A virtual sequence is a container to start multiple sequences on different
sequencers in the environment.
4.2.4.4. master coverage
master coverage is used to keep a track of master functionality.
4.2.4.5. slave coverage
slave coverage is used to keep a track of slave functionality.
4.2.6. TEST
Test contain all the test cases to verify the dut.
4.2.6.1. Interface
Interface is connect AXI VIP to AXI IP
4.2.3.2. Test
Test contain all AXI IP test cases
4.2.3.3. Assertion
Assertion is used to check all the AXI IP protocols.
5.Checker
Checkers are used to cross check the functionality of the dut and automate the
check.
There are two types of checker.
5.1. Direct Check
5.2. Referance logic Check
6.1.1.coverpoint AWID_cvg::AWID
Defaut bins are enough.
6.1.12.coverpoint ARID_cvg::ARID
Defaut bins are enough.
6.2.1.coverpoint BID_cvg::BID
Default bins are enough
6.2.2 coverpoint BRESP_cvg::BRESP
Default bins are enough
6.2.3 coverpoint RID_cvg::RID
Default bins are enough
6.2.4 coverpoint RDATA_cvg::RDATA
We need to defne following
◦ low,mid1,mid2,mid3,high
6.2.5 coverpoint RRESP_cvg::RRESP
Default bins are enough