module shortfifo #(parameter WIDTH=32) (input clk, input rst, input [WIDTH-1:0] datain, output [WIDTH-1:0] dataout, input read, input write, input clear, output reg full, output reg empty, output reg [4:0] space, output reg [4:0] occupied); reg [3:0] a; genvar i; generate for (i=0;i