mirror of
https://github.com/mist-devel/mist-board.git
synced 2026-01-28 12:38:43 +00:00
[FIRMWARE/ATARI ST] pl2303 buffer management
This commit is contained in:
@@ -38,6 +38,7 @@ module io_fifo #(
|
||||
input out_strobe,
|
||||
input out_enable,
|
||||
|
||||
output [DEPTH-1:0] space,
|
||||
output empty,
|
||||
output data_available,
|
||||
output full
|
||||
@@ -53,6 +54,8 @@ assign full = (readP == (writeP + 1));
|
||||
assign empty = (readP == writeP);
|
||||
assign data_available = (readP != writeP);
|
||||
|
||||
assign space = readP - writeP - 1;
|
||||
|
||||
// the strobes may not be in the right clock domain, so bring them into the
|
||||
// local clock domain
|
||||
reg in_strobeD, in_strobeD2;
|
||||
|
||||
@@ -88,6 +88,7 @@ io_fifo mfp_in_fifo (
|
||||
.out_strobe (1'b0),
|
||||
.out_enable (serial_cpu_data_read && serial_data_in_available),
|
||||
|
||||
.space (serial_data_in_space),
|
||||
.empty (serial_data_in_empty),
|
||||
.full (serial_data_in_full),
|
||||
.data_available (serial_data_in_available)
|
||||
@@ -98,6 +99,7 @@ reg serial_cpu_data_read, serial_cpu_data_readD;
|
||||
wire serial_data_in_available;
|
||||
wire [7:0] serial_data_in_cpu;
|
||||
wire serial_data_in_empty;
|
||||
wire [3:0] serial_data_in_space;
|
||||
|
||||
always @(negedge clk) begin
|
||||
serial_cpu_data_readD <= serial_cpu_data_read;
|
||||
@@ -249,7 +251,7 @@ wire [31:0] bitrate =
|
||||
(timerd_state == 12'h260)?32'd50: // 50 bit/s (80)
|
||||
32'h80000001; // unsupported bit rate
|
||||
|
||||
wire [7:0] input_fifo_status = { 5'd0,
|
||||
wire [7:0] input_fifo_status = { serial_data_in_space, 1'b0,
|
||||
serial_data_in_empty, serial_data_in_full, serial_data_in_available };
|
||||
|
||||
wire [7:0] parity =
|
||||
|
||||
Reference in New Issue
Block a user