Hi Im a VHDL newbie and I have a problem.Would be great if someone could help me.
I wanna write a program where I can count down 16 counter. I thought I can use an array which includes 16 adresses where I can count down an integer value starting from 40000 in each adress.
Im using Libero and it gives me always this error message:
C:/Actel/Work/UART_APB_state_machine/hdl/Master.vhd(108): ERROR: type
integer does not match with a string literal (VHDL-1276)
Here is the code i wrote:
type array_Timeout is Array (3 downto 0) of integer range 40000 to 0;
signal array_Timeout_Sicherungsmesswerte : array_Timeout;
if array_Timeout_Sicherungsmesswerte("0000") > 0 then
array_Timeout_Sicherungsmesswerte("0000") <= array_Timeout_Sicherungsmesswerte("0000") - 1 ;
else
array_Timeout_Sicherungsmesswerte("0000") <= 0;
I want that if the integer value is bigger than 0 gets counted down. Else it should be set to 0. In this part of the programm I want that the integer value in my first Adress ("0000") gets counted down.
I am not sure if it is possible to declare the adresses of an Array as an st_logic_vector and write in them a integer value.
I would be really thankful if someone could help me.
Thanks
Steve
I wanna write a program where I can count down 16 counter. I thought I can use an array which includes 16 adresses where I can count down an integer value starting from 40000 in each adress.
Im using Libero and it gives me always this error message:
C:/Actel/Work/UART_APB_state_machine/hdl/Master.vhd(108): ERROR: type
integer does not match with a string literal (VHDL-1276)
Here is the code i wrote:
type array_Timeout is Array (3 downto 0) of integer range 40000 to 0;
signal array_Timeout_Sicherungsmesswerte : array_Timeout;
if array_Timeout_Sicherungsmesswerte("0000") > 0 then
array_Timeout_Sicherungsmesswerte("0000") <= array_Timeout_Sicherungsmesswerte("0000") - 1 ;
else
array_Timeout_Sicherungsmesswerte("0000") <= 0;
I want that if the integer value is bigger than 0 gets counted down. Else it should be set to 0. In this part of the programm I want that the integer value in my first Adress ("0000") gets counted down.
I am not sure if it is possible to declare the adresses of an Array as an st_logic_vector and write in them a integer value.
I would be really thankful if someone could help me.
Thanks
Steve