axi_dmac: Update to verilog-2001 coding style

Fix all the non standard parameter declarations in all verilog files.
main
Istvan Csomortani 2017-07-15 10:52:12 +03:00
parent 4832bc1a0c
commit 2d9b3491c6
16 changed files with 139 additions and 138 deletions

View File

@ -33,7 +33,12 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_2d_transfer ( module dmac_2d_transfer #(
parameter DMA_LENGTH_WIDTH = 24,
parameter BYTES_PER_BEAT_WIDTH_SRC = 3,
parameter BYTES_PER_BEAT_WIDTH_DEST = 3)(
input req_aclk, input req_aclk,
input req_aresetn, input req_aresetn,
@ -58,10 +63,6 @@ module dmac_2d_transfer (
input out_eot input out_eot
); );
parameter DMA_LENGTH_WIDTH = 24;
parameter BYTES_PER_BEAT_WIDTH_SRC = 3;
parameter BYTES_PER_BEAT_WIDTH_DEST = 3;
reg [31:BYTES_PER_BEAT_WIDTH_DEST] dest_address; reg [31:BYTES_PER_BEAT_WIDTH_DEST] dest_address;
reg [31:BYTES_PER_BEAT_WIDTH_SRC] src_address; reg [31:BYTES_PER_BEAT_WIDTH_SRC] src_address;
reg [DMA_LENGTH_WIDTH-1:0] x_length; reg [DMA_LENGTH_WIDTH-1:0] x_length;

View File

@ -33,7 +33,15 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_address_generator ( module dmac_address_generator #(
parameter ID_WIDTH = 3,
parameter DMA_DATA_WIDTH = 64,
parameter DMA_ADDR_WIDTH = 32,
parameter BEATS_PER_BURST_WIDTH = 4,
parameter BYTES_PER_BEAT_WIDTH = $clog2(DMA_DATA_WIDTH/8),
parameter LENGTH_WIDTH = 8)(
input clk, input clk,
input resetn, input resetn,
@ -62,14 +70,6 @@ module dmac_address_generator (
output [ 3:0] cache output [ 3:0] cache
); );
parameter ID_WIDTH = 3;
parameter DMA_DATA_WIDTH = 64;
parameter DMA_ADDR_WIDTH = 32;
parameter BEATS_PER_BURST_WIDTH = 4;
parameter BYTES_PER_BEAT_WIDTH = $clog2(DMA_DATA_WIDTH/8);
parameter LENGTH_WIDTH = 8;
localparam MAX_BEATS_PER_BURST = 2**(BEATS_PER_BURST_WIDTH); localparam MAX_BEATS_PER_BURST = 2**(BEATS_PER_BURST_WIDTH);
`include "inc_id.h" `include "inc_id.h"

View File

@ -33,7 +33,29 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module axi_dmac ( module axi_dmac #(
parameter ID = 0,
parameter DMA_DATA_WIDTH_SRC = 64,
parameter DMA_DATA_WIDTH_DEST = 64,
parameter DMA_LENGTH_WIDTH = 24,
parameter DMA_2D_TRANSFER = 1,
parameter ASYNC_CLK_REQ_SRC = 1,
parameter ASYNC_CLK_SRC_DEST = 1,
parameter ASYNC_CLK_DEST_REQ = 1,
parameter AXI_SLICE_DEST = 0,
parameter AXI_SLICE_SRC = 0,
parameter SYNC_TRANSFER_START = 0,
parameter CYCLIC = 1,
parameter DMA_AXI_PROTOCOL_DEST = 0,
parameter DMA_AXI_PROTOCOL_SRC = 0,
parameter DMA_TYPE_DEST = 0,
parameter DMA_TYPE_SRC = 2,
parameter DMA_AXI_ADDR_WIDTH = 32,
parameter MAX_BYTES_PER_BURST = 128,
parameter FIFO_SIZE = 4, // In bursts
parameter DISABLE_DEBUG_REGISTERS = 0)(
// Slave AXI interface // Slave AXI interface
input s_axi_aclk, input s_axi_aclk,
input s_axi_aresetn, input s_axi_aresetn,
@ -172,33 +194,6 @@ module axi_dmac (
output fifo_rd_xfer_req output fifo_rd_xfer_req
); );
parameter ID = 0;
parameter DMA_DATA_WIDTH_SRC = 64;
parameter DMA_DATA_WIDTH_DEST = 64;
parameter DMA_LENGTH_WIDTH = 24;
parameter DMA_2D_TRANSFER = 1;
parameter ASYNC_CLK_REQ_SRC = 1;
parameter ASYNC_CLK_SRC_DEST = 1;
parameter ASYNC_CLK_DEST_REQ = 1;
parameter AXI_SLICE_DEST = 0;
parameter AXI_SLICE_SRC = 0;
parameter SYNC_TRANSFER_START = 0;
parameter CYCLIC = 1;
parameter DMA_AXI_PROTOCOL_DEST = 0;
parameter DMA_AXI_PROTOCOL_SRC = 0;
parameter DMA_TYPE_DEST = 0;
parameter DMA_TYPE_SRC = 2;
parameter DMA_AXI_ADDR_WIDTH = 32;
parameter MAX_BYTES_PER_BURST = 128;
parameter FIFO_SIZE = 4; // In bursts
parameter DISABLE_DEBUG_REGISTERS = 0;
localparam DMA_TYPE_AXI_MM = 0; localparam DMA_TYPE_AXI_MM = 0;
localparam DMA_TYPE_AXI_STREAM = 1; localparam DMA_TYPE_AXI_STREAM = 1;

View File

@ -33,7 +33,12 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module axi_register_slice ( module axi_register_slice #(
parameter DATA_WIDTH = 32,
parameter FORWARD_REGISTERED = 0,
parameter BACKWARD_REGISTERED = 0)(
input clk, input clk,
input resetn, input resetn,
@ -46,11 +51,6 @@ module axi_register_slice (
output [DATA_WIDTH-1:0] m_axi_data output [DATA_WIDTH-1:0] m_axi_data
); );
parameter DATA_WIDTH = 32;
parameter FORWARD_REGISTERED = 0;
parameter BACKWARD_REGISTERED = 0;
/* /*
s_axi_data -> bwd_data -> fwd_data(1) -> m_axi_data s_axi_data -> bwd_data -> fwd_data(1) -> m_axi_data
s_axi_valid -> bwd_valid -> fwd_valid(1) -> m_axi_valid s_axi_valid -> bwd_valid -> fwd_valid(1) -> m_axi_valid

View File

@ -33,7 +33,14 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_data_mover ( module dmac_data_mover #(
parameter ID_WIDTH = 3,
parameter DATA_WIDTH = 64,
parameter DISABLE_WAIT_FOR_ID = 1,
parameter BEATS_PER_BURST_WIDTH = 4,
parameter LAST = 0)( /* 0 = last asserted at the end of each burst, 1 = last only asserted at the end of the transfer */
input clk, input clk,
input resetn, input resetn,
@ -61,12 +68,6 @@ module dmac_data_mover (
input [BEATS_PER_BURST_WIDTH-1:0] req_last_burst_length input [BEATS_PER_BURST_WIDTH-1:0] req_last_burst_length
); );
parameter ID_WIDTH = 3;
parameter DATA_WIDTH = 64;
parameter DISABLE_WAIT_FOR_ID = 1;
parameter BEATS_PER_BURST_WIDTH = 4;
parameter LAST = 0; /* 0 = last asserted at the end of each burst, 1 = last only asserted at the end of the transfer */
localparam MAX_BEATS_PER_BURST = 2**(BEATS_PER_BURST_WIDTH); localparam MAX_BEATS_PER_BURST = 2**(BEATS_PER_BURST_WIDTH);
`include "inc_id.h" `include "inc_id.h"

View File

@ -33,7 +33,15 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_dest_mm_axi ( module dmac_dest_mm_axi #(
parameter ID_WIDTH = 3,
parameter DMA_DATA_WIDTH = 64,
parameter DMA_ADDR_WIDTH = 32,
parameter BYTES_PER_BEAT_WIDTH = $clog2(DMA_DATA_WIDTH/8),
parameter BEATS_PER_BURST_WIDTH = 4,
parameter AXI_LENGTH_WIDTH = 8)(
input m_axi_aclk, input m_axi_aclk,
input m_axi_aresetn, input m_axi_aresetn,
@ -90,13 +98,6 @@ module dmac_dest_mm_axi (
output m_axi_bready output m_axi_bready
); );
parameter ID_WIDTH = 3;
parameter DMA_DATA_WIDTH = 64;
parameter DMA_ADDR_WIDTH = 32;
parameter BYTES_PER_BEAT_WIDTH = $clog2(DMA_DATA_WIDTH/8);
parameter BEATS_PER_BURST_WIDTH = 4;
parameter AXI_LENGTH_WIDTH = 8;
reg [(DMA_DATA_WIDTH/8)-1:0] wstrb; reg [(DMA_DATA_WIDTH/8)-1:0] wstrb;
wire address_req_valid; wire address_req_valid;

View File

