rafimiet
Member level 5
I have a vhdl code, which has a line as below:
'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:
As the value of 'n' keeps on changing. How can I assign it with a local value?
Code:
variable thrsh : STD_LOGIC_VECTOR(7 downto 0);
SIGNAL n : INTEGER RANGE 0 TO 7 := 7;
thrsh := (n => '1', OTHERS => '0');
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)
Last edited: