VSLVD Unit 3
VSLVD Unit 3
Solution: Interface
Interface
• It represents a bundle of wires with signal direction(i/o) ,timing
• It can also include functional code to modify the signals
Communication Between the Testbench and DUT with ports
• The Fig. shows diagram of the top level design including a testbench,
arbiter(DUT) , clock generator, and the signals that connect them
E.g.
Bus Arbitar
-It contains data and address bus
-give allocation of buses to proper device
-can communicate with one device at a time
-if two or more devices are requesting based on
priority bus will be granted
code to explain the functionality of Arbitar (DUT)
rst r[1] r[0] g[1] g[0]
1 X X 0 0
0 0 1 0 1
0 1 0 1 0
0 1 1 0 1
Keyword
Interface with
modports
DUT
Test bench
Specify the Modport names in the modules that connect to the interface
signals and the top module does not change
Interface with Modports (2nd style)
Top-module