Skip to content

Commit cf4e343

Browse files
committed
Update busy output to reflect PHY state
1 parent 36c0e9b commit cf4e343

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rtl/i2c_master.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ always @(posedge clk) begin
857857
scl_o_reg <= scl_o_next;
858858
sda_o_reg <= sda_o_next;
859859

860-
busy_reg <= !(state_reg == STATE_IDLE || state_reg == STATE_ACTIVE_WRITE || state_reg == STATE_ACTIVE_READ);
860+
busy_reg <= !(state_reg == STATE_IDLE || state_reg == STATE_ACTIVE_WRITE || state_reg == STATE_ACTIVE_READ) || !(phy_state_reg == PHY_STATE_IDLE || phy_state_reg == PHY_STATE_ACTIVE);
861861

862862
if (start_bit) begin
863863
bus_active_reg <= 1'b1;

0 commit comments

Comments
 (0)