[go: up one dir, main page]

0% found this document useful (0 votes)
32 views4 pages

Question

Uploaded by

ajaysivansjv
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)
32 views4 pages

Question

Uploaded by

ajaysivansjv
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/ 4

UVM_MASS_Question_September 2023

www.maven-silicon.com

Maven Silicon Confidential


VLSI Training Services
Setting standards in VLSI Design

All the presentations, books, documents [hard copies and soft copies] labs
and projects [source code] that you are using and developing as part of the training
course are the proprietary work of Maven Silicon and it is fully protected under
copyright and trade secret laws. You may not view, use, disclose, copy, or
distribute the materials or any information except pursuant to a valid written
license from Maven Silicon

Copyright © 2023 Maven Silicon 2


www.maven-silicon.com
VLSI Training Services
Setting standards in VLSI Design

What is the difference in the item_done() method of driver-sequencer


API when called with and without arguments?

Solution:
The item_done() method is a nonblocking method in driver class that is used to
complete handshake with the sequencer after get_next_item() or try_next_item() is successful.
If there is no need to send a response back ,item_done()is called with no arguments
which will complete the handshake without placing anything in the sequencer response FIFO.If
there is a need to send a response back ,item done() is passed with a pointer to a response
sequence_item as am argument. This response pointer will be placed in the sequencer response
FIFO which can be processesd by the sequence as a response to the request it drove.

Program:
item_done() with out arguments:

Driver logic:
task ram_wr_driver::run_phase(uvm_phase phase);
forever
begin
seq_item_port.get_next_item(req);
send_to_dut(req);
seq_item_port.item_done();//item_done without arguments
end
endtask
Sequence logic:
task ram_rand_wr_xtns::body();
req=write_xtn::type_id::create("req");
start_item(req);
assert(req.randomize());
finish_item(req)
end
endtask

Copyright © 2023 Maven Silicon 3


www.maven-silicon.com
VLSI Training Services
Setting standards in VLSI Design

item_done(rsp) with arguments:

Driver logic:
task ram_wr_driver::run_phase(uvm_phase phase);
forever
begin
seq_item_port.get_next_item(req);
send_to_dut(req);
rsp=write_xtn::type_id::create(“rsp”);//creating the object
for rsp
rsp.set_id_info(req); //Copies the sequence_id and
transaction_id from the referenced
item into the calling item.

rsp.res=23;//Here “res” is a property inside the transaction


class
seq_item_port.item_done(rsp);//item_done with arguments
end
endtask
Sequence logic:
task ram_rand_wr_xtns::body();
req=write_xtn::type_id::create("req");
start_item(req);
assert(req.randomize());
finish_item(req);
get_response(rsp);//Which takes response from driver
$display("The response is %d",rsp.res);//Printing the received
response
end
endtask
The expected ouput for item_done with arguments is
The response is 23

Copyright © 2023 Maven Silicon 4


www.maven-silicon.com

You might also like