Design & Verification of FIFO
Design & Verification of FIFO
Design & Verification of FIFO
Abstract:- In this paper, synchronous FIFO is Full and empty signals are used by the logic to
designed using Verilog and then after designing strangle the transmitter and receiver respectively,
this FIFO design under test kept for verification in order to avoid these critical conditions. The Fig.
using System Verilog coding technique. As the 1 shows the functionality of the FIFO. We can
designing of modules get bigger it is becoming represent the FIFO as a pipe that means we can
more difficult to check that design as it takes imagine a FIFO as a pipe where the first element
entering into the pipe is the first element that
longer time to check all the combinations of design
output from the pipe [4].
inputs. This problem can be solved by adding
assertions and cover group. So by putting This paper describes the implementation of
assertions and adding cover groups we can constrained random test stimuli, functional
increase the coverage of code. In this paper we are coverage, also describes an approach for creating
checking code coverage, functional coverage and test cases that allow the use of both constrained
assertion coverage. random tests within a single environment. The
Keywords: Verification, Synchronous FIFO, environment built should also have the capability
Functional coverage, Assertions to be easily modified where a Device under Test
(DUT) of similar structure can be verified. With this
in mind the main goal is to develop a new and
I. Introduction more effective intuitive way of designing test
benches [5]. The more capable verification tools
Nowadays, testing as a word has been substituted must be used, as circuits become more complex.
with check. Confirmation specialists need to This verification should takes place much earlier
guarantee what goes to the plant for assembling is than the fabrication process. In this paper a
an exact representation of the specification of verification environment is comprehend and
configuration [1]. The modem, systematic and implemented which may detect the maximum
automated approaches has been required because errors for proper functioning of the synchronous
of the continuous growth and complexity for FIFO model.
creating test benches [2], given that up to 70% of
the design period is spent in the authentication
process [3], it has become even more critical that
verification engineers design test benches that are
at the advanced of the verification industry.
The synchronous FIFO has an exclusive clock In the presented Fig. 2, the block on the left
port for both the Read and Write operations. The side is the Write control logic block. This block is
data which is given on the data input port is used to control the write operation of the
written on the next empty location. This happens implemented FIFO design. The block basically
only on the positive edge of the clock, when write generates a binary coded write pointer and this
enables and the write select signals of the write pointer gets incremented by one location every
control logic block are high. Then the written
time, the input data is written into the design. write and reset transactions are done in the Driver
Also, this block generates a full signal to avoid block itself. Each implemented transaction will
overwriting a data in the memory block. The block generate a test case that is a random data which
on the right side is the read control logic block, this will initiate by the driver and given to the DUT to
block is used to control the read operation of the perform the specific operation utilizing the
implemented FIFO design. The subunit generates a functioning of the incoming signals. The driver is
the block that deciphers the transactions in to
binary coded read pointer which gets incremented
random inputs i.e. test cases. These are given to
by one location every time, the written data is read
the DUT and the DUT performs specific operation
from the design. Also, this block generates an depending upon the input given. The transaction
empty signal such that no invalid data can be read generator generates a high level transaction like
from memory. The verification phase is most read, write or reset. The driver basically converts
significant step for any successful design. these transactions into actual inputs. A driver gets
the information from the generator and drives it to
III. Verification Process the DUT by inspecting and driving the DUT signals
[10]. It contains the hidden validation to drive the
pins of the DUT as indicated by situation gave to it
The verification plan must consist of the entire from the sequencer.
verification process [6] and formation of a good
plan will save a lot of tedious and unprofitable
time later. The whole plan should include the time
for the completion of process as well as the
authentication of the coverage result [7]. The
verification planning are growing in a speedy
manner hence it becomes more and more
competently requirements to create a good plan
before the verification has been finally started [8].
The theory about verification planning has been
reported in a well organised and systematic
manner [9], which proposes a five-day approach Figure 4:- Verification plan
for the complete verification planning process.
The scoreboard is used to record the
operations of the driver and then displays these
The Block diagram of the verification plan has operations systematically. A screen, a distant
been shown in Fig. 4 and all its components are commodity, is just to monitor the examples of the
explained in this section. The very first component DUT signals [11] but cannot be used to drive them.
comes under verification environment is A monitor collects information, extracts occasions,
Transactor. Transaction class is used to declare performs checking, scope and optionally prints
fields required generating the stimulus, so first follow data. It utilized the screen to sign sent to
step is to declare the 'Fields' in the transaction the pins of the DUT from the driver. As the name
class. Different transactions depending on the test suggests, it basically monitors the operations
case configurations field selection has been performed by the driver and then it passes its data
generated in the transaction class. For the FIFO to the scoreboard to display the information. The
design which has to be implemented, the scoreboard can also be named as tracker as it
transactions are RESET, WRITE and READ tracks all the operations. The dynamic data types
operations and the fields which has been declared and dynamic memory allocation makes the task
here are d_in, w_s, w_e, r_s, r_e, full, empty, much easier to implement scoreboard in the
d_out. Also the input signals (w_s, w_e, r_s, r_e) system Verilog. Normally, a scoreboard confirms
are randomized so that to drive Random stimulus whether there has been fitting operation of the
to DUT by changing the characteristics of data. configuration at a practical level. The Scoreboard
basically stores the data and address when the
After Transactor, Generator class comes which write operation is done and displays the results.
is responsible for, Generating the stimulus by Furthermore, it also records the data and
randomizing the transaction class & sending the addresses that had been previously read. It
randomized class to driver. Using the above matches the similarity of the data and display the
environment, the transaction generator is defined outcome [1].
within the Driver block i.e. the coding to the read,
Further the Environment class comes which is
a container class contains Mailbox, Generator and
Driver. It creates the mailbox, generator and
driver, shares the mailbox handle across the
Generator and Driver. Then Test class is present
which is responsible for creating the environment.
Also it configures the testbench i.e. setting the
type and number of transactions to be generated
as well as initiate the stimulus driving. The
Interface block is one of the essential modules
throughout the verification plan. In this particular
block all the commonly used signals in both the
design and the verification environment. The Figure 5:- The Reset Condition
interconnect block bridge as an interfaced to the
design under-test and the check environment. The This status has forced the value 1 as such that all
interface assimilates all the pin-level associations the output signals would be reset to zero. The
that are made to the DUT [12]. Basically an output signals d_out, rd_ptr, wr_ptr and the s_cnt
interface is a bundle of nets or variables. The are set to zero.
coverage collector mainly covers the coverage
related issues of the block. This block has covers
the groups and cover points that are used to
estimate the functional coverage of the design.
Assertions has been inserted which helps to
shorten the time to debug. Assertions are very
handy and highly useful asset when we talk about
Functional Verification i.e. finding the bugs in the
given RTL design & ensuring Verification
completeness.
endgroup
V. Verification Results and
cg cg_inst = new();
Analysis
initial // or task or function or
The coverage report is shows in the Fig. 8 which is always block
the foremost result in the verification analysis. In foreach(values[i])
the coding, a covergroup is created that is begin
generated which is clearly visible through the d_in = values[i];
coverage report. The coverpoints are created so as w_s = values[i];
to cover the each important aspect of the design w_e = values[i];
[13]. The practical coverage is the determination r_s = values[i];
of the amount of the design usefulness having r_e = values[i];
induced by the verification environment [14].
cg_inst.sample();
end
VI. Conclusion
The design and verification of FIFO was the main
objective of this paper. The initial objective was to
design and implement the FIFO design using
Verilog language. Further the next step was to
verify the DUT i.e. the FIFO module in verification
environment using System Verilog language which
was the last and most crucial target of this work.