FPGA · Easy · SystemVerilog

Packet Statistics Counters

Maintain simple line-rate counters for total IPv4 packets and UDP packets.

Task

Increment ipv4_count on ipv4_packet and udp_count on udp_packet. Clear both on reset.

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

packet parser, statistics, counters

Open Packet Statistics Counters in the HDLForge interactive editor.

Related problems

Explore the FPGA Design Practice & Interview Preparation hub.

Continue practising