AXI - VPlan (Checker Not Completed)
AXI - VPlan (Checker Not Completed)
AIonSi
Author: Vyshnavi CH
Date:
2 Features 6
2.1 For WRITE Transaction 6
2.1.1 FIXED BURST TYPE
2.1.2 INCR BURST TYPE
2.1 3 WRAP BURST TYPE
2.2 For READ Transaction 7
2.2.1 FIXED BURST TYPE
2.2.2 INCR BURST TYPE
2.2.3 WRAP BURST TYPE
3 Stimulus 8
3.1 Direct Stimulus
3.2 Random Stimulus
3.3 Constraint Random Stimulus
4 TB Architecture 9
4.1 Block Diagram of axi vip 9
4.2 Architecture Components of axi 9
4.2.1 Top 10
4.2.2 Test 10
4.2.3 Environment 10
4.2.3.1 Scoreboard & Coverage
4.2.3.2 axi_agent
4.2.3.2.1 axi_driver
4.2.3.2.2 axi_monitor
4.2.3.2.3 axi_sequencer
4.2.4 axi_sequence 10
5 Checker 11
5.1 Direct Check 11
5.1.1 Direct check without delay
5.1.2 Direct check with delay
5.2 Reference Logic Check 11
5.2.1 Reference logic check without delay
5.2.1.1 1_x_4_demux_data_out_check
5.2.2 Reference logic check with delay
6 Functional Coverage 12
6.1 Covergroup 12
3
7 Assertion 13
2. Interface:
Interface is a bunch of signals for rs232 system controller
Here only one interface is required which is rs232_syscon_if, which has all the DUT
signals in it.
2.1 rs232_syscon_if:
Input to DUT / Output from test bench :
logic clk_i;
logic reset_i;
logic master_bg_i;
logic rs232_rxd_i
logic ack_i
bit [DAT_DIGITS_PP 1:0] dat_io; ///inout port
logic rst_o
logic stb_o
logic cyc_o
logic [ADR_DIGITS_PP -1:0] adr_o;
logic we_o;
logic master_br_o;
logic err_i
bit [DAT_DIGITS_PP 1:0] dat_io ///inout port
logic rs232_txd_o03
reset_i reset
adr_o Address bus {Width of address bus in nibbles (4 =>16bits, 8 => 32 bits)}
o Baud rate: the measure of the number of changes to the signal (per second) that
propagate through a transmission medium.
o Uses an internal signal, serial_clk_16x, which is a clock enable running at 16× the
desired BAUD rate.
o For 115,200 BAUD it is a high pulse which occurs for one single “clk_i” clock period,
at a rate of 16*115200 = 1.8432 MHz(==clk period of serial_clk_16x)
Command Types:
o This display helps verify that the terminal is set to the correct BAUD rate.
Watchdog Timer:
o Ensures timely bus transactions by monitoring bus request and cycle completion.
Description: When awburst[1:0] is 2’b00, the address remains the same for every
transfer in the burst.
Steps to implement:
1. Apply random stimulus on wr addr channel with burst type and assert awvalid.
2. Apply random stimulus on wr data channel with random value of wdata and assert
wvalid.
3. When awready and wready has been asserted by the dut, it means dut is ready to accept
the addr and data signals.
4. Assert bready to get the response from dut to indicate the completion of success/failure
of write transaction.
Description: When awburst[1:0] is 2’b01, the address for each transfer in the burst is an
increment of the previous transfer address. The increment value depends on the size of the
transfer.
Steps to implement:
1. Apply random stimulus on wr addr channel with burst type incr with control signal
awsize and awlen of any value and assert awvalid.
2. Apply random stimulus on wr data channel with random value of wdata and assert
wvalid.
3. When awready and wready has been asserted by the dut, it means dut is ready to accept
the addr and data signals.
Description: When awburst[1:0] is 2’b10, the address increments in similar way in incr
burst type but it wraps around to a lower address when a wrap boundary is reached.
Steps to implement:
1. Apply random stimulus on wr addr channel with burst type wrap with the start address
aligned to the size of the transfer & control signal awsize of any value & awlen of
2,4,8,16 only and assert awvalid.
2. Apply random stimulus on wr data channel with random value of wdata and assert
wvalid.
3. When awready and wready has been asserted by the dut, it means dut is ready to accept
the addr and data signals.
4. Assert bready to get the response from dut to indicate the completion of success/failure
of write transaction.
Description: When arburst[1:0] is 2’b00, the address remains the same for every
transfer in the burst.
Steps to implement:
1. Apply random stimulus on rd addr channel with burst type fixed and assert arvalid.
2. Assert rready signal on rd data channel to indicate that master is ready to accept the
data from dut.
3. Dut retrieves data and places it on rdata signal, at the same time it uses rresp signal to
indicate success or failure of read transaction.
Description: When arburst[1:0] is 2’b01, the address for each transfer in the burst is an
increment of the previous transfer address. The increment value depends on the size of the
transfer.
Steps to implement:
1. Apply random stimulus on rd addr channel with burst type incr and assert arvalid.
2. Assert rready signal on rd data channel to indicate that master is ready to accept the
data from dut.
Description: When arburst[1:0] is 2’b10, the address increments in similar way in incr
burst type but it wraps around to a lower address when a wrap boundary is reached.
Steps to implement:
1. Apply random stimulus on rd addr channel with burst type fixed and assert arvalid.
2. Assert rready signal on rd data channel to indicate that master is ready to accept the
data from dut.
3. Dut retrieves data and places it on rdata signal, at the same time it uses rresp signal to
indicate success or failure of read transaction
5. Stimulus:
10
4. TB Architecture:
5.
Test
6.
ENV
axi_sequence
axi_scoreboard axi_coverage
Reference logic
axi_agent
axi_sequencer
axi_driver axi_monitor
11
axi_dut
AIONSI CONFIDENTIAL & PROPRIETARY-UNDER NDA
4.2 Architecture Components of axi:
The following components are needed in architecture to verify the axi IP.
Top
Test
Environment
Scoreboard
Coverage
axi_agent
axi_driver
axi_monitor
axi_sequencer
axi_sequence
4.2.1 Top :
Top module contains:
axi_test
axi_if
4.2.2 Test :
In Test all the test cases are declared.
Then, we need to create an environment.
4.2.3 Environment:
In Environment configuration class we have agent configuration class and
agent.
We need to create scoreboard, coverage and all agents
4.2.3.2 axi_agent:
Create Driver class to drive the input signals.
Create Monitor class to monitor the input that driver is driving.
Create Sequencer to transfer data between sequence class and driver.
12
5. Checkers:
In checker we compare actual output from design with expected output from monitor
and verify the same.
5.2.1.1 1_x_4_demux_data_out_Check:
When select line is s0=0,s1=0 then, output y0=data_in
When select line is s0=0, s1=1 then, output y1=data_in
When select line is s0=1, s1=0 then, output y2=data_in
When select line is s0=1, s1=1 then, output y3=data_in
14
15