2 module fifo_2clock_casc
3 #(parameter DWIDTH=32, AWIDTH=9)
4 (input wclk, input [DWIDTH-1:0] datain, input write, output full, output [AWIDTH-1:0] level_wclk,
5 input rclk, output [DWIDTH-1:0] dataout, input read, output empty, output [AWIDTH-1:0] level_rclk,
8 wire full_int, empty_int, full_int2, empty_int2, transfer, transfer2;
9 wire [DWIDTH-1:0] data_int, data_int2;
11 shortfifo #(.WIDTH(DWIDTH)) shortfifo
12 (.clk(wclk), .rst(arst), .clear(0),
13 .datain(datain), .write(write), .full(full),
14 .dataout(data_int), .read(transfer), .empty(empty_int) );
16 assign transfer = ~full_int & ~empty_int;
18 fifo_2clock #(.DWIDTH(DWIDTH),.AWIDTH(AWIDTH)) fifo_2clock
19 (.wclk(wclk), .datain(data_int), .write(transfer), .full(full_int), .level_wclk(level_wclk),
20 .rclk(rclk), .dataout(data_int2), .read(transfer2), .empty(empty_int2), .level_rclk(level_rclk),
23 assign transfer2 = ~full_int2 & ~empty_int2;
25 shortfifo #(.WIDTH(DWIDTH)) shortfifo2
26 (.clk(rclk), .rst(arst), .clear(0),
27 .datain(data_int2), .write(transfer2), .full(full_int2),
28 .dataout(dataout), .read(read), .empty(empty) );
30 endmodule // fifo_2clock_casc