Hardware interview practice
Sequence local variables
What does local variable t accomplish, and what does this sequence still not guarantee?
Starting point
Question code
typedef logic [7:0] tag_t;
tag_t req_tag, rsp_tag;
sequence tagged_response;
tag_t t;
(req, t = req_tag) ##[1:3] (ack && rsp_tag == t);
endsequenceChoose one
Answer choices
- A. It forces the design signal tag to stay constant globally
- B. It captures req_tag per attempt and checks for an ack with the same-width rsp_tag 1 to 3 clocks later, but alone does not enforce one-to-one matching when tags are reused
- C. It delays assignment to tag until ack
- D. It is shared by all assertion instances and therefore permits only one outstanding request
