@@ -103,18 +103,15 @@ module i3c_wrapper #(
103
103
`endif
104
104
`endif
105
105
106
- // digital I3C input and output signals are exposed for the purpose of simulation
107
- `ifdef DIGITAL_IO_I3C
106
+ // I3C bus driver signals
108
107
input logic scl_i,
109
108
input logic sda_i,
110
109
output logic scl_o,
111
110
output logic sda_o,
111
+ output logic scl_oe,
112
+ output logic sda_oe,
113
+
112
114
output logic sel_od_pp_o,
113
- `else
114
- // I3C bus IO
115
- inout wire i3c_scl_io,
116
- inout wire i3c_sda_io,
117
- `endif
118
115
119
116
// Recovery interface signals
120
117
output logic recovery_payload_available_o,
@@ -137,13 +134,6 @@ module i3c_wrapper #(
137
134
i3c_pkg :: dct_mem_sink_t dct_mem_sink;
138
135
`endif // CONTROLLER_SUPPORT
139
136
140
- logic scl_phy2io;
141
- logic sda_phy2io;
142
- logic scl_io2phy;
143
- logic sda_io2phy;
144
- logic sel_od_pp;
145
-
146
-
147
137
i3c # (
148
138
`ifdef I3C_USE_AHB
149
139
.AhbDataWidth (AhbDataWidth),
@@ -229,11 +219,11 @@ module i3c_wrapper #(
229
219
`endif
230
220
`endif
231
221
232
- .i3c_scl_i (scl_io2phy ),
233
- .i3c_scl_o (scl_phy2io ),
234
- .i3c_sda_i (sda_io2phy ),
235
- .i3c_sda_o (sda_phy2io ),
236
- .sel_od_pp_o (sel_od_pp ),
222
+ .i3c_scl_i (scl_i ),
223
+ .i3c_scl_o (scl_o ),
224
+ .i3c_sda_i (sda_i ),
225
+ .i3c_sda_o (sda_o ),
226
+ .sel_od_pp_o (sel_od_pp_o ),
237
227
238
228
`ifdef CONTROLLER_SUPPORT
239
229
.dat_mem_src_i (dat_mem_src),
@@ -290,33 +280,18 @@ module i3c_wrapper #(
290
280
);
291
281
`endif // CONTROLLER_SUPPORT
292
282
293
- `ifdef DIGITAL_IO_I3C
294
- assign scl_io2phy = scl_i;
295
- assign sda_io2phy = sda_i;
296
- assign scl_o = scl_phy2io;
297
- assign sda_o = sda_phy2io;
298
- assign sel_od_pp_o = sel_od_pp;
299
- `else
300
- logic scl_drive_low, sda_drive_low;
301
- logic sda_od, scl_od;
302
- wire i3c_scl_pp_io, i3c_sda_pp_io;
303
- assign scl_drive_low = ~ scl_phy2io;
304
- assign sda_drive_low = ~ sda_phy2io;
305
-
306
- i3c_io xio (
307
- .scl_i (scl_phy2io),
308
- .sda_i (sda_phy2io),
309
- .scl_o (scl_io2phy),
310
- .sda_o (sda_io2phy),
311
- .scl_io (i3c_scl_pp_io),
312
- .sda_io (i3c_sda_pp_io)
313
- );
283
+ /*
284
+ Truth table.
314
285
315
- assign sda_od = sda_drive_low ? 1'b0 : 1'bz ;
316
- assign scl_od = scl_drive_low ? 1'b0 : 1'bz ;
317
- assign i3c_sda_io = sel_od_pp ? i3c_sda_pp_io : sda_od;
318
- assign i3c_scl_io = sel_od_pp ? i3c_scl_pp_io : scl_od;
286
+ sel_od_pp_o | sda_o || sda_oe | IO state
287
+ ------------+--------++--------+-----------
288
+ 0 | 0 || 1 | 0
289
+ 0 | 1 || 0 | hi-z
290
+ 1 | 0 || 1 | 0
291
+ 1 | 1 || 1 | 1
292
+ */
319
293
320
- `endif
294
+ assign sda_oe = sel_od_pp_o || ! sda_o;
295
+ assign scl_oe = 1'b0 ;
321
296
322
297
endmodule
0 commit comments