@ -33,7 +33,12 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_dest_axi_stream ( module dmac_dest_axi_stream #(
parameter ID_WIDTH = 3,
parameter S_AXIS_DATA_WIDTH = 64,
parameter BEATS_PER_BURST_WIDTH = 4)(
input s_axis_aclk, input s_axis_aclk,
input s_axis_aresetn, input s_axis_aresetn,
@ -69,9 +74,6 @@ module dmac_dest_axi_stream (
output [1:0] response_resp output [1:0] response_resp
); );
parameter ID_WIDTH = 3;
parameter S_AXIS_DATA_WIDTH = 64;
parameter BEATS_PER_BURST_WIDTH = 4;
reg req_xlast_d = 1'b0; reg req_xlast_d = 1'b0;

View File

@ -33,7 +33,12 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_dest_fifo_inf ( module dmac_dest_fifo_inf #(
parameter ID_WIDTH = 3,
parameter DATA_WIDTH = 64,
parameter BEATS_PER_BURST_WIDTH = 4)(
input clk, input clk,
input resetn, input resetn,
@ -69,10 +74,6 @@ module dmac_dest_fifo_inf (
output [1:0] response_resp output [1:0] response_resp
); );
parameter ID_WIDTH = 3;
parameter DATA_WIDTH = 64;
parameter BEATS_PER_BURST_WIDTH = 4;
assign sync_id_ret = sync_id; assign sync_id_ret = sync_id;
wire data_enabled; wire data_enabled;

View File

@ -33,7 +33,26 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_request_arb ( module dmac_request_arb #(
parameter DMA_DATA_WIDTH_SRC = 64,
parameter DMA_DATA_WIDTH_DEST = 64,
parameter DMA_LENGTH_WIDTH = 24,
parameter BYTES_PER_BEAT_WIDTH_DEST = $clog2(DMA_DATA_WIDTH_DEST/8),
parameter BYTES_PER_BEAT_WIDTH_SRC = $clog2(DMA_DATA_WIDTH_SRC/8),
parameter DMA_TYPE_DEST = DMA_TYPE_MM_AXI,
parameter DMA_TYPE_SRC = DMA_TYPE_FIFO,
parameter DMA_AXI_ADDR_WIDTH = 32,
parameter ASYNC_CLK_REQ_SRC = 1,
parameter ASYNC_CLK_SRC_DEST = 1,
parameter ASYNC_CLK_DEST_REQ = 1,
parameter AXI_SLICE_DEST = 0,
parameter AXI_SLICE_SRC = 0,
parameter MAX_BYTES_PER_BURST = 128,
parameter FIFO_SIZE = 4,
parameter ID_WIDTH = $clog2(FIFO_SIZE*2),
parameter AXI_LENGTH_WIDTH = 8)(
input req_aclk, input req_aclk,
input req_aresetn, input req_aresetn,
@ -137,32 +156,6 @@ module dmac_request_arb (
output [7:0] dbg_status output [7:0] dbg_status
); );
parameter DMA_DATA_WIDTH_SRC = 64;
parameter DMA_DATA_WIDTH_DEST = 64;
parameter DMA_LENGTH_WIDTH = 24;
parameter BYTES_PER_BEAT_WIDTH_DEST = $clog2(DMA_DATA_WIDTH_DEST/8);
parameter BYTES_PER_BEAT_WIDTH_SRC = $clog2(DMA_DATA_WIDTH_SRC/8);
parameter DMA_TYPE_DEST = DMA_TYPE_MM_AXI;
parameter DMA_TYPE_SRC = DMA_TYPE_FIFO;
parameter DMA_AXI_ADDR_WIDTH = 32;
parameter ASYNC_CLK_REQ_SRC = 1;
parameter ASYNC_CLK_SRC_DEST = 1;
parameter ASYNC_CLK_DEST_REQ = 1;
parameter AXI_SLICE_DEST = 0;
parameter AXI_SLICE_SRC = 0;
parameter MAX_BYTES_PER_BURST = 128;
parameter FIFO_SIZE = 4;
parameter ID_WIDTH = $clog2(FIFO_SIZE*2);
parameter AXI_LENGTH_WIDTH = 8;
localparam DMA_TYPE_MM_AXI = 0; localparam DMA_TYPE_MM_AXI = 0;
localparam DMA_TYPE_STREAM_AXI = 1; localparam DMA_TYPE_STREAM_AXI = 1;
localparam DMA_TYPE_FIFO = 2; localparam DMA_TYPE_FIFO = 2;

View File

