From 461b643a89b127d3976b0d3fda5e5ac9665152e6 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Thu, 28 Dec 2023 20:34:43 +0100 Subject: [PATCH] fix: bugs in address detector --- src/i2c/address_detector.vhd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i2c/address_detector.vhd b/src/i2c/address_detector.vhd index c960ca8..4b84578 100644 --- a/src/i2c/address_detector.vhd +++ b/src/i2c/address_detector.vhd @@ -44,9 +44,10 @@ begin -- architecture a1 curr_read_rw; next_index <= (curr_index + 1) when curr_state = CHECKING and scl_pulse_i = '1' and curr_index < 7 else + curr_index when curr_state = CHECKING else 0; - mismatch <= '1' when address_i(6 - curr_index) /= sda_i and curr_index <= 6 and scl_pulse_i = '1' else '0'; + mismatch <= '1' when curr_index <= 6 and address_i(6 - curr_index) /= sda_i and scl_pulse_i = '1' else '0'; set_next_state: process (start_i, curr_state, mismatch, scl_pulse_i) is begin -- process set_next_state -- 2.48.1