Closed embediver closed 3 years ago
Do you have a reproduction for the second bug ? In particular how Acc
is declared.
First thanks @tgingold for the fast response!
Folow up: I did a build of the latest master commit (009f0b955b5084594b6912d261405fd1936750f9) and tried my example again. As expected this fixed the exception when analysing.
But now I get the exact behaviour described for the second bug when running the provided example.
For completion, following is the exact output when running ghdl -r RC_Add_n_F
:
ghdl:error: slice direction doesn't match index direction at rcaddfn_ent.vhd:13
in process .rc_add_n_f(arch_rc_add_n_f).P0
from: process work.rc_add_n_f(arch_rc_add_n_f).P0 at rcaddfn_ent.vhd:13
ghdl:error: simulation failed
If desired I can also open a new Issue for this.
Yes, please open a new issue with a reproducer.
First of all, I'm a total beginner at VHDL (my code is only for learning purposes till now) and this might be a limitation I'm not aware of.
Description
When calling a function, using named association seems to be buggy. Doing a straight signal association doesn't seem to be a problem, but specifically ranges won't work correctly.
Expected behaviour When, for example, using a subrange of a bit_vector as a function parameter, beeing able to specify the corresponding function signal (with range).
How to reproduce? Following is a working example which demonstrates the first of the two bugs I encountered. As shown
A(3 downto 0 => A(3 downto 0)
throws a exception when analyzing.Second bug: In a other exercise I did, the following function call causes some problems:
Accv(8 downto 4) := RC_Add_n(A(3 downto 0) => Acc(7 downto 4), B => Mcand, Cin=> '0');
Which throws following error when running that code.error: slice direction doesn't match index direction at mult4x4_2.vhd:42
The second example mainly was the usecase where I wanted to use this notation. Since this is really similar to the first example it surprised me that the error is different and it's probably not only my lack of skill.
Context Please, provide the following information:
If a
GHDL Bug occurred
block is shown in the log, please paste it here: