Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to solve this error in Questasim simulation: Fatal: (vsim-3695)

Status
Not open for further replies.

tingtaox

Newbie level 1
Newbie level 1
Joined
Jan 12, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
9
Hello

I encountered this error when I was writing a random-constrained verification testbench. It occurred at the connection between DUT and testbench, more precisely the program block.

The error is : Fatal: (vsim-3695): The interface port 'in_intf' must be passed an actual interface, when I ran the code on Questa Sim 10.2.

My code is very simple, shown as below:
Code:
module top;
intf in_intf();
switch(in_intf);
test(in_intf);
endmodule

module switch(intf in_intf);
assign in_intf.mp.b = in_intf.mp.a;
endmodule

interface intf();
logic a, b;
modport mp(output a, input b);
endinterface

program test(intf.mp in_intf);
virtual intf.mp intf0 = in_intf; 
...
endprogram

I actually read some posts saying the causes may be incomplete port connection or type mismatch. But I think the connection is complete and their types match. Is there other way to solve it?

Thanks in advance.
 

I did not get the error message you show, but there are a number of other syntax errors with your code.

There are no required instance names in the instantiation of switch and test. It should be:
Code:
module top;
  intf in_intf();
  switch [B]U1[/B](in_intf);
  test [B]U2[/B](in_intf);
endmodule
Modport names should not be referenced in hierarchical paths. They should only be used in port declarations, port connections, and virtual interface declarations.
Code:
module switch(intf[B].mp[/B] in_intf);
  assign in_intf.b = in_intf.a;
endmodule

Finally, I recommend against ever using program blocks in SystemVerilog.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top