RegisterLogin  
Update Profile
   
You are here: Forum  
Minimize 
SVUG Community Forum
Subject: Issue with calling a interface from a program block.
Prev Next
You are not authorized to post a reply.

Author Messages
KARTHICKUser is Offline

Posts:1

02/06/2008 5:32 AM  

Hi Everyone,

    I have a query for you all.

We are developing a Verification IP  in System verilog

We are trying to Call a task from a Class.

The task is defined inside a module.

But the Class is define outside the module.

So we are using an interface to call the task from the module and map it to the class.

 

An example piece of code which we are using is as follows:-

______________________________________________

 

interface req_gen_oop();

   task call_req_gen;

      input logic Δ:0] Tlp_type;                      

      gpex_bfm_tb.gpex_bfm_inst.req_gen(Tlp_type);

   endtask

endinterface

 

program test(req_gen_oop req_gen_test);

         Environment env;

         env = new(req_gen_test);

endprogram

______________________________________________

 

We are getting the following error when the desing is loaded.

 

# ** Fatal: (vsim-3695) test.sv(0): The interface port 'req_gen_test' must be passed an actual interface.

#    Time: 0 ns  Iteration: 0  Instance: /test File: test.sv

# FATAL ERROR while loading design

# Error loading design

 

Kindly let us know on how shall we proceed further.

 

Thank you,

Karthick.G

AJEETHA KUMARIUser is Offline

Posts:5

02/14/2008 12:30 PM  
Hi,
  Your error message is the indicator - you need to pass an actual-physical interface to the program's argument to get it running. Add some thing like this:

module top;
  req_gen_oop req_gen_if ();
  test test_0(req_gen_if);
endmodule

To your existing code base.

HTH
ajeetha, CVC
www.noveldv.com

You are not authorized to post a reply.
Forums > General Discussion > Main Discussion Area > Issue with calling a interface from a program block.



ActiveForums 3.7
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement