Forum Discussion
Altera_Forum
Honored Contributor
8 years agoLooking at other people's code is never very easy without the whole code and a testbench and some time. But then its usually much easier to debug it yourself. Altera provide modelsim for free. Have you tried using that?
Notes on your code:
if((rx_buffer(d_width DOWNTO 1) = "00101100") and block_state = '1') then
compteur <= compteur + 1;
block_state <= '0';
else
If d_width is NOT 8, then this statement will always be FALSE. Comparing two vectors of different lengths always returns false without any warnings. The same with the /= comparisons. If DWIDTH /= 8 then all of the /= compares will always be TRUE.