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)

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

      • Portable Stimulus Basics
      • Introduction to DO-254
      • SystemVerilog OOP for UVM Verification
      • Power Aware Verification
      • Power Aware CDC Verification
      • Assertion-Based Verification
      • Metrics in SoC Verification
    • Additional Courses

      • Clock-Domain Crossing Verification
      • An Introduction to Unit Testing with SVUnit
      • Evolving FPGA Verification Capabilities
      • 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 Coverage
      • Formal-Based Technology: Automatic Formal Solutions
      • 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 Horizon - 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

      • DVClub- Austin, TX | 12/11
      • Events Calendar
    • On Demand Seminars

      • UVM 1800.2 & Updated UVM Cookbook
      • Debug
      • FPGA Verification
      • All On-Demand Seminars
    • Recording Archive

      • DAC 2019 Session Recordings
      • User2User Silicon Valley 2019
      • Portable Stimulus from IP to SoC
      • Wilson Research Group - 2018 Results
      • All Recordings
    • Mentor Training Center

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

      • SystemVerilog Advanced OOP
      • UVM Transactions and Sequences
      • UVM Monitors and Agents
      • Functional Verification Library
  • 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
      • Technical Resources
    • Verification Horizons Publication

      • Verification Horizons - December 2019
      • Verification Horizons - June 2019
      • Verification Horizons - February 2019
      • Issue Archive
    • About Us

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

      • Questa® & ModelSim®
      • SystemVerilog
      • Functional Verification Library
Ask a Question
UVM
  • Home /
  • Forums /
  • UVM /
  • uvm reg read from uvm-monitor

uvm reg read from uvm-monitor

UVM 4885
dayalan.natarajan
dayalan.natarajan
Full Access
4 posts
September 20, 2016 at 5:36 pm

I am trying to read a UVM Register from run_phase of UVM_Monitor and getting the following error

Error-[IOUCM] Illegal use of class method

dmtcomplex_uvc_pkg, "uvm_pkg::\uvm_reg::read (this.m_dmtcomplex_uvc.m_dmt_reg_block.dmt.dmtint, \this .status, this.intr_occurred, /* path = UVM_DEFAULT_PATH */, /* map = null */, /* parent = null */, /* prior = (-1) */, /* extension = null */, /* fname = "\000" */, /* lineno = 0 */);"
Class methods can't be used in the current context.
Please check LRM for class method usage.

Please let me know if I can call UVM register read or write method from uvm_monitor

Replies

Log In to Reply
dhserfer
dhserfer
Full Access
58 posts
September 20, 2016 at 11:00 pm

In reply to dayalan.natarajan:

