Sunteți pe pagina 1din 5

International Journal of Advance Electrical and Electronics Engineering (IJAEEE)

_______________________________________________________________________________________________

Testbench development and verification of Memory Controller


1
Aparajita Lenka, 2G. Shashibhushan
1,2
Dept. of Electronics, Sir MVIT

Flash or ROM memory. Memory controller is used to


Abstract— This project mainly focuses on verifying his
important features of Memory Controller using System manage memory operations. It involvesmemory reset
Verilog which includes a synthesizable subset, an assertions andinitializations, writes and reads, then maintenance
language, a constraint language, a coverage language and operations if any. It manages different memories. 8 Chip
an OOP language. Memory controller is having so many selects each uniquely programmable, 3.Flexible timing
features but this project is basically giving more important to accommodate a variety of memory devices, 4. Burst
on two features. The two features are it should support transfers and burst termination, 5. Supports RMW cycles
more than two different memory and another one is that 6. Performance optimization by leaving active rows
one chip select is connected with one memory and all 8 chip open 7. Default boot sequence support, 8. Dynamic bus
select are connected with same memoryor different
sizing for reading from Async. Devices 9. Byte parity
memories. This absorption helps to provide a complete
verification environment including Constraint Random Generation and Checking, 10. Multi Master Memory bus
Generation, Assertion Based Verification and Coverage support, 11. Industry standard WISHBONE SoC host
Driven Verification. More than 200 coverage points have interface, 12. Up to 8 * 64 Mbyte memory size, 13.
been covered to verify the validation of the integrated Supports Power down Mode [4]. So this paper verifying
features which makes the proposed universal memory the memory controller features that it supports all the
controller replaces the existing controllers on the scene as it memory models like SDRAM, SSRAM, and FLASH. It
provides all of their powerful features in addition of novel is connected with chip select and all the 8 chip select.
features to control two of the most dominated types of
memory; SSRAM, SDRAM and Synchronous chip select II. VERIFICATION
through one memory controller and 8 Chip selects, each
uniquely programmable. In this module level verification Verification is process used for ensuring that the
the entire test environment is modeled using System properties of the design unit are preserved prior to the
Verilog and the write, readtransactions from mapping into the silicon. This process is implemented in
master(memory controller) to slave(memory models) has parallel to the design process. So at each stage of the
been verified with the quantitative values. design we can check out the bugs. Verification is same
Index Terms— Assertion based verification, Coverage as testing but fundamentally different from designing.
driven verification, Chip Select, Flash, Memory controller, So design and verification are two different areas of
System Verilog, SSRAM, SDRAM, experts in the VLSI market. System Verilog and Open
Vera are the widely used HVLs. Generally design and
I. INTRODUCTION verification engineers work together for debugging as
The memory controller is a chip on a compute’s well for problem solving. It’s better to use same
motherboard or CPU die which manages the flow of language for design, testbench and assertion because
data going to and from the memory. It is the interface testbench has the direct access to every part of the
between system memory and the central processing unit. environment without requiring any external.
The memory controller consists of special circuitry Verification is the most integral part of chip
within a computer system that interprets requests from manufacturing and testing and is as important as the
the central processing unit in order to locate data designing. Verification provides with the actual
locations, or addresses, in memory. Microprocessors implementation and functionality of a Design under Test
communicate with memory cores through memory (DUT) and checks if it meets the specifications or not. In
controllers. The main aim of the memory controllers is this paper, a communication protocol has been verified
to provide the most suitable interface and protocol as per the design specifications. The environment so
between the host and the memories to efficiently handle created completely wraps the design under verification
data, maximizing transfer speed, data integrity and and observes an optimum functional and assertion based
information retention [3]. To improve this coverage. The coverage so obtained is 100% assertion
communication as a solution for the memory bottleneck, based coverage and 83.3% functional coverage using SV
the memory cores and memory controllers can be (System Verilog). The total coverage so obtained is
improved. It supports a variety of memory devices, 91.66%.
flexible timing and predefined system startup from a
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-6 Issue-1_2, 2017
7
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________

