Skip to content

Commit 79b5482

Browse files
committed
Fix one-off error in tx complete (tests now broken)
1 parent 5ebfc62 commit 79b5482

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/i2c_master.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ begin
130130
// transmitter listens for loss of arbitration
131131
arbitration_err = MULTI_MASTER && (counter == COUNTER_RECEIVE && transaction_progress >= 4'd2 && transaction_progress < 4'd10 && !latched_mode && sda != latched_data[4'd9 - transaction_progress] && !start_err);
132132

133-
transaction_complete = counter == COUNTER_RECEIVE - 1 && transaction_progress == 4'd10 && !start_err && !arbitration_err;
133+
transaction_complete = counter == COUNTER_RECEIVE - 2 && transaction_progress == 4'd10 && !start_err && !arbitration_err;
134134
// transmitter notes whether ACK/NACK was received
135135
// receiver notes whether ACK/NACK was sent
136136
// treats a start by another master as as an ACK

0 commit comments

Comments
 (0)