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

      • Low Power Verification - 4/29
      • Fault Campaign for Mixed-Signal - 5/4
      • User2User - 5/26
      • Webinar Calendar
    • On-Demand Webinars

      • CDC+RDC Analysis
      • Basic Abstraction Techniques
      • Safety Analysis Techniques
      • QVIP Workflow and Debug for PCIe
      • Writing a Proxy-driven Testbench
      • Achieving High Defect Coverage
      • Visualizer Features
      • All On-Demand Webinars
    • Recording Archive

      • Siemens EDA 2021 Functional Verification Webinar Series
      • Improving Your SystemVerilog & UVM Skills
      • Should I Kill My Formal Run?
      • Visualizer Debug Environment
      • Industry Data & Surveys
      • All Recordings
    • Conferences

      • DVCon 2021
      • DVCon 2020
      • DAC 2019
      • All Conferences
    • Mentor Learning Center

      • SystemVerilog Fundamentals
      • SystemVerilog UVM
      • 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 - March 2021
      • Verification Horizons - November 2020
      • Verification Horizons - July 2020
      • Issue Archive
    • About Us

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

      • Questa Basic
      • Questa Advanced
      • Mastering Questa
Ask a Question
SystemVerilog
  • Home
  • Forums
  • SystemVerilog
  • In AXI3 VIP, getting assertion error as well default transaction type is being picked up with values zeroes being displayed.

In AXI3 VIP, getting assertion error as well default transaction type is being picked up with values zeroes being displayed.

SystemVerilog 5105
assertion errors 3 Failing testcases 1 no values displayed 1
saikanthan7798
saikanthan7798
Forum Access
12 posts
February 11, 2021 at 4:20 pm

In this code, whatever the testname being given, it is printing only WR's values and if testname is changed, no values are being generated.

PLease find the code below

https://www.edaplayground.com/x/Q8SR

The following data being shown below was from QuestaSim.

-->Giving Test name as WRITE and Read fields are being displayed with no values
Let's say testname=TEST_10_WR_TX"
o/P:
** Error: Assertion error.
# Time: 0 ns Scope: axi_header_svh_unit.gen.run File: gen.sv Line: 10
# ** Error: Assertion error.
********Printing read fields************
# read_id=0
# read_addr=00000000
# read_data='{}
# read_length=0
# read_size=0
# read_burst=00000000
# bfm::read_addr
# bfm::read_data
# ********Printing read fields************
--> GIving READ as test name
********Printing read fields************
# read_id=e
# read_addr=ed12865d
# read_data='{2582994940, 2846503663, 3186666722, 3981055222}
# read_length=3
# read_size=1
# read_burst=00000002
# bfm::read_addr
# bfm::read_data
Read testcase is getting correct values
----> Giving WR_RD as test name = TEST_10_RD_TX
** Error: Assertion error.
# Time: 0 ns Scope: axi_header_svh_unit.gen.run File: gen.sv Line: 24
# inside mon
# inside cov
# ********Printing read fields************
# read_id=0
# read_addr=00000000
# read_data='{}
# read_length=0
# read_size=0
# read_burst=00000000
# bfm::read_addr
# bfm::read_data

How to get rid of those assertion errors and get the testcases being passed.

Replies

Log In to Reply
cgales
cgales
Forum Moderator
1606 posts
February 12, 2021 at 4:00 am

In reply to saikanthan7798:

You should never use an assert statement with a call to randomize(). Instead, you should use the return code to determine if the call was successful:

case(cfg_axi::testname)
  "TEST_10_WR_TX":begin
    for(int i=0;i<9;i=i+1) begin
      tx=new();
      if (!(tx.randomize() with {tx.tx_type == WRITE;}))
        $display("Randomization failed!");
      else
        cfg_axi::gen2bfm.put(tx);
    end
  end

In this case, you would receive the error message that the call to randomize() failed.

