I'm a beginner in FPGAs programming, and I've came across this issue recently:
In a synchronous process, what is the logical explanation for a signal not being able to be read right after its assignation? (I have an idea of the answer but I want to hear your take on this)
On the following snippet of VHDL code:
if byteCnt = 0 then -- On the 1st clock cycle, I assign the first byte of data to block_count's MSByte
block_count(15 downto 8) <= rx_data;
byteCnt := byteCnt+1;
elsif byteCnt = 1 then -- On the 2nd, the LSByte is assigned
block_count(7 downto 0) <= rx_data;
cmd_internal <= block_count; -- Here cmd_internal = 10101010UUUUUUUU, why?
end if;
A quick workaround would be cmd_internal <= block_count(15 downto 8) & rx_data;
but that's not the point of my question :)