From ee95a592cd2cf19da345e7959080e69b900d9809 Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Thu, 14 Apr 2022 11:20:48 -0500 Subject: [PATCH] Reset bit count upon entering RXDATA The but count should be set to 7 when entering RXDATA. previously it was not reset or left at 0, which caused the first byte to only have the lsb set and all other bits to be read incorrectly. --- hw/fpga/sd_controller.sv | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/fpga/sd_controller.sv b/hw/fpga/sd_controller.sv index c606a31..54b7001 100644 --- a/hw/fpga/sd_controller.sv +++ b/hw/fpga/sd_controller.sv @@ -136,6 +136,7 @@ always_comb begin end if (~i_sd_data) begin + next_state.d_bit_count = '1; next_state.macro = RXDATA; end