Hi

Thanks you to all, now it works while casting to the left side.

The reason I worked like this is the module is a gradient calculator for
video applications that calculates at blanking time 2**N - 2 linear values
between A and B. Everyting is configurable via the generic parameters
including the size of input and output.
For many reasons, I wanted i) a matrix definition at the global level for
inter modules communications ii) a matrix organized as a vector of vectors
inside modules for slicing reasons.
My problem was I can define:
type ... range ( positive , positive ) of ...
but I can not defined ranges hyerarchically
type ... range ( positive ) of ... range ( positive ) of ...
To fix this situation I defined inside architectures some vectors while
using a generic parameter and I defined a "matrix" as vectors of these
vectors using another parameter.

Does the principle of multi dimensional dispatched at different level of a
type definition not supported by Ghdl ? by the vhdl in general ? I think
in the vhdl 2008 it is supported.

The second reason is for error tracking. To fit in small cpld's I had to
optimise the calculations while performing serial calculation ( one bit at
a time ). The module is divided into sub modules to multiply, add, and
divide by 2**N - 1 ( in fact to multiply by the inverse that is simple to
generate in this case ). Re-inventing the wheel have the advantage to
force to cast and avoid erronous connections between sub modules.

Regards

Patrick

> Hi Patrick,
>
> concerning your question:
>       -- Here if the cast is removed,
>       -- error is issued while trying to run ghdl with the -a option :
>       -- test.vhdl:xyz:7: no interface for 'theoutput' in association
>       theOutput => std_logic_vector(instanceMatrix(1)));
>
> ghdl is right: the type of theOutput is std_logic_vector while the
> type of instanceMatrix is myVector.  As these are different types, a
> type convertion (what you call a cast) is required.
>
> You can avoid this type convertion by declaring MyVector as:
>
>   subtype myvector is std_logic_vector (size_o - 1 downto 0);
>
>
> I am investigating the other point.
>
> Tristan.
>
>
> On Wed, Oct 15, 2008 at 10:06:24PM +0200, [EMAIL PROTECTED] wrote:
>> In the example below, 3 of the 4 "instanceVector: should be
>> uninitialized,
>> but they are all uninitialized.
>
> In fact there is a bug in ghdl and in your design:
>
>>       -- Here if the cast is removed,
>>       -- error is issued while trying to run ghdl with the -a option :
>>       -- test.vhdl:xyz:7: no interface for 'theoutput' in association
>>       theOutput => std_logic_vector(instanceMatrix(1)));
>
> Because the mode is out, you should write:
>    myVector (theOutput) => instanceMatrix(1)));
>
> Ghdl doesn't catch this error.
>
> Tristan.
>
>
>
> ------------------------------
>
> _______________________________________________
> Ghdl-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/ghdl-discuss
>
>
> End of Ghdl-discuss Digest, Vol 37, Issue 9
> *******************************************
>



_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to