SlideShare a Scribd company logo
Using PSL and FoCs for Functional Coverage
               Verification

                             September 2006

                             Chuck Alley
Introduction
The Waternoose VSU team inherited a coverage strategy, and bugspray code, from
a previous project. This bugspray code may have provided a useful report card but
was not an adequate for functional coverage:

●The designer developed Bugspray code was almost entirely structural or code
coverage

●   Did not focus on areas of maximum complexity or areas of the logic prone to bugs

The designer driven Bugspray coverage points were not documented in any test
●

plan or workbook

The VHDL of the Bugspray was hard to maintain as the design diverged from the
●

antecedent design
Our Method
●   We were unhappy with this method so we made the following changes to fully
    implement functional coverage

●   The verification team took over the coverage plan

     –   This included maintenance of the old bugspray and development of new
         coverage points
●   We adopted PSL as the coverage language

●   We translated the PSL code into VHDL bugspray code with FoCs

●   We documented the coverage points in the test plan, and reviewed them as part
    of our verification of the unit
Core Verification Concerns
Several concerns came to my attention from the Austin core verification team, as we
revealed this plan to them.


●Generated VHDL is bloated and inefficient and would seriously degrade the
simulation speed at the core and chip levels


Generated VHDL is hard to read and debug inhibiting anyone else from debugging
●

problems that may come up or be revealed by our code


●Only designers know enough about the logic to write effective monitors, so how are
you going to get your information and how will you maintain the bugspray
Bugspray Organization
The Waternoose project leadership had organized the bugspray into the following
priority scheme:

     P1    Required for Unit Gold criteria
     P2    Required for Unit RIT criteria
     P3    Required for Core Gold criteria
     P4    Required for Core RIT criteria
     ...

Unit P1 and P2 monitors were instantiated in the local shell files and not passed up
to the core team. The P3 and P4 monitors were in unit_top to be passed to the core.
Bugspray File Organization
For instance, the file fw_p3_vmx_load_forwarding_bugspray.vhdl needs to be
included and covered at the core level. However, the file
fw_p2_vector_float_bugspray.vhdl needs only to be run and covered in a unit
simulation environment, and will not be promoted to the core level for simulation.
Other features:


●Proper grouping of coverage events allows verification engineers to turn off
coverage checking when coverage levels are achieved


●All coverage events were included in the unit simulation environment. This was
because we wanted to develop def files capable of achieving all coverage points to
save time and effort at higher levels of simulation.
Identifying Coverage Events
●   Meetings are required with the design team to help identify coverage points.


●   We went from there to the available project documentation (specs and
    workbooks) to find the specific details that we needed to code the monitors.


●   We covered IO cases, areas of complexity, areas very likely to cause problems,
    complex control scenarios that were handled by multiple units/designers
Writing Monitors
A simple example:

●   We are interested in monitoring for several interesting forwarding scenarios. We
    determine that the criteria are as follows:

Monitor that data is forwarded to a valid instruction from every possible source.
  Make sure that the instruction that uses this data is not canceled in rf1, so that
  the data is checked when it writes back to the VRF by IBI.



For this problem the PSL code would look like this:
cover {[*]; i1_vq10_vsu_instr_v; i1_vq11_vmx_b_mux_cntl(0..5) =
   %{bypass_source}; true[*2]; i1_rf1_cancel=0};
Writing Monitors
●   There are however, many sources from which the forwarding can occur So this
    code can be very quickly extended:


vunit vector_bypass_i1Bmux{

%for bypass_source in { i0_by1, i0_by2, i0_vwb, i0_wb2, i0_wb3, i1_by1, i1_by2,
   i1_vwb, i1_wb2, i1_wb3, load_ex2, load_ex3, VRF } do

     assert "--!!count -t nclk -cn bypass_mux_monitors_p3 -vn
    i1_Bmux_%{bypass_source};"

     cover {[*]; i1_vq10_vsu_instr_v; i1_vq11_vmx_b_mux_cntl(0..5) =
    %{bypass_source}; true[*2]; i1_rf1_cancel=0};

%end

}
Converting to VHDL with FoCs
●   Neglecting the for loop, FoCs shows one of the monitors as:

Assertion 1 of vunit vector_bypass_i1bmux:
--!!count -t nclk -cn bypass_mux_monitors_p3 -vn i1_Bmux_1;
Never,
For zero or more cycles (1 )
and then
For one cycle (i1_vq10_vsu_instr_v )
and then
For one cycle (( i1_vq11_vmx_b_mux_cntl(0..5) ) = ( 1 ) )
and then
For 2 cycles (1 )
and then
For one cycle (( i1_rf1_cancel ) = ( 0 ) )