you can call register reads and writes from any component. You have to set up the reg model correctly and pass the handle to the component. My guess is the register model is not fully set up correctly (either you don't have a handle to the reg model or there is an incorrect setting with respect to the predictor, adapter, sequencer, etc... ). In my opinion, the Monitor is an odd place to perform a front door write.

hmehta
hmehta
Full Access
4 posts
September 21, 2016 at 4:50 am

In reply to dhserfer:

I guess you are right,looks like reg mode is not setup properly and Yes,correct,It's very odd to do front door write in monitor.

xdwzh
xdwzh
Full Access
2 posts
May 30, 2019 at 6:50 pm

In reply to dayalan.natarajan:

have you solved that? I meet the same problem. I am wondering that is it legal to call register in component

chr_sue
chr_sue
Full Access
2524 posts
June 01, 2019 at 12:39 am

In reply to dayalan.natarajan:

Quote:
I am trying to read a UVM Register from run_phase of UVM_Monitor and getting the following error

Error-[IOUCM] Illegal use of class method

dmtcomplex_uvc_pkg, "uvm_pkg::\uvm_reg::read (this.m_dmtcomplex_uvc.m_dmt_reg_block.dmt.dmtint, \this .status, this.intr_occurred, /* path = UVM_DEFAULT_PATH */, /* map = null */, /* parent = null */, /* prior = (-1) */, /* extension = null */, /* fname = "\000" */, /* lineno = 0 */);"
Class methods can't be used in the current context.
Please check LRM for class method usage.

Please let me know if I can call UVM register read or write method from uvm_monitor


The monitor is by intention a passive component, i.e. no activity will be started from this component. This includes also register calls. If you setup your UVM environment correctly you can initiate any register activity through the sequencer/driver. And you can provide any register related data for further processing from the driver.
dhserfer
dhserfer
Full Access
58 posts
June 03, 2019 at 10:25 pm

In reply to xdwzh:

It is possible to call register model methods from components if the component has the reg model handle and the register model is set up correctly.

xdwzh
xdwzh
Full Access
2 posts
June 04, 2019 at 2:28 am

In reply to dhserfer:

You are right. I did find a mistake in my testbench. Thank you!

zhehuixu_intel
zhehuixu_intel
Full Access
6 posts
November 18, 2019 at 4:22 pm

May I ask what is the solution for the TB issue? I am working on a similar case, which is trying to call read_reg inside a BFM which is a uvm_component. But getting same error.

chr_sue
chr_sue
Full Access
2524 posts
November 19, 2019 at 12:23 am

In reply to zhehuixu_intel:

I believe you have an architectural problem. Why are you doing simplke things complicated?.
read_reg should be executed always from a sequence and not from a BFM/driver.

zhehuixu_intel
zhehuixu_intel
Full Access
6 posts
November 19, 2019 at 9:38 am

In reply to chr_sue:
The component is more like a controller/host. Which needs to have some knowledge of the registers.
I was trying do to something like this. m_reg_seq.read_reg(register). It is when the compile error pop out. Even encapsulate the read_reg inside the sequence. I won't be able to get the register value out of the sequence.

chr_sue
chr_sue
Full Access
2524 posts
November 19, 2019 at 10:36 am

In reply to zhehuixu_intel:

A monitor is a bad place to perform a read. The monitor is a passive component, having only inputs and never initiate something. It is more easy to have a read in the driver or in some other place like a scoreboard.
How do you deal with the register model? Please show some code.

zhehuixu_intel
zhehuixu_intel
Full Access
6 posts
November 19, 2019 at 10:48 am

In reply to chr_sue:

The read_reg was implemented inside the driver/BFM. Not inside the monitor.
Register model wasn't set up by me. But the base register access sequence has instantiated inside the base register sequence.
My question would be what RAL issue might be causing this compilation error.

chr_sue
chr_sue
Full Access
2524 posts
November 19, 2019 at 10:54 am

In reply to zhehuixu_intel:

The question is what is 'read_reg'. The access to a register follows this structure:

reg_model_name.reg_map.reg
You should show the piece of monitor code which contains the register access and the accurate compile error.

zhehuixu_intel
zhehuixu_intel
Full Access
6 posts
November 19, 2019 at 11:11 am

In reply to chr_sue:

Here is the code I am trying to use:
rm_base_req = rm_base_seq::type_id::create("rm_base_req"); rm_base_req.read_reg(reg,status,val);
rm_base_seq is extended from uvm_reg_sequence. And this read_reg is the API Provided by the uvm_reg_sequence

read_reg
virtual task read_reg( input uvm_reg rg,
output uvm_status_e status,
output uvm_reg_data_t value,
input uvm_path_e path = UVM_DEFAULT_PATH,
input uvm_reg_map map = null,
input int prior = -1,
input uvm_object extension = null,
input string fname = "",
input int lineno = 0 )
Reads the given register rg using uvm_reg::read, supplying ‘this’ as the parent argument.

chr_sue
chr_sue
Full Access
2524 posts
November 19, 2019 at 1:01 pm

In reply to zhehuixu_intel:

What are your actual parameters you are using when calling read_reg?

zhehuixu_intel
zhehuixu_intel
Full Access
6 posts
November 19, 2019 at 1:28 pm

In reply to chr_sue:

rm_base_req.read_reg(reg,status,val);
reg: the register inside the reg_model. absolute path to the register inside the reg_model
status:uvm_reg_status
val:32bits wide logic

chr_sue
chr_sue
Full Access
2524 posts
November 19, 2019 at 1:58 pm

In reply to zhehuixu_intel:

reg should be something like this: model.regA.
BTW there is no absolute path to the register model becaus ethe reg_model does not belong to the testbench hierarchy.

zhehuixu_intel
zhehuixu_intel
Full Access
6 posts
November 19, 2019 at 2:05 pm

In reply to chr_sue:

I am positive the parameter was passed to the function correctly. Since it has been used at inside sequence.

Just need to some light on how can I use the function inside the uvm_component

chr_sue
chr_sue
Full Access
2524 posts
November 19, 2019 at 11:49 pm

In reply to zhehuixu_intel:

Dou you really pass the reg_model object to the sequence?
You did not show the compile error message so far.

dhserfer
dhserfer
Full Access
58 posts
November 21, 2019 at 2:05 pm

In reply to zhehuixu_intel:

I'm having difficulty understanding your English, so in general, it's best to post your code. I have done something similar to what you are trying, but I didn't use a sequence. I just passed the reg_model handle into the component and used 'peek' (a backdoor read the registers). I don't know if the method I used is 'standard' methodology or not. If you are only doing reads, here is another posting that discusses this:

read the last reply here

chr_sue
chr_sue
Full Access
2524 posts
November 23, 2019 at 1:31 am

In reply to dhserfer:

You can have a reg_model handle in any object including uvm_compnents. A typical example for this approach is a scoreboard which compares values depending on a register content. In this scenario you do not need to perform a backdoor por frontdoor access. Simply perform a get on the register to get the actual content of that register.

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

Footer Menu

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