Since AXI buses are heavily used, follow these specific naming conventions to simplify connections:
Module Port Naming (Master/Slave Convention)
When defining ports for a module, use the s_ (slave) and m_ (master) prefixes. This ensures that a master always connects to a slave correctly.
// Slave interface ports
input wire [63:0] s_axis_tdata,
input wire s_axis_tlast,
input wire s_axis_tvalid,
output wire s_axis_tready,
// Master interface ports
output reg [63:0] m_axis_tdata,
output reg m_axis_tlast,
output reg m_axis_tvalid,
input wire m_axis_tready,
Inter-module Connection Naming
Do not use the master/slave convention for the wires that connect two modules. Instead, name the wire based on its function or the data it carries.
- Functional Naming:
axis_eth2xbar_tdata - Data-centric Naming: If the 'axis' prefix is obvious, you may drop it (e.g.,
samp_tdata).
// Module ports use master/slave convention
input wire [63:0] s_axis_tdata,
output reg [63:0] m_axis_tdata,
// Connections between modules use functional/data names
wire [63:0] axis_eth2xbar_tdata,
wire [63:0] samp_tdata,