[sv-bc] Re: Questions


Subject: [sv-bc] Re: Questions
From: Dave Rich (David.Rich@synopsys.com)
Date: Thu Jan 08 2004 - 18:01:07 PST


Warmke, Doug wrote:

>In the SV-BC minutes:
> Nested modules with no ports that are not explicitly
> instantiated shall be implicitly instantiated once with
> an instance name identical to the module name. Otherwise,
> if they have ports, if not explicitly instantiated, they
> are ignored.
>
>Why is there the restriction about modules that have ports?
>I think it would be better if modules with and without ports
>were treated identically, just as modules declared in $unit scope.
>In such cases, the ports are left dangling and the user gets what
>they ask for. Why not treat nested modules identically?
>
>
This functionality mirrors the way program blocks work. The idea is that
programs/modules with no ports almost always have one instances, so
implicitly instantiating them make sense; programs/modules with ports
need to get connected up in an explicit instantiation.

We may have to go back and change the implicit instation rules for $root
because we don't want programs/modules with interface or ref ports to be
implicitly instantiated.

>
>Second question:
>
>For packed structs, the keyword "packed" is required to make
>the structure packed. A tool must check that all constituent
>struct members are of integral types - this can help a user
>make sure that the struct truly is packed and that they haven't
>introduced an element which makes it non-packed.
>
>It is simple for a tool to automatically determine the
>"packedness" of a struct just by examining the members.
>Is there any point to that "packed" keyword other than
>the friendly user-oriented semantic check I mentioned above?
>
>

Oh yes.

A packed struct can be used as a integral primary in any expression. An
unpacked struct can only be copied or compared.

Dave

>Thanks,
>Doug
>
>
>
>

-- 
--
David.Rich@Synopsys.com
Technical Marketing Consultant
http://www.SystemVerilog.org
tele:  650-584-4026
cell:  510-589-2625



This archive was generated by hypermail 2b28 : Thu Jan 08 2004 - 18:30:43 PST