@ -33,7 +33,11 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_request_generator ( module dmac_request_generator #(
parameter ID_WIDTH = 3,
parameter BURSTS_PER_TRANSFER_WIDTH = 17)(
input req_aclk, input req_aclk,
input req_aresetn, input req_aresetn,
@ -50,9 +54,6 @@ module dmac_request_generator (
output eot output eot
); );
parameter ID_WIDTH = 3;
parameter BURSTS_PER_TRANSFER_WIDTH = 17;
`include "inc_id.h" `include "inc_id.h"
/* /*

View File

@ -33,7 +33,10 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_response_generator ( module dmac_response_generator #(
parameter ID_WIDTH = 3)(
input clk, input clk,
input resetn, input resetn,
@ -52,8 +55,6 @@ module dmac_response_generator (
output [1:0] resp_resp output [1:0] resp_resp
); );
parameter ID_WIDTH = 3;
`include "inc_id.h" `include "inc_id.h"
`include "resp.h" `include "resp.h"

View File

@ -33,7 +33,10 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_response_handler ( module dmac_response_handler #(
parameter ID_WIDTH = 3)(
input clk, input clk,
input resetn, input resetn,
@ -56,8 +59,6 @@ module dmac_response_handler (
output [1:0] resp_resp output [1:0] resp_resp
); );
parameter ID_WIDTH = 3;
`include "resp.h" `include "resp.h"
`include "inc_id.h" `include "inc_id.h"

View File

@ -34,7 +34,10 @@
// *************************************************************************** // ***************************************************************************
module splitter ( module splitter #(
parameter NUM_M = 2)(
input clk, input clk,
input resetn, input resetn,
@ -45,8 +48,6 @@ module splitter (
input [NUM_M-1:0] m_ready input [NUM_M-1:0] m_ready
); );
parameter NUM_M = 2;
reg [NUM_M-1:0] acked; reg [NUM_M-1:0] acked;
assign s_ready = &(m_ready | acked); assign s_ready = &(m_ready | acked);

View File

@ -33,7 +33,15 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_src_mm_axi ( module dmac_src_mm_axi #(
parameter ID_WIDTH = 3,
parameter DMA_DATA_WIDTH = 64,
parameter DMA_ADDR_WIDTH = 32,
parameter BYTES_PER_BEAT_WIDTH = 3,
parameter BEATS_PER_BURST_WIDTH = 4,
parameter AXI_LENGTH_WIDTH = 8)(
input m_axi_aclk, input m_axi_aclk,
input m_axi_aresetn, input m_axi_aresetn,
@ -81,13 +89,6 @@ module dmac_src_mm_axi (
input [ 1:0] m_axi_rresp input [ 1:0] m_axi_rresp
); );
parameter ID_WIDTH = 3;
parameter DMA_DATA_WIDTH = 64;
parameter DMA_ADDR_WIDTH = 32;
parameter BYTES_PER_BEAT_WIDTH = 3;
parameter BEATS_PER_BURST_WIDTH = 4;
parameter AXI_LENGTH_WIDTH = 8;
`include "resp.h" `include "resp.h"
wire address_enabled; wire address_enabled;

View File

@ -33,7 +33,13 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_src_axi_stream ( module dmac_src_axi_stream #(
parameter ID_WIDTH = 3,
parameter S_AXIS_DATA_WIDTH = 64,
parameter LENGTH_WIDTH = 24,
parameter BEATS_PER_BURST_WIDTH = 4)(
input s_axis_aclk, input s_axis_aclk,
input s_axis_aresetn, input s_axis_aresetn,
@ -62,11 +68,6 @@ module dmac_src_axi_stream (
input req_sync_transfer_start input req_sync_transfer_start
); );
parameter ID_WIDTH = 3;
parameter S_AXIS_DATA_WIDTH = 64;
parameter LENGTH_WIDTH = 24;
parameter BEATS_PER_BURST_WIDTH = 4;
reg needs_sync = 1'b0; reg needs_sync = 1'b0;
wire sync = s_axis_user[0]; wire sync = s_axis_user[0];
wire has_sync = ~needs_sync | sync; wire has_sync = ~needs_sync | sync;

View File

@ -33,7 +33,12 @@
// *************************************************************************** // ***************************************************************************
// *************************************************************************** // ***************************************************************************
module dmac_src_fifo_inf ( module dmac_src_fifo_inf #(
parameter ID_WIDTH = 3,
parameter DATA_WIDTH = 64,
parameter BEATS_PER_BURST_WIDTH = 4)(
input clk, input clk,
input resetn, input resetn,
@ -62,10 +67,6 @@ module dmac_src_fifo_inf (
input req_sync_transfer_start input req_sync_transfer_start
); );
parameter ID_WIDTH = 3;
parameter DATA_WIDTH = 64;
parameter BEATS_PER_BURST_WIDTH = 4;
wire ready; wire ready;
reg needs_sync = 1'b0; reg needs_sync = 1'b0;