Uvm

From babyworm/rtl-agent-team · View interactive version

Uvm is an AI agent skill from the GitHub repository babyworm/rtl-agent-team. uvm project conventions (loaded by writer agents; do not invoke).

How to use this skill

Skill file

<Purpose>

UVM project conventions (naming + RTL boundary rules) for UVM testbench work.

Base: IEEE 1800.2-2020 UVM standard — standard UVM mechanics (factory registration, phasing,

TLM ports, config_db, sequences, objections) are assumed known and are not restated here.

</Purpose>

<Use_When>

</Use_When>

<Do_Not_Use_When>

</Do_Not_Use_When>

<Execution_Policy>

</Execution_Policy>

<Steps>

1. Naming Conventions

Class name = file name (one class per file). Protocol-level components use {proto}_, DUT-level

components use {module}_:

| Component | Class / File Pattern | Example |

|-----------|---------------------|---------|

| Agent / Driver / Monitor / Sequencer | {proto}_agent etc. | axi_agent, axi_driver, axi_monitor, axi_sequencer |

| Sequence Item | {proto}_seq_item | axi_seq_item |

| Sequence (base / specific) | {proto}_base_seq / {proto}_{name}_seq | axi_base_seq, axi_write_burst_seq |

| Scoreboard / Environment / Coverage | {module}_scoreboard / {module}_env / {module}_coverage | cabac_scoreboard, cabac_env |

| Test (base / specific) | {module}_base_test / {module}_{name}_test | cabac_base_test, cabac_smoke_test |

| Package | {module}_tb_pkg.sv | cabac_tb_pkg.sv |

| Top | tb_{module}_top.sv | tb_cabac_top.sv |

2. m_/u_ Prefix Boundary

matches the variable name: m_driver = axi_driver::type_id::create("m_driver", this);

3. RTL Port-Name Matching

TB interfaces/signals connect to DUT ports using the RTL names verbatim: i_/o_/io_ prefixes,

clk/{domain}_clk, rst_n/{domain}_rst_n (e.g., @(posedge vif.sys_clk)). Never invent

TB-side port aliases.

4. Anti-Patterns

| Anti-Pattern | Problem | Fix |

|-------------|---------|-----|

| Not registered with factory | Cannot override/reuse | Add uvm_*_utils to all classes |

| Objection in driver | Phase control confusion | Only raise/drop in test |

| Ignoring config_db get failure | Null pointer crash | Handle with uvm_fatal |

| Direct DUT access from sequence | Destroys reusability | Use sequencer→driver path only |

| Hard-coded hierarchy path | Destroys portability | Use config_db wildcard |

| #delay in run_phase | Destroys portability | Use @(posedge vif.sys_clk) |

</Steps>

<Tool_Usage>

This skill is not executed directly. It is referenced by agents that generate UVM environments

(e.g., testbench-dev). Agents should follow the conventions defined here.

</Tool_Usage>

<Examples>

Environment structure with factory/naming/config_db patterns: templates/uvm-env-template.sv.

Smoke test structure: examples/uvm-smoke-test-example.sv.

</Examples>

<Escalation_And_Stop_Conditions>

</Escalation_And_Stop_Conditions>

<Final_Checklist>

</Final_Checklist>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.