Verification #21 · 2026-10-14 · Static members · Easy · about 10 min
Every packet is packet number 0
A scoreboard matches packets by id, so every packet needs a number of its own:
- The first packet created in the simulation gets
id0, the next 1, then 2, and so on, wherever in the testbench it's created. - A
ctrl_packet, or any other class derived frompacket, is numbered in the same series. - A packet keeps its
idfor as long as it exists.
Run creates five packets and prints them. Fix packet.sv.
Write and run your answer in the browser. The hidden tests check it, and it’s free.