Verification is different from design but it requires level of abstraction to design and verification. The
complete knowledge of the design. A primary purpose language enhancements in System Verilog provide more
of functional verification is about finding failures concise hardware descriptions, while still providing an
identifying bugs and correcting before they are mapped easy route with existing tools into current hardware
into the IC [1]. implementation flows.
As electronics market is changing swiftly and its In the late 1990s, the Verilog Hardware Description
growth being enormous it induces designers to go for Language (HDL) became the most widely used language
complex IC design and packing them into small for describing hardware for simulation and synthesis.
spaces. So systems on chip (SOC) are developed. 70 % However, the first two versions standardized by the
of design effort goes to verification. Checking of IEEE(1364-1995 and 1364-2001) had only simple
complex design, preserving intellectual property (IP), constructs for creating tests. As design sizes outgrew the
testing of SOC makes verification a difficult task. So in verification capabilities of the language, commercial
industry the number of verification engineers is much Hardware Verification Languages (HVL) such as Open
more than RTL designers [1]. Vera and e were created. Companies that did not want to
pay for these tools instead spent hundreds of man-years
In general IP Verification requires in depth verification
creating their own custom tools [1]. This productivity
with coverage based and constraint random simulation
crisis (along with a similar one on the design side) led to
technique, which needs an advanced test bench equipped
the creation of Accellera, a consortium of EDA
with various components such as coverage monitors and
companies and users who wanted to create the next
scoreboards. But if an IP was fully verified before and
generation of Verilog. The donation of the OpenVera
has a minor design change, it is not necessary to verify
language formed the basis for the HVL features of
all features in detail. A few directed cases and simple
System Verilog. Accellera’s goal was met in November
checkers might be sufficient.
2005 with the adoption of the IEEE standard P1800-
Except for simple cases, the behavioral specification of 2005 for System Verilog, IEEE (2005).
hardware designs is mostly incomplete, leaving the
System Verilog is an extension of the popular Verilog
design’s response to many input stimuli undefined.
language (verilog-2001) with all features of Verilog
During verification, unspecified inputs must be excluded
included [2]. The language is a good stepping stone
from examination to avoid undetermined or spurious
from
erroneous behavior. In a simulation based verification
setting, the concept of a “test bench” is applied to Verilog to OOP, reusing a fair amount of the Verilog
specify valid input sequences as well as the expected syntax. Therefore, the taking up process of System
design responses for them. Verilog is very fast causing designers and verification
engineers to find it very friendly and easy to use.
III. QUESTA SIM TOOL
Following are the key features that separate other
In the above project we are using tool which name is Hardware
Questa sim. It is the latest tool in Mentor Graphics tool
suite for Functional Verification. This tool provides Description Languages such as Verilog or VHDL [2]
simulation support for latest standards of System C, • Features inherited from Verilog HDL,VHDL,C
System Verilog, Verilog and VHD[7].
• Constrained-random stimulus generation
• It supports for advanced verification features like
• Functional coverage
• Coverage databases
• Interfaces
• Coverage driven verification
• Assertions
• Working with assertions
• Higher-level structures, especially object-
• SV constrained- random functionality oriented programming.
IV. SYSTEM VERILOG LANGUAGE • Multithreading and interprocess communication.
In project we are using System Verilog • Support for HDL types such as Verilog’s 4-state
programming language. System Verilog provides a values.
complete verification environment, employing Directed
and Constraint Random[2]. System Verilog includes a synthesizable subset, an
assertions language, a constraint language, a coverage
Generation, Assertion Based Verification and Coverage language and an OOP language. This absorption helps to
Driven Verification. These methods improve the provide a complete verification environment including
verification process dramatically. System Verilog is Constraint Random Generation, Assertion Based
built on top of Verilog 2001[2]. System Verilog Verification and Coverage Driven Verification.
improves the productivity, readability, and reusability of
Verilog based code. System Verilog brings a higher
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-6 Issue-1_2, 2017
8
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________

V. PROPOSED SYSTEM WORK The architecture of System Verilog for memory


