Professional Documents
Culture Documents
Verification Plan
Verification Plan
LAHORE, PAKISTAN
Submitted By:
Wajahat Riaz
2021-MS-EE-36
HWDATA [31:0]
HSEL_1
Decoder
HSEL_2
Master Slave 2
HSEL_3
Slave 3
HRDATA_3
HRDATA [31:0]
HRDATA_2
HRDATA_1
Multiplexer
An AHB-Lite master provides address and control information to initiate read and
write operations. The slave responds to transfers initiated by masters in the system.
The slave uses the select signal from the decoder to control when it responds to a
bus transfer. The slave signals back to the master i.e., the success, failure, or
waiting of the data transfer. This component decodes the address of each transfer
and provides a select signal for the slave that is involved in the transfer. It also
provides a control signal to the multiplexor. A slave-to-master multiplexor is required
to multiplex the read data bus and response signals from the slaves to the master.
Working of Protocol:
The master starts a transfer by driving the address and control signals. These
signals
2
provide information about the address, direction, width of the transfer, and indicate if
the transfer forms part of a burst. Transfers can be of different types for instance
single, incrementing bursts that do not wrap at address boundaries, wrapping bursts
that wrap at particular address boundaries, etc. The write data bus moves data from
the master to a slave, and the read data bus moves data from a slave to the master.
Every transfer consists of two phases:
1) Address phase: one address and control cycle
2) Data phase: one or more cycles for the data.
A slave cannot request that the address phase is extended and therefore all slaves
must be capable of sampling the address during this time. However, a slave can
request that the master extends the data phase by using an HREADY signal. This
signal, when LOW, causes wait states to be inserted into the transfer and enables
the slave to have extra time to provide or sample data. The slave uses a response
signal to indicate the success or failure of a transfer.
Global Signals:
Master Signals:
Slave Signals:
3
data phase
HRESP Multiplexor Provides additional information on
whether the transfer was successful
or failed
Decoder Signals:
Multiplexor Signals:
Software/Tools:
1) QuestaSim
2) Github
3) Microsoft Word
4
Verification Plan:
No. Feature Test Description Ref. Type Result Expected Outcome Comments
1 Write transfer An address A is driven onto the 3.1 TR The address phase should HWRITE is high,
from master to bus. The slave will sample the not be more than one indicating a write
slave address A on the next rising cycle. transfer and the
clock edge. master broadcasts
The slave must only data on the write
Afterward, the slave will drive sample address when data bus, HWDATA
the HREADY response. This HREADY is high. [31:0].
response is sampled on the next
rising edge of HCLK. The Data(A) must be
written at the address A
and a completed transfer
is signaled i.e., HRESP
should be low and
HREADY should be high.
2 Read transfer An address A is driven onto the 3.1 TR The address phase should HWRITE is low, a
from slave to bus. The slave will sample the not be more than one read transfer is
master address A on the next rising cycle. performed and the
clock edge. slave must
The slave must only generate the data
Afterward, the slave will drive sample address when on the read data
the HREADY response. This HREADY is high. bus, HRDATA
response is sampled on the next [31:0].
rising edge of HCLK. The Data(A) must be read
from address A and
completed transfer is
signaled i.e., HRESP
should be low and
5
HREADY should be high.
3 Random transfers Random addresses A, B, C, and 3.1 TR Just like in test 1 and test Based on the type
D with zero wait states are 2 the slave must only of transfer i.e., read
driven onto the bus. sample the address A, B, transfer or write
C, and D when HREADY transfer HWRITE
The slave will sample the is high and completion of will be set low and
addresses A, B, C, and D on the transfer must be signaled high respectively.
rising clock edged of their by the slave i.e., HRESP
address phase. should be low and
HREADY should be high.
6
Wait states are added using extended by three cycles.
HREADY. Transfer to address A
is one wait state. Transfer to
address B is two wait states.
6 Write followed by An address A is driven onto the 3.1 TR Based on the During the Write
Read transfer bus twice. The slave will sample specifications of the transfer, the
the address A on the first and memory. Read transfer completed transfer
second rising clock edge for should produce the is signaled i.e.,
write and read transfer updated Data(A). HRESP should be
respectively. low and HREADY
should be high.
Firstly, HWRITE is high,
indicating a write transfer and During the Read
the master broadcasts data on transfer, the
the write data bus, HWDATA completed transfer
[31:0]. is signaled i.e.,
HRESP should be
Lastly, HWRITE is set low, a low and HREADY
read transfer is performed and should be high.
the slave must generate the
data on the read data bus,
HRDATA [31:0].
7 Read followed by An address A is driven onto the 3.1 TR Based on the During the Read
Write transfer bus twice. The slave will sample specifications of the transfer, the
the address A on the first and memory. Read transfer completed transfer
second rising clock edge for should produce the is signaled i.e.,
read and write transfer Data(A) which was stored HRESP should be
respectively. before Write transfer. low and HREADY
should be high.
Firstly, HWRITE is set low, a The Write transfer will
read transfer is performed and update Data(A). During the Write
the slave must generate the transfer, the
data on the read data bus, completed transfer
HRDATA [31:0]. is signaled i.e.,
HRESP should be
7
Lastly, HWRITE is high, low and HREADY
indicating a write transfer and should be high.
the master broadcasts data on
the write data bus, HWDATA
[31:0].
8 Wrapping burst We have a transfer size of 4- 3.5 A In WRAP4 the burst is a Wrapping bursts
types: byte (32-bit) which is a word. four-beat burst of word wrap when they
3.5.3 transfers; the addresses cross an address
WRAP4 In WRAP4, firstly address A+4, wrap at a 16-byte boundary.
address A+8 and address A+12 boundary.
WRAP8 are driven onto the bus which is Address boundary
sampled by the slave on the In WRAP8 the burst is an = HBURST x
WRAP16 rising clock edges of their eight-beat burst of word HSIZE
address phases. After the transfers; the addresses
transfer at address A+12, we wrap at a 32-byte Note: Different
have reached the address boundary. combinations of
boundary therefore next transfer read and write
is wrapped to address A. In WRAP16 the burst is a transfers can be
sixteen-beat burst of word used which were
Similarly, we drive addresses on transfers; the addresses implicitly checked in
the bus for WRAP8 and wrap at a 64-byte previous tests.
WRAP16 to check if they wrap boundary.
at the address boundaries.
For all the above
scenarios the slave will
provide a completed
transfer signal.
9 Incrementing We have a transfer size of 4- 3.5 In INCR4, the transfers Incrementing bursts
burst type: byte (32-bit) which is a word. are incremented by 4. access sequential
3.5.3 locations. The
INCR4 In INCR8, the transfers addresses of each
Firstly, address A+4, A+8, and are incremented by 8. transfer in the burst
INCR8 A+12 are driven onto the bus are an increment of
which is sampled by the slave In INCR16, the transfers the previous
INCR16 on the rising clock edges of their are incremented by 16. address.
8
address phases. After the
transfer to address A+12, we For all the above
have reached the address scenarios the slave will
boundary. provide a completed
transfer signal.
Since we are using incrementing
burst type. Instead of wrapping
around, it will transfer to the next
location which is A+16.
10 Incrementing The first burst is driven on the 3.5 In the first burst, the N/A
burst type: bus which consists of two transfer address is
halfword transfers at an address 3.5.3 incremented by two.
INCR and A.
undefined length In the second burst, the
burst The second burst is read transfer address is
consisting of three word read incremented by four.
transfers starting at address B
For all the above
scenarios the slave will
provide a completed
transfer signal.
11 Protection signals An address A is driven on the 3.7 A The protection signal gives The test is
HPROT [3:0]: bus. The timing of HPROT and extra information which dependent on the
address bus must be the same. can be used to determine master’s ISA
4’b0000 The must remain constant an exception for instance (Instruction Set
throughout the burst transfer. illegal instruction, illegal Architecture) and
4’b1111 access, etc. design.
The protection signal HPROT For instance, data(A) can’t
[3:0] = 4’b0000 corresponds to be accessed because only Used by a module
9
non-cacheable, non-bufferable, a privileged level can that wants to
unprivileged opcode fetch. access that information. implement some
The protection signal HPROT level of protection.
[3:0] = 4’b1111 corresponds to The response is entirely
cacheable, bufferable, privileged dependent on how the
data access. design engineer
implemented it.
12 Global Signal: After a random read or write 7.1.2 A All bus elements will reset HRESTn is an
HRESTn transfer an HRESTn is driven and HRESTn is active low signal.
low asynchronously. deasserted synchronously Primary reset for all
after the next rising of the bus elements.
HREADYOUT must be high. clock cycle.
HTRANS [1:0] must indicate
IDLE.
13 Master Signal: An address A is driven onto the 3.2 A The transfer must be
IDLE bus. An IDLE transfer is inserted ignored by the slave.
HTRANS [1:0] to this address.
=b00 Slave provides a zero-wait
OKAY response.
14 Master Signal: Address A and B are driven onto 3.2 A After the complete transfer N/A
BUSY the bus. signal from the slave for
HTRANS [1:0] address A; address B is
=b01 When a BUSY transfer is sampled during the
inserted on address A then the sequential transfer.
address and control signals
must reflect the next burst
transfer i.e., address B.
10
The transfer type is changed to After successful transfer to
NONSEQ and initiates a transfer address A the slave will
to address x. ignore the IDLE transfers
i.e., transfers associated
With HREADY low, the with addresses B and C
HTRANS is kept constant. will be neglected.
11
an undefined bus. due to the NONSEQ
length burst transfer type.
Wait states are added by
keeping HREADY low. Then the transfer of
address C is signaled
Then a nonsequential address C completed by the slave.
is driven onto the bus. The
transfer type changes from In the next cycle, the
BUSY to NONSEQ. transfer to address B
completes, and then in the
HTRANS is kept constant and next cycle the transfer to
slaves must keep HREADY low address C completes.
during this phase
.
Then HREADY is set high.
18 Address change A single burst is initiated to 3.6.2 During the address The address can be
during wait state address A and is driven onto the phases of address A and changed only once
with IDLE transfer bus. address B the slave
samples the addresses at
Then another address Y is the rising edge of the clock
initiated onto the bus. An IDLE cycle.
transfer is inserted to this
address The slave will signal a
completed transfer after
The slave inserts a wait state by the transfer to address A
keeping HREADY low. .
The IDLE transfers are
Then another address Z is ignored by the slave
initiated onto the bus. An IDLE between addresses A and
transfer is inserted to this B.
address.
Then, the slave will signal
Then, a NOSEQ transfer is a completer transfer after
inserted to another address B, the transfer to address B.
12
and is driven onto the bus. The
transfer type changes to
NONSEQ.
13
20 Slave response: A write or read transfer is 5.1.1 A A completed transfer is This was an implicit
Transfer done carried out on address A. signaled when HREADY is test in the previous
high and HRESP is tests
OKAY.
21 Slave response: An address A is driven onto the 5.1.1 A During the waited states, These assertions
bus with 3 waited states. This is the HRESP is low and were implicit in the
Transfer done by keeping the HREADY 5.1.1 HREADY is also low which previous tests.
done low during the data phase of indicates that the transfer
address A. is pending.
Transfer
pending Then an address B is driven After the wait states, the
onto the bus with zero wait transfer of address A is
states. signaled i.e., HRESP is
high and HREADY is high.
The HRESP and HREADY
signals are monitored
22 Slave response: An address A is driven on the 5.1.3 A To start the ERROR This was an implicit
Transfer failed bus. response, the slave drives test in the previous
HRESP high to indicate tests
HWRITE is set to low for a write ERROR while driving
transfer. HREADY low to extend The ERROR
the transfer for one extra response requires
The protection signal is cycle. two cycles.
generated indicating user
access to address A i.e., In the next cycle, If an address
HPROT [1] = 0. HREADY is driven high to location requires
end the transfer and privileged access
HRESP remains driven and you are
high to indicate ERROR accessing.
14
Explanation of Different Fields
No. The serial number of the test.
Feature The feature which the current test is verifying in full or partially. The feature is usually on the abstraction level
of a user.
Test Description A detailed description of the test case is performed. You can be as verbose as you want.
Ref. Reference to the section in the related standard document. The section number, as well as page numbers,
should be described here.
Type Type of the test. Whether the test is an assertion (A) or a transaction (T) type.
Result Indicates that the given module has passed (P) or failed (F) the test.
Comments Any other comments about the test or its results that you want to mention.
15