From da3af4e6e86809038872a61696f3d1bac2e8583c Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Wed, 15 Apr 2020 20:50:19 -0500 Subject: fpga: lib: Fix comments and indentation in axi_fifo_short.v --- fpga/usrp3/lib/fifo/axi_fifo_short.v | 185 ++++++++++++++++------------------- 1 file changed, 87 insertions(+), 98 deletions(-) (limited to 'fpga/usrp3/lib/fifo') diff --git a/fpga/usrp3/lib/fifo/axi_fifo_short.v b/fpga/usrp3/lib/fifo/axi_fifo_short.v index 465be28bb..d78bee24e 100644 --- a/fpga/usrp3/lib/fifo/axi_fifo_short.v +++ b/fpga/usrp3/lib/fifo/axi_fifo_short.v @@ -1,113 +1,102 @@ // // Copyright 2012 Ettus Research LLC // Copyright 2018 Ettus Research, a National Instruments Company +// Copyright 2020 Ettus Research, a National Instruments Brand // // SPDX-License-Identifier: LGPL-3.0-or-later // - - -// -// 32 word FIFO with AXI4-STREAM interface. +// Description: 32 word FIFO with AXI4-Stream interface. // -// NOTE: This module uses the SRLC32E primitive explicitly and as such -// can only be used with Xilinx technology of the VIRTEX-6/SPARTAN-6/SIERIES-7 or newer. +// NOTE: This module uses the SRLC32E primitive explicitly and as such can +// only be used with Xilinx technology. // -module axi_fifo_short - #(parameter WIDTH=32) - ( - input clk, - input reset, - input clear, - input [WIDTH-1:0] i_tdata, - input i_tvalid, - output i_tready, - output [WIDTH-1:0] o_tdata, - output o_tvalid, - input o_tready, - - output reg [5:0] space, - output reg [5:0] occupied - ); +module axi_fifo_short #( + parameter WIDTH = 32 +) ( + input clk, + input reset, + input clear, + input [WIDTH-1:0] i_tdata, + input i_tvalid, + output i_tready, + output [WIDTH-1:0] o_tdata, + output o_tvalid, + input o_tready, - reg full = 1'b0, empty = 1'b1; - wire write = i_tvalid & i_tready; - wire read = o_tready & o_tvalid; + output reg [5:0] space, + output reg [5:0] occupied +); - assign i_tready = ~full; - assign o_tvalid = ~empty; - - reg [4:0] a; - genvar i; - - generate - for (i=0;i