summaryrefslogtreecommitdiffstats
path: root/sdcard.v
diff options
context:
space:
mode:
Diffstat (limited to 'sdcard.v')
-rw-r--r--sdcard.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/sdcard.v b/sdcard.v
index dc1e535..e470048 100644
--- a/sdcard.v
+++ b/sdcard.v
@@ -78,7 +78,7 @@ module sdcard (
reg sd_crcstb; // Strobe for CRC generator
reg [6:0] sd_crc7; // CRC-7 generator
reg [15:0] sd_crc16; // CRC-16 generator
- wire sd_sel = msel & ~|cpu_be_n; // Byte enables come late!
+ wire sd_sel = msel & ~&cpu_be_n; // Byte enables come late!
wire sd_cmd = sd_sel & ~sd_active; // CPU command we can act on
reg sd_cmd_ok; // Valid CPU command received
wire sd_start = sd_cmd & cpu_a[5]; // Transaction begin
@@ -161,8 +161,8 @@ module sdcard (
if (sd_cmd)
begin
- if (~cpu_r_wn & cpu_a[0] & ~cpu_be_n[1])
- {sd_cs_n_reg, sd_slow} <= cpu_do[9:8];
+ if (~cpu_r_wn & cpu_a[0] & ~cpu_be_n[0])
+ {sd_cs_n_reg, sd_slow} <= cpu_do[1:0];
if (~cpu_r_wn & cpu_a[1] & ~cpu_be_n[1])
sd_shr_out[15:8] <= cpu_do[15:8];