Verification Academy

Search form

My Account Menu

  • Register
  • Log In
  • Topics
  • Courses
  • Forums
  • Patterns Library
  • Cookbooks
  • Events
  • More
  • All Topics
    The Verification Academy offers users multiple entry points to find the information they need. One of these entry points is through Topic collections. These topics are industry standards that all design and verification engineers should recognize. While we continue to add new topics, users are encourage to further refine collection information to meet their specific interests.
    • Languages & Standards

      • Portable Test and Stimulus
      • Functional Safety
      • Design & Verification Languages
    • Methodologies

      • UVM - Universal Verification Methodology
      • UVM Framework
      • UVM Connect
      • FPGA Verification
      • Coverage
    • Techniques & Tools

      • Verification IP
      • Simulation-Based Techniques
      • Planning, Measurement, and Analysis
      • Formal-Based Techniques
      • Debug
      • Clock-Domain Crossing
      • Acceleration
  • All Courses
    The Verification Academy is organized into a collection of free online courses, focusing on various key aspects of advanced functional verification. Each course consists of multiple sessions—allowing the participant to pick and choose specific topics of interest, as well as revisit any specific topics for future reference. After completing a specific course, the participant should be armed with enough knowledge to then understand the necessary steps required for maturing their own organization’s skills and infrastructure on the specific topic of interest. The Verification Academy will provide you with a unique opportunity to develop an understanding of how to mature your organization’s processes so that you can then reap the benefits that advanced functional verification offers.
    • Universal Verification Methodology (UVM)

      • Advanced UVM
      • Basic UVM
      • Introduction to UVM
      • UVM Connect
      • UVM Debug
      • UVMF - One Bite at a Time
    • Featured Courses

      • Introduction to ISO 26262
      • Introduction to DO-254
      • Clock-Domain Crossing Verification
      • Portable Stimulus Basics
      • Power Aware CDC Verification
      • Power Aware Verification
      • SystemVerilog OOP for UVM Verification
    • Additional Courses

      • Assertion-Based Verification
      • An Introduction to Unit Testing with SVUnit
      • Evolving FPGA Verification Capabilities
      • Metrics in SoC Verification
      • SystemVerilog Testbench Acceleration
      • Testbench Co-Emulation: SystemC & TLM-2.0
      • Verification Planning and Management
      • VHDL-2008 Why It Matters
    • Formal-Based Techniques

      • Formal Assertion-Based Verification
      • Formal-Based Technology: Automatic Formal Solutions
      • Formal Coverage
      • Getting Started with Formal-Based Technology
      • Handling Inconclusive Assertions in Formal Verification
      • Sequential Logic Equivalence Checking
    • Analog/Mixed Signal

      • AMS Design Configuration Schemes
      • Improve AMS Verification Performance
      • Improve AMS Verification Quality
  • All Forum Topics
    The Verification Community is eager to answer your UVM, SystemVerilog and Coverage related questions. We encourage you to take an active role in the Forums by answering and commenting to any questions that you are able to.
    • UVM Forum

      • Active Questions
      • Solutions
      • Replies
      • No Replies
      • Search
      • UVM Forum
    • SystemVerilog Forum

      • Active Questions
      • Solutions
      • Replies
      • No Replies
      • Search
      • SystemVerilog Forum
    • Coverage Forum

      • Active Questions
      • Solutions
      • Replies
      • No Replies
      • Search
      • Coverage Forum
    • Additional Forums

      • Announcements
      • Downloads
      • OVM Forum
  • Patterns Library
    The Verification Academy Patterns Library contains a collection of solutions to many of today's verification problems. The patterns contained in the library span across the entire domain of verification (i.e., from specification to methodology to implementation—and across multiple verification engines such as formal, simulation, and emulation).
    • Implementation Patterns

      • Environment Patterns
      • Stimulus Patterns
      • Analysis Patterns
      • All Implementation Patterns
    • Specification Patterns

      • Occurrence Property Patterns
      • Order Property Patterns
      • All Specification Patterns
    • Pattern Resources

      • Start Here - Patterns Library Overview
      • Whitepaper - Taking Reuse to the Next Level
      • Verification Horizons - The Verification Academy Patterns Library
      • Contribute a Pattern to the Library
  • All Cookbooks
    Find all the methodology you need in this comprehensive and vast collection. The UVM and Coverage Cookbooks contain dozens of informative, executable articles covering all aspects of UVM and Coverage.
    • UVM Cookbook

      • UVM Basics
      • Testbench Architecture
      • DUT-Testbench Connections
      • Configuring a Test Environment
      • Analysis Components & Techniques
      • End Of Test Mechanisms
      • Sequences
      • The UVM Messaging System
      • Other Stimulus Techniques
      • Register Abstraction Layer
      • Testbench Acceleration through Co-Emulation
      • Debug of SV and UVM
      • UVM Connect - SV-SystemC interoperability
      • UVM Versions and Compatibility
      • UVM Cookbook
    • Coding Guidelines & Deployment

      • Code Examples
      • UVM Verification Component
      • Package/Organization
      • Questa/Compiling UVM
      • SystemVerilog Guidelines
      • SystemVerilog Performance Guidelines
      • UVM Guidelines
      • UVM Performance Guidelines
    • Coverage Cookbook

      • Introduction
      • What is Coverage?
      • Kinds of Coverage
      • Specification to Testplan
      • Testplan to Functional Coverage
      • Bus Protocol Coverage
      • Block Level Coverage
      • Datapath Coverage
      • SoC Coverage Example
      • Requirements Writing Guidelines
      • Coverage Cookbook
  • All Events
    No one argues that the challenges of verification are growing exponentially. What is needed to meet these challenges are tools, methodologies and processes that can help you transform your verification environment. These recorded seminars from Verification Academy trainers and users provide examples for adoption of new technologies and how to evolve your verification process.
    • Upcoming & Featured Events

      • Creating an Optimal Safety Architecture  - February 9th
      • The ABC of Formal Verification - February 11th
      • Events Calendar
    • On Demand Seminars

      • I'm Excited About Formal...
      • Visualizer Coverage
      • Formal-based ‘X’ Verification
      • 2020 Functional Verification Study
      • All On-Demand Seminars
    • Recording Archive

      • Improving Your SystemVerilog & UVM Skills
      • Should I Kill My Formal Run?
      • Visualizer Debug Environment
      • All Recordings
    • Mentor Training Center

      • SystemVerilog for Verification
      • SystemVerilog UVM
      • UVM Framework
      • Instructor-led Training
    • Mentor Learning Center

      • SystemVerilog Fundamentals
      • SystemVerilog UVM
      • Questa Simulation Coverage Acceleration Apps with inFact
      • View all Learning Paths
  • About Verification Academy
    The Verification Academy will provide you with a unique opportunity to develop an understanding of how to mature your organization's processes so that you can then reap the benefits that advanced functional verification offers.
    • Blog & News

      • Verification Horizons Blog
      • Academy News
      • Academy Newsletter
      • Technical Resources
    • Verification Horizons Publication

      • Verification Horizons - November 2020
      • Verification Horizons - July 2020
      • Verification Horizons - March 2020
      • Issue Archive
    • About Us

      • Verification Academy Overview
      • Subject Matter Experts
      • Contact Us
    • Training

      • Questa® & ModelSim®
      • Questa® inFact
      • Functional Verification Library
