What is meant by Static name

  • Thread starter Mohammed A khader
  • Start date
M

Mohammed A khader

Hi all,

when I was compiling this function I got the error saying..
aliased object name must be a static name.

function STR(Data_In : in std_logic_vector ) return string is
alias data : std_logic_vector(1 to Data_In'LENGTH) is
Data_In(Data_In'LENGTH-1 DOWNTO 0);
variable result : string(1 to Data_In'LENGTH);
begin
for i in 1 to Data_In'LENGTH loop

result(i) := Std_Table(Data(i));


end loop;
return result;
end function STR;

But it worked with this...
alias data : std_logic_vector(1 to Data_In'LENGTH) is Data_In;

I would like to know what is actually meant by 'static' name.
Thanks in Advance.

Mohammed Khader.
 
M

Mike Treseler

Mohammed said:
when I was compiling this function I got the error saying..
aliased object name must be a static name.
But it worked with this...
alias data : std_logic_vector(1 to Data_In'LENGTH) is Data_In;
I would like to know what is actually meant by 'static' name.

A slice of a static object is not static.
Maybe you can do the slice using a local
function/procedure variable.

-- Mike Treseler
 
M

Mohammed A khader

But if slice index (indcies defining the slice of the object) is
also static then it should be considered as a static .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top