●   The FoCs gui provides a very useful debug aid by simply converting your PSL into
    english

●   We required little if any further debugging for our monitors
Converting to VHDL with FoCs
●   FoCs converted the previous example to about 78 lines of VHDL, including the process
    statements, variables, and etc.

●   FoCs converted the same example into 58 lines of verilog

●   Handwritten verilog for this example would start at about 34 lines of verilog depending user
    choices

So addressing the issue of code bloat, while this example would indicate that there is not a
   significant code bloat issue with FoCs, especially given the work savings for development and
   maintenance of the code. However, we have seen several cases in more complex state
   machines where the FoCs solution is less optimal.

    So yes generated code is somewhat more verbose than handwritten code. How does that
    affect simulation speed? It will clearly reduce it. But it can be addressed, and we claim that
    the given the current state of the tool, that the value to verification far out weighs the loss of
    simulation speed.
Test Planning
●   We found that the PSL/Sugar code could be added directly to the test plan

●   Given very simple supporting documentation and sensible naming conventions,
    the code can truly document itself.

●   We found that one did not have to have much PSL expertise to review the code
    for completeness and accuracy.


%for bypass_source in { i0_by1, i0_by2, i0_vwb, i0_wb2, i0_wb3, i1_by1, i1_by2,
   i1_vwb, i1_wb2, i1_wb3, load_ex2, load_ex3, VRF } do

cover {[*]; i1_vq10_vsu_instr_v; i1_vq11_vmx_b_mux_cntl(0..5) =
   %{bypass_source}; true[*2]; i1_rf1_cancel=0};
Results and Conclusion
●   Closing the coverage loop improved our verification performance and quality

●   Given that our functional monitors were conceived of, and implemented by both the
    verification team and the design team, we claim that we had a well thought out and very
    evenly applied coverage methodology

●   The combination of these strategies allowed us to complete our portion of the design ahead
    of schedule.

      –   We then reduced our simulation throughput, allowing units that still needed
          simulation cycles to use “our” cycles
●   We then spent the extra time reviewing our coverage plan, RTX and design.

          We had no post RIT bugs in any of the logic that was covered by this plan.

We did however, have post RIT bugs in sections of the design that relied on the more traditional
   system of custom environment hooks and random scenario generation to find bugs.

More Related Content

PDF
Alley vsu functional_coverage_1f
PDF
RESUME_VLSI
DOC
Kumarswamy_new_perl
PPT
Code Coverage in Theory and in practice form the DO178B perspective
DOCX
Nishar_Resume
DOCX
Nishar resume
PDF
Hemanth_Krishnan_resume
PPTX
Agile process with a fixed cost
Alley vsu functional_coverage_1f
RESUME_VLSI
Kumarswamy_new_perl
Code Coverage in Theory and in practice form the DO178B perspective
Nishar_Resume
Nishar resume
Hemanth_Krishnan_resume
Agile process with a fixed cost

What's hot (20)

PDF
Rahul_Ramani_Profile
DOCX
Ramesh Kaveri Resume Apirl 2016
DOC
Manual Testing Notes
DOC
Sudhir_Kr_Resume
DOC
Tulika_Gupta_DFT_5yrs
DOC
Manual Testing
PDF
Software Testing - Online Guide
PDF
RFT - Ashish Mathur
DOCX
Bhavani HS
PDF
Resume M_Shams_qureshi
DOC
Meganathan_Profile
PDF
Rational Functional Tester
DOC
Gavish_Sharma Resume
DOC
3.Joyluke_resume
PDF
Work Experience
DOC
Sumanth
DOC
upendra_8_years_Exp_in_Automotive_Embedded_Systems_Software_V00
PDF
VTU ECE 7th sem VLSI lab manual
DOC
Somesh_Tessolve_updated _resume
DOC
LTTechServices_Surya
Rahul_Ramani_Profile
Ramesh Kaveri Resume Apirl 2016
Manual Testing Notes
Sudhir_Kr_Resume
Tulika_Gupta_DFT_5yrs
Manual Testing
Software Testing - Online Guide
RFT - Ashish Mathur
Bhavani HS
Resume M_Shams_qureshi
Meganathan_Profile
Rational Functional Tester
Gavish_Sharma Resume
3.Joyluke_resume
Work Experience
Sumanth
upendra_8_years_Exp_in_Automotive_Embedded_Systems_Software_V00
VTU ECE 7th sem VLSI lab manual
Somesh_Tessolve_updated _resume
LTTechServices_Surya
Ad

