hello
is it possible in VHDL to add compilation directive like this ?
ifdef simulation timer=100
ifdef synthesis timer=100000
I don't find information on this
thanks
No, but is is possible to create a function that returns what you want.
Instead of 'simulation' and 'synthesis' in your example you could instead
have a constant called 'What_Im_Doing' and a function. Below is a sketch of
what I had in mind as a possible way to go about it.
function Get_Timer(What_Im_Doing: string) return natural is
begin
if (What_Im_Doing = "simulation") then
return(100);
elsif (What_Im_Doing = "synthesis") then
return(100000);
else
assert FALSE
report "OOPS! Invalid value for 'What_Im_Doing' (" & What_Im_Doing
& ")"
severity ERROR;
end if;
end function Get_Timer;
constant What_Im_Doing: string := "simulation"; -- As an example...could
also be brought in as a generic to your entity
constant Timer: natural := Get_Timer(What_Im_Doing);
KJ