Block Preview

Introduction

The UDP Streamer block provides a high-speed 10 Gigabit Ethernet streaming interface. User data written to the internal FIFO is automatically packetized into UDP packets and transmitted over the network at 10G line rate.

This block is ideal for applications requiring continuous high-bandwidth data transfer to a host PC or network storage system.

Key Features:

  • 10 Gigabit Ethernet (10GBASE-SR/LR via SFP+)
  • Automatic UDP packet generation
  • 4096-word internal FIFO buffer
  • Configurable network parameters

Pin Description

wr_en Input 1 bit BIT

Write enable for the FIFO. Assert HIGH for one clock cycle to write wr_data into the FIFO.

Only write when full is LOW to avoid data loss.

wr_data Input 64 bit BIT VECTOR
64-bit data input to the FIFO. Data is captured on the rising edge of the clock when wr_en is HIGH.
pkt_seq_rst Input 1 bit BIT
full Output 1 bit BIT
FIFO full flag. HIGH when the FIFO is completely full. Do not write data when this signal is HIGH.
prog_full Output 1 bit BIT

FIFO programmable full flag. Asserts HIGH when the FIFO has fewer than 184 free slots (not enough space for a full UDP packet).

Use this for flow control to prevent overflow.

wr_count Output 16 bit BIT VECTOR

FIFO word count (16 bits). Indicates the number of 64-bit words currently stored in the FIFO.

Use this to calculate available space: Available = 4096 - wr_count

This helps determine if a complete data block will fit before writing.

link_up Output 1 bit BIT

Ethernet link status. HIGH when the 10G Ethernet link is established and ready for transmission.

Wait for this signal before starting data transfer.

streaming_active Output 1 bit BIT
Transmission active indicator. HIGH while the module is actively transmitting UDP packet data.
pkt_count Output 32 bit BIT VECTOR

Packet counter (32 bits). Counts the total number of UDP packets transmitted since reset. Wraps around at 2^32.

Useful for debugging and monitoring throughput.

LOCAL_MAC Input 48 bit

Local MAC address (48 bits). Only present when Local MAC Mode is set to “Configurable”.

Format: 48-bit vector, e.g., x"020000000001" for 02:00:00:00:00:01

LOCAL_IP Input 32 bit

Local IP address (32 bits). Only present when IP Parameters Mode is set to “Configurable”.

Format: 32-bit vector, e.g., x"C0A80180" for 192.168.1.128

DEST_IP Input 32 bit

Destination IP address (32 bits). Only present when IP Parameters Mode is set to “Configurable”.

This is the IP address of the receiving host (PC).

GATEWAY_IP Input 32 bit

Gateway IP address (32 bits). Only present when IP Parameters Mode is set to “Configurable”.

Used for routing packets outside the local subnet.

SUBNET_MASK Input 32 bit

Subnet mask (32 bits). Only present when IP Parameters Mode is set to “Configurable”.

Format: e.g., x"FFFFFF00" for 255.255.255.0

SRC_PORT Input 16 bit
Source UDP port (16 bits). Only present when IP Parameters Mode is set to “Configurable”.
DST_PORT Input 16 bit
Destination UDP port (16 bits). Only present when IP Parameters Mode is set to “Configurable”.

Properties

Property window

Local MAC Mode LocalMAC_Mode

Set if Local MAC is fixed or configurable via input pin

Default: Fixed

Options: Fixed Configurable

Local MAC Address LocalMAC

Local MAC address (hex format, e.g. 020000000001)

Default: 020000000001

IP Parameters Mode IP_Mode

Set if all IP parameters (Local IP, Dest IP, Gateway, Subnet, Ports) are fixed or configurable via input pins

Default: Fixed

Options: Fixed Configurable

Local IP Address LocalIP

Local IP address (e.g. 192.168.1.128)

Default: 192.168.1.128

Destination IP Address DestIP

Destination IP address (e.g. 192.168.1.129)

Default: 192.168.1.129

Gateway IP Address GatewayIP

Gateway IP address (e.g. 192.168.1.1)

Default: 192.168.1.1

Subnet Mask SubnetMask

Subnet mask (e.g. 255.255.255.0)

Default: 255.255.255.0

Source Port SrcPort

Source UDP port (e.g. 1234)

Default: 1234

Range: 1 – 65535

Destination Port DstPort

Destination UDP port (e.g. 1234)

Default: 1234

Range: 1 – 65535

Local MAC Mode Local MAC Mode

Selects how the local MAC address is configured.

  • Fixed: MAC address is set via the “Local MAC Address” property. No input pin is generated.
  • Configurable: MAC address is provided via the LOCAL_MAC input pin at runtime.

Default: Fixed

Local MAC Address Local MAC Address

Local MAC address in hexadecimal format (12 hex digits, no separators). Only used when “Local MAC Mode” is set to “Fixed”.

Example: 020000000001 for MAC 02:00:00:00:00:01

Default: 020000000001

IP Parameters Mode IP Parameters Mode

Selects how all IP-related parameters are configured.

  • Fixed: All parameters are set via properties. No input pins are generated.
  • Configurable: All IP parameters are provided via input pins (LOCAL_IP, DEST_IP, GATEWAY_IP, SUBNET_MASK, SRC_PORT, DST_PORT).

