Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions protocols/i2c/rtl/I2cMaster.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ begin


when WAIT_ADDR_ACK_S =>
v.timer := r.timer + 1;
-- Saturate the timer to prevent an out of range value
if (r.timer /= TIMEOUT_C) then
v.timer := r.timer + 1;
end if;

if (byteCtrlOut.cmdAck = '1') then -- Master sent the command
if (byteCtrlOut.ackOut = '0') then -- Slave ack'd the transfer
Expand Down Expand Up @@ -302,7 +305,10 @@ begin


when WAIT_READ_DATA_S =>
v.timer := r.timer + 1;
-- Saturate the timer to prevent an out of range value
if (r.timer /= TIMEOUT_C) then
v.timer := r.timer + 1;
end if;

v.byteCtrlIn.stop := r.byteCtrlIn.stop; -- Hold stop or it wont get seen
v.byteCtrlIn.ackIn := r.byteCtrlIn.ackIn; -- This too
Expand Down Expand Up @@ -331,7 +337,10 @@ begin
end if;

when WAIT_WRITE_ACK_S =>
v.timer := r.timer + 1;
-- Saturate the timer to prevent an out of range value
if (r.timer /= TIMEOUT_C) then
v.timer := r.timer + 1;
end if;

v.byteCtrlIn.stop := r.byteCtrlIn.stop;
if (byteCtrlOut.cmdAck = '1') then -- Master sent the command
Expand Down