Reset cmd_ready_o in spi_txrx

Initialize bit_count so that cmd_ready_o isn't X state immediately
after reset.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
pull/264/head
Anton Blanchard 4 years ago committed by Anton Blanchard
parent 39c826aa46
commit bf9a446e3f

@ -257,6 +257,9 @@ begin
count_bit: process(clk)
begin
if rising_edge(clk) then
if rst = '1' then
bit_count <= (others => '0');
else
if start_cmd = '1' then
bit_count <= cmd_clks_i;
elsif state /= DATA then
@ -265,6 +268,7 @@ begin
bit_count <= std_ulogic_vector(unsigned(bit_count) - 1);
end if;
end if;
end if;
end process;

-- Shift output data

Loading…
Cancel
Save