rtl:i2c: fix slave read error

Signed-off-by: liangkangnan <liangkangnan@163.com>
pull/4/head
liangkangnan 2021-08-26 09:25:18 +08:00
parent e708eb6d4d
commit 2c11873056
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ module i2c_slave (
data_d = {data_q[6:0], sda};
end
end else if (scl_fall_edge) begin
if (op_read_q && (scl_raise_edge_cnt_q < 4'd7)) begin
if (op_read_q && (scl_raise_edge_cnt_q < 4'd8)) begin
sda_oe_d = 1'b1;
data_d = {data_q[6:0], 1'b1};
sda_d = data_q[7];