mir ist beim Probieren aufgefallen, dass unter den VHDL Codeschnipsel
angegebener Code für Veroderung nicht in ghdl funktioniert.
http://www.mikrocontroller.net/articles/VHDL_Schnipsel#OR_.C3.BCber_alle_Bits_eines_Vectors
1 | architecture test of test is
|
2 | signal ored, anded: bit;
|
3 | signal vec: bit_vector(3 downto 0);
|
4 | begin
|
5 | anded <= '1' when vec = (others => '1') else '0';
|
6 | ored <= '0' when vec = (others => '0') else '1';
|
7 | end;
|
$ ghdl -a --std=02 main.vhd
'others' choice not allowed for an aggregate in this context
'others' choice not allowed for an aggregate in this context
$ ghdl -a --std=93 main.vhd
'others' choice not allowed for an aggregate in this context
'others' choice not allowed for an aggregate in this context
$ ghdl -a --std=87 main.vhd
'others' choice not allowed for an aggregate in this context
'others' choice not allowed for an aggregate in this context
im Moment kann ich nicht mit XST und Quartus testen
aber wenn es auf der Seite steht, denke ich dass es sich um
eine Extension handelt.
Im Grunde möchte ghdl sagen, dass ein Konstrukt (others => '0')
die Bitbreite nicht ermitteln kann/darf. Eigentlich kommt ja
nur die Bitbreite vom anderen Parameter der "=" Funktion.
Weiss jemand wie es im Standard steht?