Skip to content

Commit 78a74d0

Browse files
committed
bus_tx: add default condition in FSMs
Signed-off-by: Karol Gugala <[email protected]>
1 parent 40f2ddd commit 78a74d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ctrl/bus_tx.sv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ module bus_tx (
149149
tx_done_o = '1;
150150
end
151151
end
152+
default: begin
153+
sda_o = '1;
154+
tx_done_o = '0; // Assign to 1 only after transmitting a bit
155+
load_tcount = '0;
156+
tcount_sel = tNoDelay;
157+
end
152158
endcase
153159
end
154160

@@ -181,6 +187,9 @@ module bus_tx (
181187
if (tcount_q == 20'd0 & scl_stable_low_i)
182188
state_d = Idle;
183189
end
190+
default: begin
191+
state_d = state_q;
192+
end
184193
endcase
185194

186195
// Go to Idle unconditionally

0 commit comments

Comments
 (0)