You are on page 1of 31

SYSTEMVERILOG VERIFICATION

ENVIRONMENT

Lecturer: hungpt@uit.edu.vn 1
DUT
Overview

Lecturer: hungpt@uit.edu.vn 2
DUT
Description(1)
◼ The router has 16 input and 16 output ports
 Each input and output port consists of 3 singles: data, frame, valid
 These signals are represented in a bit-vector format (din[15:0],
dout[15:0], …)

◼ To driver or sample an individual port, the specific bit


position corresponding to the port number must be specified
 For example, if input port 3 is to be driven, then the corresponding
signals shall be din[3], frame_n[3] and valid_n[3]

 For example, if output port 7 is to be sampled, then the corresponding


signals shall be dout[7], frameo_n[7] and valid_n[7]

Lecturer: hungpt@uit.edu.vn 3
DUT
Description(2)

Lecturer: hungpt@uit.edu.vn 4
DUT
Description (3)

Lecturer: hungpt@uit.edu.vn 5
DUT
Input packet structure

Lecturer: hungpt@uit.edu.vn 6
DUT
Output packet structure

Lecturer: hungpt@uit.edu.vn 7
DUT
Reset signal

Lecturer: hungpt@uit.edu.vn 8
SYSTEMVERILOG ENVIRONMENT
Phase of verification

Lecturer: hungpt@uit.edu.vn 9
SYSTEMVERILOG ENVIRONMENT
Structure

Lecturer: hungpt@uit.edu.vn 10
SYSTEMVERILOG ENVIRONMENT
Key feature

Lecturer: hungpt@uit.edu.vn 11
SYSTEMVERILOG ENVIRONMENT
Program block

Lecturer: hungpt@uit.edu.vn 12
SYSTEMVERILOG ENVIRONMENT
Interface: overview

Lecturer: hungpt@uit.edu.vn 13
SYSTEMVERILOG ENVIRONMENT
Interface: example

Lecturer: hungpt@uit.edu.vn 14
SYSTEMVERILOG ENVIRONMENT
Interface: clocking blocks

Lecturer: hungpt@uit.edu.vn 15
SYSTEMVERILOG ENVIRONMENT
Interface: modport

◼ Modport define a subset signals that become ports of the


module

◼ The signals that are not part of the modport do not get
connected and thus you have no access to them

◼ Once defined, modports are only referenced in the port


connection

Lecturer: hungpt@uit.edu.vn 16
SYSTEMVERILOG ENVIRONMENT
Interface: modport

Lecturer: hungpt@uit.edu.vn 17
SYSTEMVERILOG
Interface: modport

Lecturer: hungpt@uit.edu.vn 18
SYSTEMVERILOG
Interface: completed

Lecturer: hungpt@uit.edu.vn 19
SYSTEMVERILOG
Using interface in program

Lecturer: hungpt@uit.edu.vn 20
SYSTEMVERILOG
Complete top level

Lecturer: hungpt@uit.edu.vn 21
DRIVING & SAMPLING DUT SIGNAL
Overview

Lecturer: hungpt@uit.edu.vn 22
DRIVING & SAMPLING DUT SIGNAL
Testbench timing

Lecturer: hungpt@uit.edu.vn 23
DRIVING & SAMPLING DUT SIGNAL
Testbench timing

Lecturer: hungpt@uit.edu.vn 24
DRIVING & SAMPLING DUT SIGNAL
Drive signal

Lecturer: hungpt@uit.edu.vn 25
DRIVING & SAMPLING DUT SIGNAL
Example

Lecturer: hungpt@uit.edu.vn 26
DRIVING & SAMPLING DUT SIGNAL
Sample signal

Lecturer: hungpt@uit.edu.vn 27
DRIVING & SAMPLING DUT SIGNAL
Sample signal: example

Lecturer: hungpt@uit.edu.vn 28
DRIVING & SAMPLING DUT SIGNAL
Signal synchronization

Lecturer: hungpt@uit.edu.vn 29
COMPILE AND RUN

Lecturer: hungpt@uit.edu.vn 30
LAB INTRODUCTION
◼ Lab1: build simulation environment

◼ Lab2: develop generator, transactor and device drives to drive 1


packet through the router

Lecturer: hungpt@uit.edu.vn 31

You might also like