On 16 May 2007 00:44:27 -0700, newbie <
[email protected]> wrote:
>Can I pass objects of Program or Package while instantiating a module,
>as I can pass objects of interface.
Amit,
I assume you're talking about SystemVerilog?
As you suggest, a SystemVerilog module can have a port of
interface type. When you instantiate such a module, you
then hook its interface-type port to an instance of a
suitable interface, or perhaps to a modport in such an
interface instance.
You cannot do the same thing with programs or modules,
but only with interfaces.
Packages are somewhat different. Generally you would
import a package into a module. In that way, definitions
in the package become visible to the module. There is
no way to pass a pcakage through a module's port, and
I cannot see how that would make any sense.
Hope this helps
--
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
[email protected]
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.