Saurabh, A modport does not create a scope and can only be used in the context of a port connection. From the top module, you just use the normal hierarchical names, as if the interface instance was a module instance. intf1.initialize(32'h0,32'h0); intf1.control(32'h0000003F,32'h0); Dave ________________________________ From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Saurabh Kumar Shrimal, Noida Sent: Thursday, May 12, 2005 1:00 PM To: sv-ec@eda.org Subject: [sv-ec] Query on Interface 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.
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 15:53:36 PDT