1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-13 15:18:09 +00:00

Merge pull request #264 from antonblanchard/reset-spi-txrx

Reset cmd_ready_o in spi_txrx
This commit is contained in:
Anton Blanchard 2021-01-05 20:16:50 +11:00 committed by GitHub
commit 75be7803b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,12 +257,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;