[go: up one dir, main page]

0% found this document useful (0 votes)
9 views17 pages

Lab3 Slides

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views17 pages

Lab3 Slides

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Fall 2009

Dr. Meeta Yadav

©2009, Dr. Meeta Yadav, http://www.asicverification.org 1


Topics

• Generator and Driver Overview


• New features introduced in the lab

©2009, Dr. Meeta Yadav, http://www.asicverification.org 2


Generator
• Generator

Generator

name pkt2send in_box

pkt_no num_pkts

new() gen() start()

©2009, Dr. Meeta Yadav, http://www.asicverification.org 3


Generator
• Generator: new( )
name

name pkt2send

packet

num_pkts num_pkts pkt_no in_box

©2009, Dr. Meeta Yadav, http://www.asicverification.org 4


Generator
• Generator: gen( )
name

name pkt2send
randomize

packet

num_pkts num_pkts pkt_no in_box

©2009, Dr. Meeta Yadav, http://www.asicverification.org 5


Generator
• Generator: start( )
name

name pkt2send
randomized
packet

num_pkts num_pkts pkt_no in_box put

0 packet

©2009, Dr. Meeta Yadav, http://www.asicverification.org 6


DriverBase
• DriverBase

DriverBase

name pkt2send interface

Various Input signals

new() send_payload()
virtual

©2009, Dr. Meeta Yadav, http://www.asicverification.org 7


DriverBase
• DriverBase: new ( )
DriverBase Execute Interface

name pkt2send interface

Various Input signals

Drive Signals into the DUT

©2009, Dr. Meeta Yadav, http://www.asicverification.org 8


Driver
• Driver extends DriverBase

Driver

out_box in_box
DriverBase

new() start()
send_payload()
virtual
virtual

©2009, Dr. Meeta Yadav, http://www.asicverification.org 9


Driver
• Driver: new( )

Driver
Execute Interface

in_box

DriverBase

out_box

©2009, Dr. Meeta Yadav, http://www.asicverification.org 10


Driver
• Driver: start( )

Various input signals

pkt2send.signals
Driver
Execute Interface

get

Get the packet

DriverBase

out_box

©2009, Dr. Meeta Yadav, http://www.asicverification.org 11


New Things in Lab
• Parameterized Mailboxes
 To tie a mailbox to transfer only one kind of data

typedef mailbox #(Packet) in_box_type;


In_box_type in_box;

in_box

Can only transfer handles of


Packet class

©2009, Dr. Meeta Yadav, http://www.asicverification.org 12


New Things in Lab
• extern
 Allows you to move method definitions outside the body of the class
declarations

class Generator

extern function new (…)

endclass in_box

function Generator::new(…)

©2009, Dr. Meeta Yadav, http://www.asicverification.org 13


New Things in Lab
• new ( ) function in the extended class
 If the base class constructor has any arguments the constructor in the
extended class must have a constructor and must call the base
constructor on its first line

class Driver extends DriverBase


function Driver::new (string...)


super.new(name, Execute);

©2009, Dr. Meeta Yadav, http://www.asicverification.org 14


New Things in Lab
• Virtual Interface
 Virtual interfaces provide a mechanism for separating abstract models
and test programs from the actual signals that make up the design.
 A virtual interface allows the same subprogram to operate on different
portions of a design, and to dynamically control the set of signals
associated with the subprogram.
 Instead of referring to the actual set of signals directly, users are able to
manipulate a set of virtual signals.
 Changes to the underlying design do not require the code using virtual
interfaces to be re-written.
 By abstracting the connectivity and functionality of a set of blocks, virtual
interfaces promote code-reuse
 Can be passed as arguments to task and functions

virtual Execute_io.TB Execute

©2009, Dr. Meeta Yadav, http://www.asicverification.org 15


New Things in Lab
• Virtual Interface
 Virtual interfaces is a handle or a pointer to the physical interface
 Must be initialized

©2009, Dr. Meeta Yadav, http://www.asicverification.org 16


Thank You

©2009, Dr. Meeta Yadav, http://www.asicverification.org 17

You might also like