Viewers also liked (20)

PDF
Functional Coverage Development Tips - Mentor Graphics
PPT
Generic and Automatic Specman Based Verification Environment
PDF
The AVM and OVM in IP Core Verification - Experiences and Observations
PDF
Deploying Functional Qualification at STMicroelectronics
PDF
The Cortex-A15 Verification Story
PDF
Formal Verification Theory and Practice
PDF
OpenSPARC on FPGAs
PDF
Constrained-Random Thoughts on Advanced Constrained-Random Thoughts on Advanc...
PDF
Verification Planning and Metrics to Ensure Efficient Program Execution
PDF
Using Formal Methods to Create Instruction Set Architectures
PDF
Cost Evaluation for Adopting Formal Property Checking
PDF
Analogue Behavioral Modelling: An Inconvenient Truth
PDF
Managing Deployment of SVA in Your Project
PDF
Cisco Base Environment Overview
PDF
Mainline Functional Verification of IBM's POWER7 Processor Core
PDF
Stop Writing Assertions! Efficient Verification Methodology
PDF
Adopting SystemVerilog/OVM
PDF
The Verification Methodology Landscape
PDF
Verification of Graphics ASICs (Part I)
PDF
Digital Media Drives IC Content
Functional Coverage Development Tips - Mentor Graphics
Generic and Automatic Specman Based Verification Environment
The AVM and OVM in IP Core Verification - Experiences and Observations
Deploying Functional Qualification at STMicroelectronics
The Cortex-A15 Verification Story
Formal Verification Theory and Practice
OpenSPARC on FPGAs
Constrained-Random Thoughts on Advanced Constrained-Random Thoughts on Advanc...
Verification Planning and Metrics to Ensure Efficient Program Execution
Using Formal Methods to Create Instruction Set Architectures
Cost Evaluation for Adopting Formal Property Checking
Analogue Behavioral Modelling: An Inconvenient Truth
Managing Deployment of SVA in Your Project
Cisco Base Environment Overview
Mainline Functional Verification of IBM's POWER7 Processor Core
Stop Writing Assertions! Efficient Verification Methodology
Adopting SystemVerilog/OVM
The Verification Methodology Landscape
Verification of Graphics ASICs (Part I)
Digital Media Drives IC Content
Ad

Similar to Using PSL and FoCs for Functional Coverage Verification (20)

PDF
Dv con us-2018-formal-fpu-verif-xilinx-onespin
PDF
Deployment of Debug and Trace for features in RISC-V Core
PDF
Verification Challenges and Methodologies
PPTX
First Steps to DevOps
PPTX
Project backup repository and avoiding requirements creep
PDF
Converting to the latest COBOL Compiler made simple with the right tools
PDF
IRJET- Design and HW/SW Implementation of a Nonlinear Interpolator for Border...
PDF
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
PDF
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
PDF
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
PDF
Pivotal Cloud Foundry 2.6: A First Look
PDF
Firmware Improvement Roadmap
DOC
PratheshBV_Resume
PDF
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
PDF
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
PDF
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
PDF
Fpga based 128 bit customised vliw processor for executing dual scalarvector ...
PDF
Joomla Code Quality Control and Automation Testing
PDF
CNCF On-Demand Webinar_ LitmusChaos Project Updates.pdf
PDF
HPC on OpenStack
Dv con us-2018-formal-fpu-verif-xilinx-onespin
Deployment of Debug and Trace for features in RISC-V Core
Verification Challenges and Methodologies
First Steps to DevOps
Project backup repository and avoiding requirements creep
Converting to the latest COBOL Compiler made simple with the right tools
IRJET- Design and HW/SW Implementation of a Nonlinear Interpolator for Border...
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Comparing Functionalities of PVS-Studio and CppCat Static Code Analyzers
Pivotal Cloud Foundry 2.6: A First Look
Firmware Improvement Roadmap
PratheshBV_Resume
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
Fpga based 128 bit customised vliw processor for executing dual scalarvector ...
Joomla Code Quality Control and Automation Testing
CNCF On-Demand Webinar_ LitmusChaos Project Updates.pdf
HPC on OpenStack

More from DVClub (20)