Ask a Question
UVM
  • Home /
  • Forums /
  • UVM /
  • one register map for multiple agents?

one register map for multiple agents?

UVM 5534
uvm_reg_map 9 register adapter 4 RAL 52
soloist_huaxin
soloist_huaxin
Full Access
6 posts
September 19, 2016 at 7:23 pm

so my design have a register layer that can be accessed from two different interfaces of the DUT. The address mapping is identical for both interfaces. Each interface has an agent for it, and the agent contains an adapter to translate register sequence item to/from bus sequence item.

The question is, how can I use the same regmap for multiple adapters? Since the address mapping is the same for both interfaces, adding an identical regmap into reg block sounds redundant and could be costly if the reg block gets big.

Replies

Log In to Reply
MayurKubavat
MayurKubavat
Full Access
223 posts
September 19, 2016 at 10:09 pm

In reply to soloist_huaxin:

I think it's not possible as you can have only one set of sequencer and adapter associated with a register map.

// CLASS: uvm_reg_map
// has below method to set sequencer and adapter associated with the map and 
// it must be called before starting any sequences based on uvm_reg_sequence.
virtual function void set_sequencer (
  uvm_sequencer_base sequencer,  
  uvm_reg_adapter adapter = null
)

Whereas, advantage of two identical register maps for both the interface is,
- When you make one side of agent passive, you can enable only register value
prediction through bus monitor on that interface.
- Scenarios such as 'Writing to same/different register from both interface at same time' can be created.
- As both interface might be having different protocols, its better to have separate register maps.

