You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.3 KiB
Coq

// , fifo, fifoip
// : , , ,
// : , ,
// , ,
// /, , 1, /
// , 0, fullemtpy,
module test_fifo(
input wire sys_clk, // U18
input wire sys_rst //J15
);
wire clk_100m;
wire clk_50m;
wire locked;
wire logic_rst;
assign logic_rst = sys_rst && locked; // ()
wire is_empty;
wire is_almost_full;
wire is_wr_rst_busy;
wire fifo_wr_en;
wire fifo_wr_data;
fifo_wr u_fifo_wr(
.wr_clk(clk_50m),
.rst(logic_rst),
.is_empty(is_empty),
.is_almost_full(is_almost_full),
.is_wr_rst_busy(is_wr_rst_busy),
.fifo_wr_en(fifo_wr_en),
.fifo_wr_data(fifo_wr_data)
);
wire is_full;
wire is_almost_empty;
wire is_rd_rst_busy;
wire fifo_rd_en;
wire fifo_rd_data;
fifo_rd u_fifo_rd(
.rd_clk(clk_100m),
.rst(logic_rst),
.is_full(is_full),
.is_almost_empty(is_almost_empty),
.is_rd_rst_busy(is_rd_rst_busy),
.fifo_rd_en(fifo_rd_en),
.fifo_rd_data(fifo_rd_data)
);
clk_wiz_0 u_clk_wiz_0(
.clk_in1(sys_clk),
.clk_out1(clk_100m),
.clk_out2(clk_50m),
.locked(locked)
);
wire [7:0]rd_data_count;
wire [7:0]wr_data_count;
fifo_generator_0 u_fifo_generator_0(
.rst(~logic_rst), // ip, , logic_rst()
.wr_clk(clk_50m),
.rd_clk(clk_100m),
.din(fifo_wr_data),
.wr_en(fifo_wr_en),
.rd_en(fifo_rd_en),
.dout(fifo_rd_data),
.full(is_full),
.almost_full(is_almost_empty),
.rd_data_count(rd_data_count),
.wr_data_count(wr_data_count),
.wr_rst_busy(is_wr_rst_busy),
.rd_rst_busy(is_rd_rst_busy)
);
endmodule