PDF
IP Reuse Impact on Design Verification Management Across the Enterprise
PDF
Intel Xeon Pre-Silicon Validation: Introduction and Challenges
PDF
Verification of Graphics ASICs (Part II)
PPT
Validating Next Generation CPUs
PPT
Verification Automation Using IPXACT
PDF
Validation and Design in a Small Team Environment
PDF
Trends in Mixed Signal Validation
PDF
Verification In A Global Design Community
PDF
Design Verification Using SystemC
PDF
Verification Strategy for PCI-Express
PDF
SystemVerilog Assertions (SVA) in the Design/Verification Process
PDF
Efficiency Through Methodology
PDF
Pre-Si Verification for Post-Si Validation
PDF
OpenSPARC T1 Processor
PDF
Intel Atom Processor Pre-Silicon Verification Experience
PDF
Using Assertions in AMS Verification
PDF
Low-Power Design and Verification
PDF
UVM Update: Register Package
PDF
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
PDF
Verification of Wireless SoCs: No Longer in the Dark Ages
IP Reuse Impact on Design Verification Management Across the Enterprise
Intel Xeon Pre-Silicon Validation: Introduction and Challenges
Verification of Graphics ASICs (Part II)
Validating Next Generation CPUs
Verification Automation Using IPXACT
Validation and Design in a Small Team Environment
Trends in Mixed Signal Validation
Verification In A Global Design Community
Design Verification Using SystemC
Verification Strategy for PCI-Express
SystemVerilog Assertions (SVA) in the Design/Verification Process
Efficiency Through Methodology
Pre-Si Verification for Post-Si Validation
OpenSPARC T1 Processor
Intel Atom Processor Pre-Silicon Verification Experience
Using Assertions in AMS Verification
Low-Power Design and Verification
UVM Update: Register Package
Verification of the QorIQ Communication Platform Containing CoreNet Fabric wi...
Verification of Wireless SoCs: No Longer in the Dark Ages

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Cloud computing and distributed systems.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
KodekX | Application Modernization Development
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
NewMind AI Weekly Chronicles - August'25 Week I
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Cloud computing and distributed systems.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KodekX | Application Modernization Development
Dropbox Q2 2025 Financial Results & Investor Presentation

