FPGA · Medium · SystemVerilog

UDP Port Extractor

Extract source and destination ports from a simplified fixed-header IPv4/UDP packet.

Task

When protocol is 17 and byte_pos equals 34, capture source port from data[31:16] and destination port from data[15:0].

Examples

Constraints

What this problem is testing

FPGA problems test whether logically correct RTL will behave predictably in hardware, including clock-domain boundaries, reset release, noisy inputs, inferred resources, and timing.

Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.

Verification plan

Common mistakes

Interview follow-up questions

Concepts to review

UDP, parser, ports

Open UDP Port Extractor in the HDLForge interactive editor.

Related problems

Explore the FPGA Design Practice & Interview Preparation hub.

Continue practising