E
ejubenville
If I use a downto clause on a function call at the end of a concatenation, will the downto clause apply only to the return value of the function call, or to the whole concatenation?
In other words, does this:
myvalue & myfunc()(7 downto 0)
mean:
(myvalue & myfunc())(7 downto 0)
or:
myvalue & (myfunc()(7 downto 0))
Here is an example. Suppose GetZeros returns a std_logic_vector of 8 bits, all zeros, and I write this statement:
result <= b"1111" & GetZeros()(3 downto 0);
Will the result be b"11110000", throwing the middle four bits away from b"111100000000"? Or would the result be b"0000", throwing away all but the lower 4 bits of the entire concatenation?
In other words, does this:
myvalue & myfunc()(7 downto 0)
mean:
(myvalue & myfunc())(7 downto 0)
or:
myvalue & (myfunc()(7 downto 0))
Here is an example. Suppose GetZeros returns a std_logic_vector of 8 bits, all zeros, and I write this statement:
result <= b"1111" & GetZeros()(3 downto 0);
Will the result be b"11110000", throwing the middle four bits away from b"111100000000"? Or would the result be b"0000", throwing away all but the lower 4 bits of the entire concatenation?