mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-03-02 01:40:18 +00:00
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>
This commit is contained in:
committed by
Anton Blanchard
parent
a0eb4eec17
commit
a3b70ab01e
@@ -258,12 +258,16 @@ begin
|
||||
count_bit: process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
if start_cmd = '1' then
|
||||
bit_count <= cmd_clks_i;
|
||||
elsif state /= DATA then
|
||||
bit_count <= (others => '1');
|
||||
elsif sck_recv = '1' then
|
||||
bit_count <= std_ulogic_vector(unsigned(bit_count) - 1);
|
||||
if rst = '1' then
|
||||
bit_count <= (others => '0');
|
||||
else
|
||||
if start_cmd = '1' then
|
||||
bit_count <= cmd_clks_i;
|
||||
elsif state /= DATA then
|
||||
bit_count <= (others => '1');
|
||||
elsif sck_recv = '1' then
|
||||
bit_count <= std_ulogic_vector(unsigned(bit_count) - 1);
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
Reference in New Issue
Block a user