Radical Computer Technologies
DSP / entity

raddsp_axis_gain

Documentation version: 0.2.1 / Subpackage: dsp_transform / Source package: raddsp

Multi-channel AXI-stream fixed-point gain stage. Multiplies each sample lane by an independent programmable coefficient, scales by fractional bits, saturates, and forwards frame metadata.

Use Cases

Block Diagram

raddsp_axis_gain radhdl entity S_AXIS clk rst gain_i M_AXIS
VHDL Include And Instantiation Template

File Header

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

library radhdl;
-- Direct entity instantiation below does not require importing the entity name.
use radhdl.dsp.all;
-- Narrower alternative: use radhdl.dsp_transform.all;

Component Declaration

component raddsp_axis_gain is
  generic (
    VENDOR : string := "xilinx";
    DEVICE_FAMILY : string := "generic";
    DATA_WIDTH : positive := 16;
    COEFF_WIDTH : positive := 18;
    COEFF_FRAC_BITS : natural := 15;
    CHANNEL_COUNT : positive := 1
  );
  port (
    m_axis_tvalid : out std_logic;
    m_axis_tready : in std_logic;
    m_axis_tdata : out std_logic_vector((CHANNEL_COUNT * DATA_WIDTH) - 1 downto 0);
    m_axis_tlast : out std_logic;
    s_axis_tvalid : in std_logic;
    s_axis_tready : out std_logic;
    s_axis_tdata : in std_logic_vector((CHANNEL_COUNT * DATA_WIDTH) - 1 downto 0);
    s_axis_tlast : in std_logic;
    clk : in std_logic;
    rst : in std_logic;
    gain_i : in std_logic_vector((CHANNEL_COUNT * COEFF_WIDTH) - 1 downto 0)
  );
end component;

Direct Entity Instantiation

u_raddsp_axis_gain : entity radhdl.raddsp_axis_gain
  generic map (
    VENDOR          => "xilinx",
    DEVICE_FAMILY   => "generic",
    DATA_WIDTH      => 16,
    COEFF_WIDTH     => 18,
    COEFF_FRAC_BITS => 15,
    CHANNEL_COUNT   => 1
  )
  port map (
    m_axis_tvalid => <m_axis_tvalid_signal>,
    m_axis_tready => <m_axis_tready_signal>,
    m_axis_tdata  => <m_axis_tdata_signal>,
    m_axis_tlast  => <m_axis_tlast_signal>,
    s_axis_tvalid => <s_axis_tvalid_signal>,
    s_axis_tready => <s_axis_tready_signal>,
    s_axis_tdata  => <s_axis_tdata_signal>,
    s_axis_tlast  => <s_axis_tlast_signal>,
    clk           => <clk_signal>,
    rst           => <rst_signal>,
    gain_i        => <gain_i_signal>
  );

Generics

NameTypeDefaultDescription
VENDORstring"xilinx"Selects the vendor-specific implementation path, usually XILINX for DSP48/XPM-backed builds or generic for portable RTL.
DEVICE_FAMILYstring"generic"Identifies the target FPGA family so wrappers can choose the correct primitive or conservative portable behavior.
DATA_WIDTHpositive16Sets the bit width for DATA WIDTH values carried by this module.
COEFF_WIDTHpositive18Sets the bit width for COEFF WIDTH values carried by this module.
COEFF_FRAC_BITSnatural15Sets coefficient precision or coefficient count for the fixed-point DSP operation.
CHANNEL_COUNTpositive1Sets the number of parallel sample lanes processed per handshake beat.

Ports

NameDirectionTypeDescription
m_axis_tvalidoutstd_logicOutput AXI-stream valid qualifier for the current result beat.
m_axis_treadyinstd_logicOutput AXI-stream ready input from the downstream block.
m_axis_tdataoutstd_logic_vector((CHANNEL_COUNT * DATA_WIDTH) - 1 downto 0)Output AXI-stream payload containing packed processed result lanes.
m_axis_tlastoutstd_logicOutput AXI-stream frame marker aligned with the processed result beat.
s_axis_tvalidinstd_logicInput AXI-stream valid qualifier for the current sample beat.
s_axis_treadyoutstd_logicInput AXI-stream ready response indicating this block can accept a beat.
s_axis_tdatainstd_logic_vector((CHANNEL_COUNT * DATA_WIDTH) - 1 downto 0)Input AXI-stream payload containing packed sample or feature lanes.
s_axis_tlastinstd_logicInput AXI-stream frame marker for the final beat of a frame.
clkinstd_logicClock for the associated synchronous logic and handshake domain.
rstinstd_logicActive-high synchronous reset for this clock domain.
gain_iinstd_logic_vector((CHANNEL_COUNT * COEFF_WIDTH) - 1 downto 0)Packed fixed-point gain coefficient input, one coefficient per channel.

Measured Implementation Metrics

Metrics are generated by RadBuild from real Vivado synthesis reports for representative device targets. Raw report paths are preserved in the checked summary JSON.

