// // Copyright 2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // module fifo_short #(parameter WIDTH=32) (input clk, input reset, input clear, input [WIDTH-1:0] datain, input src_rdy_i, output dst_rdy_o, output [WIDTH-1:0] dataout, output src_rdy_o, input dst_rdy_i, output reg [4:0] space, output reg [4:0] occupied); reg full, empty; wire write = src_rdy_i & dst_rdy_o; wire read = dst_rdy_i & src_rdy_o; assign dst_rdy_o = ~full; assign src_rdy_o = ~empty; reg [3:0] a; genvar i; generate for (i=0;i