
Attribute Question T'SUCC
|>
|> To mix incoming data from different sources by avoiding incremental or decremantal
|> order I tried the following VHDL Code:
|>
|>
|> ARCHITECTURE
|> TYPE gen_folge IS ARRAY (0 TO 7) OF INTEGER;
|> CONSTANT reihenfolge : gen_folge := (1,4,2,5,6,3,7,0) ; -- define order of gen's
|> CONSTANT generatoren : INTEGER := reihenfolge'LENGTH ;
|> BEGIN
|> PROCESS
|> VARIABLE ge : INTEGER ;
|> BEGIN
|> -- starting value:
|> ge := reihenfolge'LEFT;
|> LOOP ..
|> FOR g in 1 TO generatoren LOOP
|> ge := reihenfolge'SUCC(ge); -- get next generator Nummer
|> -- - - - - - - - - - - - - ^ - - - - - - - - - -
|> END LOOP;
|> END LOOP;
|> END PROCESS
|>
|> END arch;
|>
|> ---------------------------------------------------------------------------
-------
|> SYNOPSYS VHDLAN produces the following error message:
|>
|> ge := reihenfolge'SUCC(ge); -- get next generator Nummer
|> ^
|> **Error: vhdlan,545 pixwriter_beh_pe.vhd(149):
|> Attribute is not defined for this prefix.
|>
|> Where does this error message result from?
The SUCC attribute applies to expressions of discrete/physical
type/subtype. The expression "reihenfolge" is not of discrete
type (enumeration/interger type) nor of physical type, but a
composite type.
Some expressions that you could apply directly this attribute to
would be "g", "ge", "reihenfolge(g)", "reihenfolge(ge)",... because
they are all of an integer type.
Tchuess,
David Deharbe.