[sv-ec] Query on Interface

From: Saurabh Kumar Shrimal, Noida <saurabhsk_at_.....>
Date: Thu May 12 2005 - 13:00:24 PDT
As the LRM tells that interfaces can be use for the purpose, Design as well
as verification ...

 

   So now in the example:

 

   The DUT is verified .The different values r given to the DUT through the
Interface's tasks from the top module.

 


	
		 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


According to the LRM(3.1a) 19.6.3 The interface for the above model should
like :

 

interface intf(input bit clk);

 

logic [0 :31] addr;

logic [0 : 31] data_in;

logic ready;

logic [0 : 31] data_out;

 

modport channel( input data_out,ready , output data_in,addr,clk,

                 import task initialize(input [0 : 31] addr_in,input [0 :
31] data),

                 import task write(input [0 : 31] data),

                 import task read(),

                 import task control(input [0 : 31] addr_in,input [0 : 31]
data));

 

task initialize;

input [0 : 31] addr_in;

input [0 : 31] data;

........

..........

..........

endtask

 

task control;

input [0 : 31] addr_in;

input [0 : 31] data;

........

..........

..........

endtask

 

 

task write;

input [0 : 31] data;

........

..........

..........

endtask

 

 

task read;

........

..........

..........

endtask

 

endinterface

 

 

So, as per the block diagram the top module from where, I want to use the
interface's tasks for forcing the value to the DUT, then :

 

 

Module top;

 

intf intf1(

           .clk(clk)

          );

 

//<<  How should I use the task...>>

 

/*

intf1.initialize(32'h0,32'h0); 

intf1.control(32'h0000003F,32'h0);               

               or

intf1.channel.control(32'h0000003F,32'h0);

intf1.channel.initialize(32'h0,32'h0);

*/

 

endmodule

 

 

 

   So, wht's the proper way to use the interface task in the top module for
forcing the value , with modport??

 

Regards

-Saurabh



Disclaimer: 

This message and any attachment(s) contained here are information that is
confidential,proprietary to HCL Technologies and its customers, privileged
or otherwise protected by law.The information is solely intended for the
individual or the entity it is addressed to. If you are not the intended
recipient of this message, you are not authorized to read, forward,
print,retain, copy or disseminate this message or any part of it. If you
have received this e-mail in error, please notify the sender immediately by
return e-mail and delete it from your computer.


  


image002.gif
Received on Thu May 12 13:00:45 2005

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 13:01:08 PDT