controller is having the blocks like generator, BFM or
The proposed system main work is that it should support driver, mailbox, monitor, checker, reference model,
more than two different memory and another one is that coverage, score board, slave model etc.
one chip select is connected with one memory and all 8
chip select are connected with same memory or different A. Generator
memories. It generate the transaction. Transactor does the high
A. Drawbacks of Existing Work level operations like burst-operations into individual
commands, sub-layer protocol in layered protocol like
It supports both FLASH and DRAM memory types to PciExpress Transaction layer over PciExpress Data Link
be controlled [3]. But in new paper the memory Layer, TCP/IP over Ethernet etc. It also handles the
controller can support more than two memory. The DUT configuration operations. This layer also provides
existing paper only has some few features of memory necessary information to coverage model about the
controller. The proposed system wants to show some stimulus generated. Stimulus generated in generator is
new features of memory controller. high level like Packet is with good crc, length is 5 and
B. Advantages of proposed system da, is 8<92>h0. This high level stimulus is converted
into low-level data using packing. This low level data is
This paper is gives the implementation of system level just a array of bits or bytes. Creates test scenarios and
architecture of a memory controller using System tests for the functionality and identifies the transaction
Verilog. The verification of memory controller is through the interface.
completely based on System Verilog. Here we have used
all the features of System Verilog. It supports a variety B. BFM or Driver
of memory devices, flexible timing and predefined It convert transaction level to pin level. The drivers
system startup from a Flash or ROM memory. It has translate the operations produced by the generator into
features like it supports 1.SDRAM, SSRAM, FLASH, the actual inputs for the design under verification.
and many other devices supported [4], 2. 8 Chip selects, Generators create inputs at a high level of abstraction
each uniquely programmable [4], 3. Flexible timing to namely, as transactions like read write operation. The
accommodate a variety of memory devices [4], 4. Burst drivers convert this input into actual design inputs, as
transfers and burst termination [4], 5. Supports RMW defined in the specification of the designs interface [2].
cycles [4], 6. Performance optimization by leaving If the generator generates read operation, then read task
active rows open [4], 7. Default boot sequence support is called, in that, the DUT input pin "read_write" is
[4], 8. Dynamic bus sizing for reading from Async. asserted.
Devices [4], 9. Byte parity Generation and Checking [4],
10. Multi Master Memory bus support [4], 11. Industry C. Monitor
standard WISHBONE SoC host interface [4], 12. Up to It helps to monitor or manage the valid signals at
8 * 64 Mbyte memory size [4], 13. Supports Power interface. It has read only capabilities. Monitor reports
down Mode [4]. So this paper verifying the memory the protocol violation and identifies all the transactions.
controller features that it supports all the memory Monitors are two types, Passive and active. Passive
models like SDRAM, SSRAM, and FLASH. It is monitors do not drive any signals [2]. Active monitors
connected with chip select and all the 8 chip select. can drive the DUT signals. Sometimes this is also
VI. THE ARCHITECTURE OF SYSTEM referred as receiver. Monitor converts the state of the
design and its outputs to a transaction abstraction level
VERILOG FOR MEMORY CONTROLLER so it can be stored in a 'score-boards' database to be
checked later on. Monitor converts the pin level
activities in to high level.
D. Checker
It check or compare the transaction. The monitor only
monitors the interface protocol. It doesn't check the
whether the data is same as expected data or not, as
interface has nothing to do with the data. Checker
converts the low level data to high-level data and
validated the data [2]. This operation of converting low-
level data to high-level data is called Unpacking, which
is reverse of packing operation. For example, if data is
collected from all the commands of the burst operation
and then the data is converted in to raw data, and all the
sub fields information are extracted from the data and
Fig. 1: Architecture of Memory controller using System compared against the expected values. The comparison
Verilog state is sent to scoreboard.
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-6 Issue-1_2, 2017
9
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________

E. Mailbox location wr_rd=0, wb_addr = 60000014, wb_data =


c44268c0.
A mailbox is a communication mechanism that allows
messages to be exchanged between processes or threads
[2]. Data can be sent to a mailbox by one process and
retrieved by another.
F. Reference model
It is basically high level language. It gives the expecting
transaction to the checker.
G. Scoreboard
It keeps track the number of transaction initiated and
whether the transactionpassed or fail [2].
H. Coverage
Coverage is defined as the percentage of verification
objectives that have been met. The functional coverage Fig. 3: Register read and write
routines and methods will allow users to gather
information about the stimulus as well as the standard The fig.4 representing the SSRAM write and read
protocols. Users of VIP will use the provided coverage operation. The SSRAM signals are MC_ADSC,
object as template and add their own coverage MC_ADV_, MC_WE_, MC_DQ, MC_OE_. The
definitions [2]. The same approach as described for MC_WEis used for write cycle and MC_OE is used for
monitors can be used in this case. That means creating a read cycle. SSRAM Devices, the TMSn register has no
virtual based class that could be extended by users’ meaning. All timing values are fixed as illustrated in the
defined-classes. Coverage objects can be defined in this above timing diagrams [4]. Tsrdv is fixed for 2 clock
virtual based class and can be turned “OFF” by default. cycles [4].
All Verification IP layers should be able to access these
objects through appropriate methods [2].
VII.RESULTS
The proposed memory controller has been implemented
by Verilog hardware description language and verified
based on System Verilog. The figure.2 represent the one
of the features of memory controller that it is
communicating with registers. Here we are reading data
from register.

