FPGA · Medium · SystemVerilog

IPv4 Protocol Extractor

Capture the IPv4 protocol byte after an Ethernet IPv4 frame is identified.

Task

When EtherType is 0x0800 and the parser reaches byte position 20, capture data[23:16] as protocol.

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

IPv4, parser, field extraction

Open IPv4 Protocol Extractor in the HDLForge interactive editor.

Related problems

Explore the FPGA Design Practice & Interview Preparation hub.

Continue practising