How valerii-dzhafarov/uvm_templates works
Project type and purpose
• This is a UVM verification‐environment *template library*.
• It provides two template modules:
– comp1_env1_env/ : a UVM Environment template
– comp1_agent1_agent/ : a UVM Agent template
• There’s also a DUT model under dut/ (stack.sv) and an instantiation script instant.py to copy & rename templates.
File structure
• Top level:
– comp1_env1_env/ (environment packages, TB, wrapper, tests, config files)
– comp1_agent1_agent/ (agent interface, package, include files for driver, monitor, sequencer, sequences, coverage, checker)
– dut/ (stack.sv)
– instant.py (template instantiation tool)
• comp1_env1_env/include/seq & /test holds base sequences/tests.
• comp1_agent1_agent/include/seq holds base agent sequences.
• Scripts/config.mk in each template folder drive compile/build options.
README for additional insights
• instant.py: automates copying the chosen template (env or agent), renames folders/files, and replaces placeholder text.
• The README lists compile & runtime options for QuestaSim, Synopsys, Cadence—indicating how the testbench is driven.
Main components & their relationships
– Reads user options (mode=env/agent, company, name, target_dir)
– Produces an instantiated template directory.
– Instantiates:
• comp1_env1_wrapper (orange)
• stack.sv (DUT)
– Binds interfaces for DUT and agent.
– Contains: agents (comp1_agent1_agent)
– Configures settings (env1_cfg)
– Hosts scoreboard or coverage collector (if added)
– Sub-components in include/:
• Driver (agent1_driver.svh) → drives DUT via the interface
• Sequencer (agent1_sequencer.svh) → issues sequence items (agent1_item.svh)
• Monitor (agent1_monitor.svh) → samples DUT signals back to analysis ports
• Checker (agent1_checker.svh) → optional functional checking
• Coverage collector (agent1_cov_collector.svh)
– Custom sequences in include/seq (agent1_base_seq.svh)
– Simple stack model used to test templates.
Architectural patterns & design principles
• UVM Factory for component creation
• Transaction‐based verification: sequences → sequencer → driver → DUT → monitor → analysis ports → scoreboard/checker
• Layered hierarchy: top → env → agent → driver/monitor/sequencer
• Reusable & parameterized packages for config and utilities.
Essential elements to capture
• instant.py → template copy/rename process
• comp1_env1_tb (top) → comp1_env1_wrapper → comp1_env1_env → comp1_agent1_agent → driver/monitor/sequencer
• Interfaces between agent and DUT
• /config files and sequence/test packages
• UVM factory & hierarchal “uvm_component_utils” registrations
– How the instantiation script ties into the template library
– The hierarchy and relationships within the UVM testbench
– Data/transaction flows between sequencer, driver, DUT, and monitor/checker
– The points where configuration and template pragmas are applied
– Where each file from the project file tree fits into the overall architecture.