DescriptionQ1109
Q1109DVASIC interview problem
Score legal packet drops without hiding errors
TechniquesPythonScoreboardPacket dropsStatistics
DifficultyHard
TopicReference Models
LanguagePython
Requirements4 checkpoints
01
Problem
Implement a scoreboard for a design allowed to drop 7 through 13 packets in each completed 100-packet outcome window. Duplicate, replayed, invented, and missing-undecided packets remain illegal.
Example input and output
Use this case to check your interpretationInput
input IDs 0..99; explicit drops={2,15,28,41,54,67,80,93}; deliver every other ID; then try output ID 101Output
100-outcome window PASS with 8 legal drops; output 101 is rejected as inventedExplanation
Eight drops lie inside the allowed 7..13 range, every input gets one explicit outcome, and the next invented delivery cannot be hidden by drop tolerance.
02
Requirements (4)
- Record every unique input ID as pending before accepting a delivery or drop outcome.
- Require a separate deadline or policy layer to declare a packet dropped; absence at the output is not immediately a drop.
- Reject output IDs that were never input and IDs already completed by delivery or drop.
- Check the drop count only after 100 explicit outcomes, then begin a fresh window.
