Hardware interview practice
Schedule configurable slave responses
Build the policy core of a reactive responder that queues observed requests and emits responses with configurable latency, error injection, and global, per-ID, or out-of-order scheduling.
Reviewed example
Work through one case
Input
request A arrives first due at cycle5; request B arrives second due at cycle3; schedule at cycle3Expected output
global mode selects none; per-ID or out-of-order mode may select B with B's matching response IDGlobal policy cannot bypass its not-yet-due oldest request, while the other policies may choose a due head without moving drive semantics into the monitor.
What to cover
Requirements
- Keep the request monitor passive and place response decisions in a replaceable policy object.
- Global mode may select only the oldest request; per-ID mode may select only the head request for each ID.
- Out-of-order mode may choose any due request while preserving response ID matching.
- Drive the chosen response with stable ready/valid semantics in a separate responder driver.