PartClock nsMHzLUTsFFsBRAM tilesDSPsSetup WNS nsHold WHS nsGenericsSummary
xc7a35tcsg324-110.0100.0-------projects/synth_reports/raddsp_axis_gain/xc7a35tcsg324-1/synth_summary.json
xc7a35tcsg324-210.0100.02759016.4520.136-projects/synth_reports/raddsp_axis_gain/xc7a35tcsg324-2/synth_summary.json
xc7z020clg400-110.0100.02759015.4210.144-projects/synth_reports/raddsp_axis_gain/xc7z020clg400-1/synth_summary.json
xc7z020clg400-210.0100.02759016.7340.138-projects/synth_reports/raddsp_axis_gain/xc7z020clg400-2/synth_summary.json
xc7z020clg400-310.0100.0-------projects/synth_reports/raddsp_axis_gain/xc7z020clg400-3/synth_summary.json
xczu3eg-sfvc784-1-e6.667149.9932759014.898-0.063DEVICE_FAMILY=ultrascaleplusprojects/synth_reports/raddsp_axis_gain/xczu3eg-sfvc784-1-e/synth_summary.json
xczu3eg-sfvc784-2-e6.667149.9932759015.5450.146DEVICE_FAMILY=ultrascaleplusprojects/synth_reports/raddsp_axis_gain/xczu3eg-sfvc784-2-e/synth_summary.json

Register Interfaces

No fixed register map was found; this section documents the exposed register/control interface ports.

InterfaceDirectionsSignalsRepresentative ports
M_AXISin, out4m_axis_tvalid, m_axis_tready, m_axis_tdata, m_axis_tlast
S_AXISin, out4s_axis_tvalid, s_axis_tready, s_axis_tdata, s_axis_tlast

Testbenches

tb_raddsp_axis_smoke captured waveform

Source: dsp/hdl/testbenches/tb_raddsp_axis_smoke.vhd

Self-checking or stimulus-focused testbench for axis smoke. Exercises representative handshakes, reset behavior, frame boundaries, and numeric corner cases for regression runs.

Artifacts: status, vcd

Data Plots

Gain Core Response

Input and output samples for the scalar AXI-stream gain core.

00.20.40.60.812561280-128-256Signed sample value vs Transaction sampleInputOutput

FIR Two-Tap Accumulation

Short impulse-style sequence showing the two-tap FIR summing current and prior samples.

00.40.81.21.6264320-32-64Signed sample value vs Transaction sampleInputFIR Output

Biquad Sequential Path

Sequential-MAC biquad smoke response with feed-forward coefficient b0 set for unity behavior.

00.20.40.60.81128640-64-128Signed sample value vs Transaction sampleInputOutput

Matrix Dot Product Output

Dot-product smoke output and accumulated element count.

00.20.40.60.81644832160Integer value vs Transaction sampleDot ProductElement Count

Captured GHDL Waveform

Source: dsp/hdl/testbenches/tb_raddsp_axis_smoke.vhd

clk
rst
gain_coeff[15:0]
gain2_coeff[31:0]
gain2_s_valid
gain2_s_ready
gain2_s_data[31:0]
gain2_s_last
gain2_m_valid
gain2_m_ready
gain2_m_data[31:0]
gain2_m_last
bq_b0[15:0]
bq_z[15:0]
bq_s_valid
bq_s_ready
bq_s_data[15:0]
bq_s_last
bq_m_valid
bq_m_ready
bq_m_data[15:0]
bq_m_last
bq_seq_s_valid
bq_seq_s_ready
bq_seq_s_data[15:0]
bq_seq_s_last
bq_seq_m_valid
bq_seq_m_ready
bq_seq_m_data[15:0]
bq_seq_m_last
lp_seq_s_valid
lp_seq_s_ready
lp_seq_s_data[15:0]
lp_seq_s_last
lp_seq_m_valid
lp_seq_m_ready
lp_seq_m_data[15:0]
lp_seq_m_last
fir_taps[31:0]
fir_s_valid
fir_s_ready
fir_s_data[15:0]
fir_s_last
fir_m_valid
fir_m_ready
fir_m_data[15:0]
fir_m_last
fir_seq_s_valid
fir_seq_s_ready
fir_seq_s_data[15:0]
fir_seq_s_last
fir_seq_m_valid
fir_seq_m_ready
fir_seq_m_data[15:0]
fir_seq_m_last
mat_op[1:0]
mat_s0_valid
mat_s0_ready
mat_s0_data[15:0]
mat_s0_last
mat_s1_valid
mat_s1_ready
mat_s1_data[15:0]
mat_s1_last
mat_m_valid
mat_m_ready
mat_m_data[15:0]
mat_m_last
dot_s0_valid
dot_s0_ready
dot_s0_data[15:0]
dot_s0_last
dot_s1_valid
dot_s1_ready
dot_s1_data[15:0]
dot_s1_last
dot_m_valid
dot_m_ready
dot_m_data[31:0]
dot_m_last
dot_count[31:0]
gain_i[15:0]
out_valid_r
out_data_r[15:0]
out_last_r
busy_r
ready_i
mul_valid[0:0]
mul_last[0:0]
mul_p_valid[0:0]
mul_p_last[0:0]
unused_sub[0:0]
valid_i
subtract_i
last_i
a_i[15:0]
M_AXIS interface signals

M_AXIS Interface Waveform

Source: dsp/hdl/testbenches/tb_raddsp_axis_smoke.vhd

m_axis_tvalid
m_axis_tready
m_axis_tdata[15:0]
m_axis_tlast
m_axis_tdata[31:0]
S_AXIS interface signals

S_AXIS Interface Waveform

Source: dsp/hdl/testbenches/tb_raddsp_axis_smoke.vhd

s_axis_tvalid
s_axis_tready
s_axis_tdata[15:0]
s_axis_tlast
s_axis_tdata[31:0]

Sources