K
Kevin Neilson
Guest
How do I embed an if-else-if within a constant definition? This doesn't
compile in Modelsim:
constant Y : integer := A when A>B else B;
If I use the math_real library, I can do this:
constant Y : integer := integer(realmax(real(A),real(B)));
but I'd still like a general solution. Must I write a constant function?
-Kevin
compile in Modelsim:
constant Y : integer := A when A>B else B;
If I use the math_real library, I can do this:
constant Y : integer := integer(realmax(real(A),real(B)));
but I'd still like a general solution. Must I write a constant function?
-Kevin