Rename a vendor's report IDs everywhere, then turn one agent's protocol warnings into errors. The two catchers must meet in the right order.
Hardware context: Agents and scoreboards whose reports pass through report catchers. Expect each scoreboard's injected errors and fail on any other.
A vendor's VIP reports a link retrain as VND_7 and a lane error as VND_3. The project calls them PROTO and LANE, everywhere in the test, including in components built later. On agent_b and everything below it, a PROTO warning means a real failure, but the code only warns. agent_a's warnings are harmless and must stay warnings.
Write a catcher that renames the vendor IDs and one that makes those PROTO warnings errors, and install them. The vendor's VND_7 warnings on agent_b count as PROTO warnings too. Every report must still reach the log.
Full specification
// Renames the vendor's IDs to the project's. Every reporter in the test.
class translate extends uvm_report_catcher;
function new(string name = "translate"); super.new(name); endfunction
function action_e catch();
return THROW;
endfunction
endclass
// Makes PROTO warnings errors. agent_b and everything below it only.
class promote_proto extends uvm_report_catcher;
function new(string name = "promote_proto"); super.new(name); endfunction
function action_e catch();
return THROW;
endfunction
endclass
// Called once per pair of agents, after both agents and their drivers exist.
function automatic void install(uvm_component agent_a, uvm_component agent_b);
endfunction
| Report | What must happen |
|---|---|
| ID VND_7 or VND_3, from any reporter | ID becomes PROTO or LANE |
| A PROTO warning (also a renamed VND_7) from agent_b or below | Becomes an error |
| Anything else | Unchanged |
install is called in build_phase once for each pair of agents, after both agents and their drivers exist. Each agent has a child reporter, drv. The env builds a monitor after install has run. IDs must match exactly: PROTOCOL_INFO and PROTO_X are other IDs.
The bench's own catcher, added after yours, records each report's severity and ID. A report you drop shows as none. The bench also lists the catchers that reach agent_a and its driver, and counts any promote_proto among them.
Examples
Example 1
A Vendor Retrain from Each Agent and Each Driver- Input
agent_a warning VND_7; agent_b warning VND_7; agent_b.drv warning VND_7; agent_a.drv warning VND_7
- Output
report_0_severity = warning (1), report_0_id = PROTO (1), report_1_severity = error (2), report_1_id = PROTO (1), report_2_severity = error (2), report_2_id = PROTO (1), report_3_severity = warning (1), report_3_id = PROTO (1), report_4_severity = info (0), report_4_id = none (0), promote_catchers_on_agent_a = 0
Every VND_7 becomes PROTO. agent_a's and its driver's stay warnings; agent_b's and its driver's become errors. Unused report slots read info and none.
Example 2
PROTO and a Longer ID on agent_b- Input
agent_b warning PROTOCOL_INFO; agent_b warning PROTO; agent_b warning VND_3
- Output
report_0_severity = warning (1), report_0_id = other (5), report_1_severity = error (2), report_1_id = PROTO (1), report_2_severity = warning (1), report_2_id = LANE (2), report_3_severity = info (0), report_3_id = none (0), report_4_severity = info (0), report_4_id = none (0), promote_catchers_on_agent_a = 0
PROTOCOL_INFO is not PROTO and stays a warning (ID shown as other). VND_3 becomes LANE and stays a warning.
Example 3
The Monitor Built After Install- Input
mon warning VND_7; mon info VND_3; agent_b.drv info VND_7
- Output
report_0_severity = warning (1), report_0_id = PROTO (1), report_1_severity = info (0), report_1_id = LANE (2), report_2_severity = info (0), report_2_id = PROTO (1), report_3_severity = info (0), report_3_id = none (0), report_4_severity = info (0), report_4_id = none (0), promote_catchers_on_agent_a = 0
The monitor did not exist when install ran, but its VND_7 is renamed too. It is not under agent_b, so it stays a warning.
Constraints and Contract
- Keep the class names and install's signature.
- Return THROW for every report, so each one goes on to be printed.
Hints
Hint 1
Which add reaches every reporter, including ones that do not exist yet? Which reaches a component and everything below it?
Hint 2
A component's first instance add copies the typewide queue as it is at that moment. A typewide add made later goes to the end of every queue.
Hint 3
A name filter inside catch() does not keep the catcher off agent_a: the bench looks at the queues.
What the grader checks: Your catchers are installed on six real pairs of agents and a later monitor. They report a hidden mix of severities and IDs. The checks read the severity and ID each report has after your catchers, and which catchers sit on agent_a's queues.
6 checks on UVM · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain public samples only. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 3 problems on this path