|
@@ -126,7 +126,9 @@ module usb_cdc_channel
|
|
|
|
|
|
.rdclk ( clk_i ),
|
|
|
.q ( data_ep.d.tx_data ),
|
|
|
- .rdreq ( ~inport_valid_q | data_ep.u.tx_data_accept ),
|
|
|
+ .rdreq ( inport_valid_q
|
|
|
+ ? data_ep.u.tx_data_accept
|
|
|
+ : ~inport_empty_w ),
|
|
|
.rdempty ( inport_empty_w ),
|
|
|
.rdfull ( ),
|
|
|
.rdusedw ( )
|
|
@@ -238,13 +240,13 @@ module usb_cdc_channel
|
|
|
|
|
|
tri0 [15:0] status;
|
|
|
assign status[0] = txempty;
|
|
|
- assign status[1] = (txused_msb <= water_ctl[3:4-water_bits]);
|
|
|
- assign status[2] = (txused_msb >= water_ctl[7:8-water_bits]);
|
|
|
+ assign status[1] = txempty | (txused_msb <= water_ctl[3:4-water_bits]);
|
|
|
+ assign status[2] = txfull | (txused_msb >= water_ctl[7:8-water_bits]);
|
|
|
assign status[3] = txfull;
|
|
|
|
|
|
assign status[4] = rxempty;
|
|
|
- assign status[5] = (rxused_msb <= water_ctl[11:12-water_bits]);
|
|
|
- assign status[6] = (rxused_msb >= water_ctl[15:16-water_bits]);
|
|
|
+ assign status[5] = rxempty | (rxused_msb <= water_ctl[11:12-water_bits]);
|
|
|
+ assign status[6] = rxfull | (rxused_msb >= water_ctl[15:16-water_bits]);
|
|
|
assign status[7] = rxfull;
|
|
|
|
|
|
assign status[8] = had_rxdata[1];
|
|
@@ -907,7 +909,10 @@ module usb_cdc_core
|
|
|
end
|
|
|
`CDC_SEND_BREAK:
|
|
|
begin
|
|
|
- rx_break_r[wIndex_w[3:1]] = wIndex_w[0] & |wValue_w;
|
|
|
+ // The break index is based on interfaces,
|
|
|
+ // which is 0, 2, 4, ... for the various
|
|
|
+ // channels, not endpoints.
|
|
|
+ rx_break_r[wIndex_w[3:1]] = |wValue_w;
|
|
|
end
|
|
|
default:
|
|
|
begin
|