You would then focus on the error message:
# axi_gen:: inside gen
# gen.sv(10): randomize() failed due to conflicts between the following constraints:
# gen.sv(10): (tx_type == WRITE);
# Where:
# tx_type = READ /* non-random */

In the axi_tx class, tx_type is not declared as 'rand', hence it can't be randomized.

saikanthan7798
saikanthan7798
Forum Access
12 posts
February 12, 2021 at 9:07 am

In reply to cgales:

Hi cgales,

THank you for responding. It is working now. But TEST_WR_RD_2000_TX" is not getting the desired outcome. WHy is it so??

Where can I get clarity and in-depth knowledge about SVA?

regardsm,
Krishna.

cgales
cgales
Forum Moderator
1606 posts
February 12, 2021 at 9:27 am

In reply to saikanthan7798:

You will need to update your environment on EDA Playground so we can see the issues you are facing.

Regarding assertions, there are a lot of resources available on the Internet.

Solution

Solution

saikanthan7798
saikanthan7798
Forum Access
12 posts
February 16, 2021 at 5:44 pm

Hi,

Even though I have declared pif, it is showing as undefined variable. Not sure what's the issue.
//declaring clk & reset
reg clk,rst;
//logic to get user input
initial begin
$value$plusargs("testname=%s",cfg_axi::testname);
cfg_axi::vif=pif;
end

//instantiate interface
intf pif(clk,rst);
//testbench instantiate
tb tb();

Error

** Error: ** while parsing file included at axi_header.svh(11)
# ** at top.sv(56): (vlog-2730) Undefined variable: 'pif'.
# End time: 07:03:48 on Feb 17,2021, Elapsed time: 0:00:00
# Errors: 1, Warnings: 0
# ** Error: /home/tools/mentor/questasim/linux/vlog failed.
# Error in macro ./run.do line 1
# /home/tools/mentor/questasim/linux/vlog failed.
# while executing
# "vlog axi_header.svh"

cgales
cgales
Forum Moderator
1606 posts
February 17, 2021 at 3:28 am

In reply to saikanthan7798:

At the time you are referencing 'pif', it hasn't been declared. You should move your initial block to the end of your top module, after all of your module/interface instantiations.

saikanthan7798
saikanthan7798
Forum Access
12 posts
February 19, 2021 at 9:27 pm

In reply to cgales:

Hi cgales,

I couldn't see any transaction being performed in the following code. Please advise if there're any changes.

https://www.edaplayground.com/x/Q8SR

thanks,
Krishna

cgales
cgales
Forum Moderator
1606 posts
February 20, 2021 at 5:10 am

In reply to saikanthan7798:

You have a race condition where you are starting your test prior to setting the testname, hence the generator is creating nothing.

You should be sequencing getting/setting the test name and creating/running your environment at the top level. Don't use an intermediate tb to start the environment.

saikanthan7798
saikanthan7798
Forum Access
12 posts
February 21, 2021 at 8:24 pm

In reply to cgales:

After seqencing at the top level, I could see 10 read transactions being generated but only 2 write transactions .

https://www.edaplayground.com/x/Q8SR

cgales
cgales
Forum Moderator
1606 posts
February 22, 2021 at 4:23 am

In reply to saikanthan7798:

The link that you posted doesn't do anything similar to your question. If you want assistance, you need to ensure that you are posting correct information.

Siemens Digital Industries Software

Siemens Digital Industries Software

##TodayMeetsTomorrow

Solutions

  • Cloud
  • Mendix
  • Siemens EDA
  • MindSphere
  • Siemens PLM
  • View all portfolio

Explore

  • Digital Journeys
  • Community
  • Blog
  • Online Store

Siemens

  • About Us
  • Careers
  • Events
  • News and Press
  • Newsletter
  • Customer Stories

Contact Us

USA:

phone-office +1 800 547 3000

See our Worldwide Directory

  • Contact Us
  • Support Center
  • Give us Feedback
©2021 Siemens Digital Industries Software. All Rights Reserved.
Terms of Use Privacy Cookie Policy