Fig. 4: SSRAM with one chip select


The fig.5 representing the SDRAM write and read
operation. The SDRAM has signals are RAS and CAS
which are used for row and column respectively. The
SDRAM timing configuration may be operated in two
modes: 1) Keeping the current columnopen; 2) Closing
the column after the Read or Write command.Both
modes have advantages and disadvantages, and it will
depend on the overall architecture which mode may be
Fig. 2: Reset read of register best for a given application.The first mode, is to keep a
row open. In this case, after the initial Active command,
The fig.3 representing that the register write the data in subsequent accesses to the same row, do not have to go
memory locations and the each data having different through costly activation cycles [4]. The disadvantage is
write address and same way the register reads the same that access to a different row, must execute additional
data from same memory location. One example is that precharge cycles. If a system performs linear access that
register writing wr_rd = 1, wb_addr = 60000014, will most likely hit the same row more than once, this
wb_data = c44268c0 and reading same data with same mode will provide better overall performance.

_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-6 Issue-1_2, 2017
10
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________

controller should support other kind of memory and


other features of memory controller.
REFERENCES
[1] The evolution of SystemVerilog by David I. Rich
0740-7475/03/$17.00 © 2003 IEEE Copublished
by the IEEE CS and the IEEE CASS IEEE
Design & Test of Computers.
[2] SystemVerilog 3.1a Language Reference Manual
Accellera’s Extensions to Verilog® (2004).
[3] Khaled Khalifa, Implementation and Verification
of A Generic Universal oller Based On
UVM,978-1-4799-1999-4/15/$31.00 ©2015
Fig. 5: SDRAM with one chip select IEEE. 2015 10th International Conference on
Design & Technology of Integrated Systems in
VIII.CONCLUSION Nanoscale Era (DTIS).
This paper proposed an implementation of system level [4] Memory Controller IP Core by Rudolf
architecture of a memory controller using System Usselmann, January 21, 2002.
Verilog. The verification of memory controller is
completely based on System Verilog. Here we have used [5] Khalifa, K., Fawzy, H., El-Ashry, S. & Salah, K.
all the features of System Verilog. Memory controller is (2014, May). A novel memory controller
used to manage memory operations. It involves memory architecture. In Electrical Engineering/
reset and initializations, writes and reads, then Electronics, Computer, Telecommunications and
maintenance operations if any. It manages different Information Technology (ECTI CON), 2014 11th
memories. It provides all of their powerful features in International Conference on (pp. 1-4). IEEE.
addition of novel features to control two of the most [6] Khalifa, K., Fawzy, H., El-Ashry, S., & Salah, K.
dominated types of memory; SSRAM, SDRAM and (2014). Memory controller architectures: A
Synchronous chip select through one memory controller comparative study. In Design and Test
and 8 Chip selects, each uniquely programmable. In this symposium (IDT), 2013 8th International (pp. 1-
module level verification the entire test environment is 6). IEEE.
modeled using System Verilog and the write, read
transactions from master(memory controller) to [7] Questa® SIM User’s Manual Including Support
slave(memory models) has been verified with the for Questa SV/AFV Software Version 10.0d,
quantitative values. The memory controller is a digital Mentor Graphics.
circuit that manages the flow of data going to and from [8] Jacob, Bruce, Spencer Ng, and Daviid Wang.
the computer'smain memory. Memory controllers Memory systems: cache, DRAM, disk. Morgan
contain the logic necessary to read and write to Kaufmann, 2010.
SDRAM, SSRAM and Synchronous chip select.. It
involves memory reset andinitializations, writes and [9] Khalifa, K., Fawzy, H., El-Ashry, s. & Salah, K.
reads, then maintenance operations if any. It manages (2014). Memory controller architectures: A
different memories. 8 Chip selects each uniquely comparative study. In Design and Test ymposium
programmable. The future work is the memory (IDT), 2013 8th International (pp. 1-6). IEEE.



_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-6 Issue-1_2, 2017
11

S-ar putea să vă placă și