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.

82 lines
2.8 KiB
Coq

// , fifo, fifoip
// : , , ,
// : , ,
// , ,
8 months ago
// /(is_full/is_empty), , 1, /
// is_emptyfifo_wr_data03, is_empty,,
// , 0, fullemtpy,
module test_fifo(
8 months ago
(*mark_debug="true"*)input wire sys_clk, // U18
input wire sys_rst //J15
);
8 months ago
(*mark_debug="true"*)wire clk_100m;
(*mark_debug="true"*)wire clk_50m;
(*mark_debug="true"*)wire locked;
wire logic_rst;
assign logic_rst = sys_rst && locked; // ()
8 months ago
(*mark_debug="true"*)wire is_empty;
(*mark_debug="true"*)wire is_almost_full;
(*mark_debug="true"*)wire is_wr_rst_busy;
(*mark_debug="true"*)wire fifo_wr_en;
(*mark_debug="true"*)wire [7:0]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)
);
8 months ago
(*mark_debug="true"*)wire is_full;
(*mark_debug="true"*)wire is_almost_empty;
(*mark_debug="true"*)wire is_rd_rst_busy;
(*mark_debug="true"*)wire fifo_rd_en;
(*mark_debug="true"*)wire [7:0]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)
);
8 months ago
(*mark_debug="true"*)wire [7:0]rd_data_count;
(*mark_debug="true"*)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),
8 months ago
.almost_full(is_almost_full),
.empty(is_empty),
.almost_empty(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