Hi Thomas,
Thomas Stanka <
usenet_no...@stanka-web.de> wrote:
[]
>> I like the idea that secondary units inherit primary units' libraries
>> and use clauses, but scoping those only to the 'first primary unit in a
>> file' seems quite...quirk.
>
> Assume your design contains two packages that define the type unsigned
> (first is the prefered one for your design, second due to IP-usage of
> bad designed IP).
>
> If every primary unit would inherit from all primaries above, you
> could compile the design if each primary is in an individual file, but
> not if you combine several primary units in one file. That would be
> real ....quirk.
I have to assume the offending type definition is not on the entity's
ports, otherwise you would need a wrapper around it in order to convert
the two unsigned definitions from/to eachother.
Now your primary unit has no indication that a different type defintion
should be used instead, hiding the subtle /feature/ in its context clause.
While I see how in your case a 'file scope' for context clause would not
work, I only see troubles in combining primary units in such a case.
I still see it as an overhead that for each primary unit I have to have
a separate context all of which are most likely the same (library ieee;
use ieee.std_logic_1164.all;).
Al