variable thrsh : STD_LOGIC_VECTOR(7 downto 0);
SIGNAL n : INTEGER RANGE 0 TO 7 := 7;
thrsh := (n => '1', OTHERS => '0');
'n' initially is the position of MSB bit. In next iteration, it gives the position of MSB-1 bit and so on... It gives the following error:
Code:
ERROR:HDLParsers:3375 - "FSM_all.vhd" Line 439. Choices for an array aggregate (Signal 'n') must be locally static unless there is only one choice. (LRM 7.3.2.2)
As the value of 'n' keeps on changing. How can I assign it with a local value?