Re: How to "import" an interface into a module w/o `include?



On Wed, 12 Sep 2007 13:15:36 GMT,
Mark Odell <mao@xxxxxxxxxxxxxx> wrote:

vlog testbench.sv -work /user/modell/proj/xs1_tb/out/nz_tb
-L /user/modell/proj/xs1_tb/out/nz_pkg
-L /user/modell/proj/xs1_tb/out/nz_rtl
-quiet -nologo -novopt -incr -lint -source -hazards
-timescale 1ns/1ps -dpiheader testbench_dpi.h

###### testbench.sv(145): perbus_if pb_if();
** Error: testbench.sv(145): Undefined variable: perbus_if.
** Error: testbench.sv(145): near "pb_if": syntax error, unexpected "IDENTIFIER"

Line 145 contains the attempt to instantiate a perbus_if which is
an interface defined in the nz_pkg lib (created by vlib).

OK. This compile error is NOTHING TO DO WITH THAT. If your
interface instantiation were syntactically OK, then the vlog compiler
would not make any attempt to find your interface definition - as
I mentioned in another post, I think. There is a different, simpler
problem. For example:

- spurious punctuation on some previous line of code
- you're trying to instantiate the interface in some
context where an instance is illegal (e.g. outside
any module or interface body)
- mismatched begin...end somewhere earlier in the code

Can you post the preceding 144 lines of code? I betcha
it's something totally trivial...
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@xxxxxxxxxxxxx
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
.



Relevant Pages

  • Re: What about CAO?
    ... So if I have the remoting service set as SingleCall - it's ... it's not possible to instantiate a new ... Now implement this interface on the ... > only on the client). ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: pls clarify important concepts...
    ... >>I do know what instantiate is, ... > Subclassing is just that: ... You implement an interface. ... methods of this interface if I implement ServletRequest? ...
    (comp.lang.java.help)
  • Re: BITS Service
    ... Failed to instantiate BITS Manager interface... ... Analysis of the error code does not suggest a probable cause. ... the Microsoft Knowledge Base at ...
    (microsoft.public.windows.server.general)
  • Re: What about CAO?
    ... One possible solution to this is to extend your shared assembly with an interface for a SAO object. ... It needs a single method which returns a new instance of the CAO, ... Then get a reference of this object on the client via GetObject (you do not instantiate the object, you get a proxy of the existing one from the server - so it will work with the interface only on the client). ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Making a generic data layer
    ... instance of SqlParameter through IDbDataParameter interface. ... you can put your mind at rest :-) ... but of course I can't instantiate an interface. ...
    (microsoft.public.dotnet.framework.adonet)