`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
// Company:
|
// Company:
|
// Engineer:
|
// Engineer:
|
//
|
//
|
// Create Date: 16:23:08 11/24/05
|
// Create Date: 16:23:08 11/24/05
|
// Design Name:
|
// Design Name:
|
// Module Name: rxFIFOMgnt
|
// Module Name: rxFIFOMgnt
|
// Project Name:
|
// Project Name:
|
// Target Device:
|
// Target Device:
|
// Tool versions:
|
// Tool versions:
|
// Description:
|
// Description:
|
//
|
//
|
// Dependencies:
|
// Dependencies:
|
//
|
//
|
// Revision:
|
// Revision:
|
// Revision 0.01 - File Created
|
// Revision 0.01 - File Created
|
// Additional Comments:
|
// Additional Comments:
|
//
|
//
|
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
module rxFIFOMgnt(rxclk_180, reset, rxd64, rxc_fifo, inband_fcs, receiving, recv_end, rx_data_valid, rx_data);
|
module rxFIFOMgnt(rxclk_180, reset, rxd64, rxc_fifo, inband_fcs, receiving, recv_end, rx_data_valid, rx_data);
|
input rxclk_180;
|
input rxclk_180;
|
input reset;
|
input reset;
|
input [63:0] rxd64;
|
input [63:0] rxd64;
|
input [7:0] rxc_fifo;
|
input [7:0] rxc_fifo;
|
input receiving;
|
input receiving;
|
input recv_end;
|
input recv_end;
|
input inband_fcs;
|
input inband_fcs;
|
|
|
output[7:0] rx_data_valid;
|
output[7:0] rx_data_valid;
|
output[63:0] rx_data;
|
output[63:0] rx_data;
|
|
|
wire rxfifo_full;
|
wire rxfifo_full;
|
wire rxfifo_empty;
|
wire rxfifo_empty;
|
wire[7:0] byte_cnt;
|
wire[7:0] byte_cnt;
|
wire fifo_rd_en;
|
wire fifo_rd_en;
|
wire fifo_wr_en;
|
wire fifo_wr_en;
|
|
|
assign fifo_rd_en = ~rxfifo_empty;
|
assign fifo_rd_en = ~rxfifo_empty;
|
assign fifo_wr_en = receiving & ~recv_end;
|
assign fifo_wr_en = receiving & ~recv_end;
|
|
|
rxdatafifo rxdatain(.clk(rxclk_180),
|
rxdatafifo rxdatain(.clk(rxclk_180),
|
.sinit(reset),
|
.sinit(reset),
|
.din(rxd64),
|
.din(rxd64),
|
.wr_en(fifo_wr_en),
|
.wr_en(fifo_wr_en),
|
.rd_en(fifo_rd_en),
|
.rd_en(fifo_rd_en),
|
.dout(rx_data),
|
.dout(rx_data),
|
.full(rxfifo_full),
|
.full(rxfifo_full),
|
.empty(rxfifo_empty),
|
.empty(rxfifo_empty),
|
.data_count(byte_cnt));
|
.data_count(byte_cnt));
|
|
|
rxcntrlfifo rxcntrlin(.clk(rxclk_180),
|
rxcntrlfifo rxcntrlin(.clk(rxclk_180),
|
.sinit(reset),
|
.sinit(reset),
|
.din(rxc_fifo),
|
.din(rxc_fifo),
|
.wr_en(fifo_wr_en),
|
.wr_en(fifo_wr_en),
|
.rd_en(fifo_rd_en),
|
.rd_en(fifo_rd_en),
|
.dout(rx_data_valid),
|
.dout(rx_data_valid),
|
.full(),
|
.full(),
|
.empty());
|
.empty());
|
|
|
|
|
|
|
endmodule
|
endmodule
|
|
|