Default: Fixed

Local IP Address Local IP Address

Local IP address in dotted decimal format. Only used when “IP Parameters Mode” is set to “Fixed”.

Example: 192.168.1.128

Default: 192.168.1.128

Destination IP Address Destination IP Address

Destination IP address (receiving host) in dotted decimal format. Only used when “IP Parameters Mode” is set to “Fixed”.

Example: 192.168.1.129

Default: 192.168.1.129

Gateway IP Address Gateway IP Address

Gateway IP address in dotted decimal format. Only used when “IP Parameters Mode” is set to “Fixed”.

Example: 192.168.1.1

Default: 192.168.1.1

Subnet Mask Subnet Mask

Subnet mask in dotted decimal format. Only used when “IP Parameters Mode” is set to “Fixed”.

Example: 255.255.255.0

Default: 255.255.255.0

Source Port Source Port

Source UDP port number (1-65535). Only used when “IP Parameters Mode” is set to “Fixed”.

Default: 1234

Destination Port Destination Port

Destination UDP port number (1-65535). Only used when “IP Parameters Mode” is set to “Fixed”.

Default: 1234

Usage

How It Works

The UDP Streamer operates as an asynchronous data streaming system:

  1. User logic writes 64-bit data words to the internal FIFO via wr_en and wr_data
  2. The module automatically packetizes data and sends UDP packets
  3. Status outputs provide feedback on FIFO state and link status
  ┌──────────────────────────────────────────────────────────────────┐
│                    UDP Streamer Data Flow                        │
│                                                                  │
│   wr_data ────────►┌──────────────┐     ┌─────────────┐          │
│   (64-bit)         │    FIFO      │────►│   UDP/IP    │────► SFP+│
│   wr_en  ─────────►│  4096 words  │     │   Stack     │          │
│                    └──────────────┘     └─────────────┘          │
│                           │                                      │
│                           ▼                                      │
│                    ┌──────────────┐                              │
│   full ◄───────────│   Status     │                              │
│   prog_full ◄──────│   Outputs    │                              │
│   wr_count ◄───────│              │                              │
│                    └──────────────┘                              │
└──────────────────────────────────────────────────────────────────┘
  

FIFO Buffer

The internal FIFO has a depth of 4096 words (64 bits each = 32 KB).

The wr_count output indicates how many words are currently stored in the FIFO. Use this to calculate available space before writing a burst of data:

  Available space = 4096 - wr_count
  

Important: Before writing a large block of data, check that there is enough space in the FIFO to avoid overflow.


Automatic Packet Transmission

Packets are sent automatically under two conditions:

Condition Trigger Packet Size
Full packet FIFO contains ≥ 184 words 184 words = 1472 bytes (MTU-optimal)
Timeout 10 ms elapsed with data in FIFO Variable (flushes all pending data)

This design maximizes throughput by:

  • Sending full MTU packets (1472 bytes payload) when possible
  • Automatically flushing partial data after 10 ms to ensure low latency for sparse data

UDP Payload Structure:

  • Each packet contains up to 184 × 64-bit words = 1472 bytes
  • This fits within the standard Ethernet MTU of 1500 bytes (1472 + 20 IP + 8 UDP = 1500)

Network Configuration

Network parameters can be configured in two modes:

Mode Description
Fixed Parameters are set at compile time via properties. No input pins are generated.
Configurable Parameters are provided via input pins at runtime. Useful for dynamic configuration.

MAC Address has a separate mode selector and can be configured independently.

IP Parameters (Local IP, Destination IP, Gateway, Subnet Mask, Ports) share a common mode selector. When set to “Configurable”, all IP-related pins are exposed.


Clock Domains

The module operates across two clock domains:

Clock Frequency Usage
User Clock Any (FIFO write side) Your design clock for writing data
Core Clock 156.25 MHz Internal 10G Ethernet processing

The internal FIFO handles clock domain crossing automatically. Status outputs (link_up, streaming_active, pkt_count) are synchronized to the 125 MHz system clock domain.


Typical Usage

vhdl
  -- Example: Stream ADC data via UDP
process(clk)
begin
    if rising_edge(clk) then
        if adc_valid = '1' and udp_prog_full = '0' then
            udp_wr_en   <= "1";
            udp_wr_data <= adc_data;
        else
            udp_wr_en <= "0";
        end if;
    end if;
end process;
  

Flow Control Tips:

  • Monitor prog_full to prevent overflow
  • Use wr_count to verify space before large bursts
  • Check link_up before starting data transfer

Resources & Timing

  • Latency: Variable, depends on FIFO fill level and timeout

  • Throughput: 10 Gbps line rate (effective ~9.5 Gbps with protocol overhead)

  • FIFO depth: 4096 × 64-bit words (32 KB)
  • Maximum UDP payload: 1472 bytes (184 × 64-bit words)
  • Automatic packet flush timeout: 10 ms
  • Requires SFP+ transceiver for 10GBASE-SR/LR
  • No software readout (data goes directly to network)
  • ARP responses are handled automatically