Using PSL and FoCs for Functional Coverage Verification

  • 1. Using PSL and FoCs for Functional Coverage Verification September 2006 Chuck Alley
  • 2. Introduction The Waternoose VSU team inherited a coverage strategy, and bugspray code, from a previous project. This bugspray code may have provided a useful report card but was not an adequate for functional coverage: ●The designer developed Bugspray code was almost entirely structural or code coverage ● Did not focus on areas of maximum complexity or areas of the logic prone to bugs The designer driven Bugspray coverage points were not documented in any test ● plan or workbook The VHDL of the Bugspray was hard to maintain as the design diverged from the ● antecedent design
  • 3. Our Method ● We were unhappy with this method so we made the following changes to fully implement functional coverage ● The verification team took over the coverage plan – This included maintenance of the old bugspray and development of new coverage points ● We adopted PSL as the coverage language ● We translated the PSL code into VHDL bugspray code with FoCs ● We documented the coverage points in the test plan, and reviewed them as part of our verification of the unit
  • 4. Core Verification Concerns Several concerns came to my attention from the Austin core verification team, as we revealed this plan to them. ●Generated VHDL is bloated and inefficient and would seriously degrade the simulation speed at the core and chip levels Generated VHDL is hard to read and debug inhibiting anyone else from debugging ● problems that may come up or be revealed by our code ●Only designers know enough about the logic to write effective monitors, so how are you going to get your information and how will you maintain the bugspray
  • 5. Bugspray Organization The Waternoose project leadership had organized the bugspray into the following priority scheme: P1 Required for Unit Gold criteria P2 Required for Unit RIT criteria P3 Required for Core Gold criteria P4 Required for Core RIT criteria ... Unit P1 and P2 monitors were instantiated in the local shell files and not passed up to the core team. The P3 and P4 monitors were in unit_top to be passed to the core.
  • 6. Bugspray File Organization For instance, the file fw_p3_vmx_load_forwarding_bugspray.vhdl needs to be included and covered at the core level. However, the file fw_p2_vector_float_bugspray.vhdl needs only to be run and covered in a unit simulation environment, and will not be promoted to the core level for simulation. Other features: ●Proper grouping of coverage events allows verification engineers to turn off coverage checking when coverage levels are achieved ●All coverage events were included in the unit simulation environment. This was because we wanted to develop def files capable of achieving all coverage points to save time and effort at higher levels of simulation.
  • 7. Identifying Coverage Events ● Meetings are required with the design team to help identify coverage points. ● We went from there to the available project documentation (specs and workbooks) to find the specific details that we needed to code the monitors. ● We covered IO cases, areas of complexity, areas very likely to cause problems, complex control scenarios that were handled by multiple units/designers
  • 8. Writing Monitors A simple example: ● We are interested in monitoring for several interesting forwarding scenarios. We determine that the criteria are as follows: Monitor that data is forwarded to a valid instruction from every possible source. Make sure that the instruction that uses this data is not canceled in rf1, so that the data is checked when it writes back to the VRF by IBI. For this problem the PSL code would look like this: cover {[*]; i1_vq10_vsu_instr_v; i1_vq11_vmx_b_mux_cntl(0..5) = %{bypass_source}; true[*2]; i1_rf1_cancel=0};
  • 9. Writing Monitors ● There are however, many sources from which the forwarding can occur So this code can be very quickly extended: vunit vector_bypass_i1Bmux{ %for bypass_source in { i0_by1, i0_by2, i0_vwb, i0_wb2, i0_wb3, i1_by1, i1_by2, i1_vwb, i1_wb2, i1_wb3, load_ex2, load_ex3, VRF } do assert "--!!count -t nclk -cn bypass_mux_monitors_p3 -vn i1_Bmux_%{bypass_source};" cover {[*]; i1_vq10_vsu_instr_v; i1_vq11_vmx_b_mux_cntl(0..5) = %{bypass_source}; true[*2]; i1_rf1_cancel=0}; %end }
  • 10. Converting to VHDL with FoCs ● Neglecting the for loop, FoCs shows one of the monitors as: Assertion 1 of vunit vector_bypass_i1bmux: --!!count -t nclk -cn bypass_mux_monitors_p3 -vn i1_Bmux_1; Never, For zero or more cycles (1 ) and then For one cycle (i1_vq10_vsu_instr_v ) and then For one cycle (( i1_vq11_vmx_b_mux_cntl(0..5) ) = ( 1 ) ) and then For 2 cycles (1 ) and then For one cycle (( i1_rf1_cancel ) = ( 0 ) ) ● The FoCs gui provides a very useful debug aid by simply converting your PSL into english ● We required little if any further debugging for our monitors
  • 11. Converting to VHDL with FoCs ● FoCs converted the previous example to about 78 lines of VHDL, including the process statements, variables, and etc. ● FoCs converted the same example into 58 lines of verilog ● Handwritten verilog for this example would start at about 34 lines of verilog depending user choices So addressing the issue of code bloat, while this example would indicate that there is not a significant code bloat issue with FoCs, especially given the work savings for development and maintenance of the code. However, we have seen several cases in more complex state machines where the FoCs solution is less optimal. So yes generated code is somewhat more verbose than handwritten code. How does that affect simulation speed? It will clearly reduce it. But it can be addressed, and we claim that the given the current state of the tool, that the value to verification far out weighs the loss of simulation speed.
  • 12. Test Planning ● We found that the PSL/Sugar code could be added directly to the test plan ● Given very simple supporting documentation and sensible naming conventions, the code can truly document itself. ● We found that one did not have to have much PSL expertise to review the code for completeness and accuracy. %for bypass_source in { i0_by1, i0_by2, i0_vwb, i0_wb2, i0_wb3, i1_by1, i1_by2, i1_vwb, i1_wb2, i1_wb3, load_ex2, load_ex3, VRF } do cover {[*]; i1_vq10_vsu_instr_v; i1_vq11_vmx_b_mux_cntl(0..5) = %{bypass_source}; true[*2]; i1_rf1_cancel=0};
  • 13. Results and Conclusion ● Closing the coverage loop improved our verification performance and quality ● Given that our functional monitors were conceived of, and implemented by both the verification team and the design team, we claim that we had a well thought out and very evenly applied coverage methodology ● The combination of these strategies allowed us to complete our portion of the design ahead of schedule. – We then reduced our simulation throughput, allowing units that still needed simulation cycles to use “our” cycles ● We then spent the extra time reviewing our coverage plan, RTX and design. We had no post RIT bugs in any of the logic that was covered by this plan. We did however, have post RIT bugs in sections of the design that relied on the more traditional system of custom environment hooks and random scenario generation to find bugs.