www.linkedin.com/in/mayurkubavat

kerulmodi
kerulmodi
Full Access
35 posts
December 04, 2016 at 3:01 am

In reply to soloist_huaxin:
Hi,
It can be done while using uvm_reg_frontdoor (user defined frontdoor) mechanism and using reg.set_frontdoor() function.

Here is code of uvm_reg_frontdoor:

//------------------------------------------------------------------------------
// Class: uvm_reg_frontdoor
//
// Facade class for register and memory frontdoor access.
//------------------------------------------------------------------------------
//
// User-defined frontdoor access sequence
//
// Base class for user-defined access to register and memory reads and writes
// through a physical interface.
//
// By default, different registers and memories are mapped to different
// addresses in the address space and are accessed via those exclusively
// through physical addresses.
//
// The frontdoor allows access using a non-linear and/or non-mapped mechanism.
// Users can extend this class to provide the physical access to these registers.
//
virtual class uvm_reg_frontdoor extends uvm_reg_sequence #(uvm_sequence #(uvm_sequence_item));
 
   // Variable: rw_info
   //
   // Holds information about the register being read or written
   //
   uvm_reg_item rw_info;
 
   // Variable: sequencer
   //
   // Sequencer executing the operation
   //
   uvm_sequencer_base sequencer;
 
   // Function: new
   //
   // Constructor, new object given optional ~name~.
   //
   function new(string name="");
      super.new(name);
   endfunction
 
   string fname;
   int lineno;
 
endclass: uvm_reg_frontdoor

Extend this class and make your own 2 frontdoor class

class my_fd_1 extends uvm_reg_frontdoor;
 
  function new (string name = "my_fd_1");
    super.new(name);
  endfunction : new
 
  `uvm_object_utils(my_fd_1)
 
endclass : my_fd_1

Same way to my_fd_2 and instantiate those in your environment , then assign respective sequencer and adapter to these frontdoors.

In ENV:

class env extends uvm_env;
 
  //-- variable declarations
  my_fd_1 fd1; // user defined frontdoor mechanism
  my_fd_2 fd2;
 
  // adapter
  my_adapter_1 adptr1;
  my_adapter_2 adptr2;
 
  // agent
  my_agent1  agent1;
  my_agent2  agent2;
 
  //---
  function void build_phase (uvm_phase phase);
    // agent and adapter creation
    fd1 = my_fd_1 :: type_id :: create("fd1",this);
    fd1 = my_fd_2 :: type_id :: create("fd2",this);
 
    // assign adapter to frontdoor
    fd1.adapter = adptr1;
    fd2.adapter = adptr2;
 
  endfunction : build_phase
 
  // connect phase
  function void connect_phase (uvm_phase phase);
    // assign respective seqrs
    fd1.sequencer = agent1.seqr;
    fd2.sequencer = agent2.seqr;
  endfunction : connect_phase
 
endclass : env

Now, How to initiate register read and write request by using frontdoor
If you want to generate physical request through agent1.seqr then use fd1 frontdoor mechanism by putting below code before write/read task of register in sequence.

 //sequence task of register write 
 task reg_write();
 // ----
 // set frontdoor for below write request
  reg.set_frontdoor( .ftdr(p_sequencer.env.fd1) // set frontdoor fd1
                     .map(reg_model.reg_map));  // your single register map
 
reg.write(//--);
 
endtask : reg_write

same way for read operation.

Let me know if have any confusion.

bhupesh.paliwal
bhupesh.paliwal
Full Access
21 posts
June 28, 2018 at 10:26 am

In reply to kerulmodi:

  reg.set_frontdoor( .ftdr(p_sequencer.env.fd1) // set frontdoor fd1
                     .map(reg_model.reg_map));  // your single register map

Seems I am missing something. How in sequence we are getting env handle ?
Usually env handle is available in tests only instead of sequence isn't it?

kerulmodi
kerulmodi
Full Access
35 posts
June 28, 2018 at 11:14 pm

In reply to bhupesh.paliwal:

Ya thats correct but you can use environment handle via p_sequencer handle.

//  Make sure your sequencer is having env handle.
p_sequencer.env

Regards,
Kerul Modi

© Mentor, a Siemens Business, All rights reserved www.mentor.com

Footer Menu

  • Sitemap
  • Terms & Conditions
  • Verification Horizons Blog
  • LinkedIn Group
SiteLock