SlideShare a Scribd company logo
5
Most read
7
Most read
13
Most read
TM
Efficient Migration ofEfficient Migration of VerilogVerilog
TestbenchesTestbenches to ‘UVM’ keepingto ‘UVM’ keeping
the functionality intact:the functionality intact:
Do’s andDo’s and Dont’sDont’s
Mehul Kumar & Nitin Goel
Date – 22 Dec 2011
Agenda
• Need for Migration
• Conversion of Sequential, Combinatorial and Continous assignments
• Conversion of forces & releases
•Conversion of Inout ports
•Conversion of UI from APIs
•Conversion of monitor events
TM 2
•Conversion of monitor events
•Establishing coherency between converted code with verilog counterpart
•Conclusion
Why is this migration needed?
• Increase in design complexity
• More than 100 IPs per SoC
• Reuse of legacy IP
• Avoid hybrid testbenches
• Newer components in the latest methodology
TM 3
• Newer components in the latest methodology
• Environment bring up
• Complex to scale
• Maintain
Verilog Testbench and its equivalent UVM
Testbench
TM 4
Converting always sequential logic, always
combinatorial logic and Continuous assignments
TM 5
• Combinatorial and sequential blocks are converted to 'task‘
• Sequential block non-blocking assignments are changed to blocking
• Continuous assignments mapped to functions returning values.
•A simple script is utilized to perform the conversion
•'naming 'of tasks could be edited later on.
How the Verilog event behavior is compensated when
all assignment types have been transformed to
blocking?
•Events executed in order:
• Active events
• Inactive events (#0 delay
assignments)
• Non Blocking assignments
• Monitor events
•In one time step all events are
TM 6
handled by Simulator
apb_interface :
apb_master class:
Dynamics of SystemVerilog code in terms of the
events and functional mapping of Verilog behavior
TM 7
•Two events are declared inside the APB interface
• 'master_nba_evt' (non-blocking event)
• 'master_act_evt' (Active event).
•Active event blocks the execution of the following:
• Waiting for posedge of clock
• Generation of Non-Blocking event.
•A 'main' task is used to synchronize code flow for APB master class
Note the "->>" being different from active event
trigger "->"
Event synchronization between code execution and region
execution
TM 8
Step 1: Active Event execution of line " ->apb_if.master_act_evnt; “
Generate trigger “master_nba_evnt”
All the combinatorial converted tasks executed
The code jumps to the wait of the sequential block trigger.
#Step2: NBA event "master_nba_evt" is triggered in the NBA region
"assign_current_state" task is executed
Blocking assignment of "present_state" variable is scheduled for #Step3.
#Step3: Blocking assignment for “present_state” is done . Repeat #Step1.
Verilog code transitions in following manner:
#Step1: Change in wire triggers 'always' block and 'next_state' is assigned.
#Step2: NBA assignment of 'present_state' is done
#Step3: Repeat #Step1
Timing Diagram to explain Verilog and System Verilog
code flow
TM 9
•In Verilog at simulator timestep 4 'pending_transaction' wire has a change in value
• Triggers the 'always' block to decide the 'next_state‘ handled in active region of timestep5.
• Assigned to 'present_state' variable in NBA region of timestep6 falling after the posedge of PCLK.
• In SystemVerilog 'act_evt' gets triggers in active region of timestep5 before the posedge of the PCLK.
• 'next_state' assignment is done in the same timestep in active region
• 'nba_evt' gets triggered in the NBA region of timestep6 falling after the posedge of PCLK
• 'present_state' assignment is scheduled to be done in active region of time step7.
• At timestep7 both code shows value of 'next_state' deposited on 'present_state' variable
Conversion of Force & Releases
TM 10
• A mux based logic is implemented inside the interface
• output signal 'a_o‘
• A mux select signal 'force_a_at_x‘
• force value at the wire 'a' when the select is '1' else actual 'a_o' value
•Functionality is similar to Verilog
Conversion of Inout Ports
TM 11
•A Verilog inout pin bifurcated :
• 'output_enable‘
• 'output‘
• 'input’
•UVM driver class implements these three ports instead of one' inout' pin.
•When the output is not selected a high'z' is driven
Conversion of User Interface from APIs
•API of Verilog driver
• 'addr', 'data' , 'strb' and 'write as
arguments
•API removed
•Sequence item class is utilized
• Testcase only needs to randomize one sequence
item instead of calling separate APIs for each
functionality to be executed by the driver
TM 12
functionality to be executed by the driver
Monitor :: Event Base -> Object Base reporting via
Analysis Ports
TM 13
• 'event' data type is triggered on occurrence of a particular condition.
• UVM monitor class an analysis port of type of 'apb_transaction' is created
• ‘write’ method of the analysis port is called to publish the event information.
• All events are stored inside TLM fifo to be processed by subscriber (scoreboard).
• Conversion mapping is direct
• triggering 'event‘ modified to a 'write' method call
How to establish that the ported UVM testbench is
conforming with Verilog testbench?
•No LEC kind of tool to check the conformity between two different
forms of same testbench.
• A Verilog proven assertion/protocol checker plugged in UVM converted
testbench
• Testcases were run to achieve 100% DUT code coverage
TM 14
Benefits of the approach
• Cycle time reduction.
• a reduction in cycle time of 30%-50%(approx.),
•UVM provides additional benefits
• Layered testbench enabling reuse
• Randomization
• Coverage driven Verification.
•UVM RAL provides the automated register check testcases
TM 15
Some Facts from a Typical IP Testbench environment
porting
S.No. Data Points Verilog Testbench UVM Testbench
1. Number Of Tests 550 35
2 Randomization No Yes
3 Reusability of Stimulus No Yes
TM 16
3 Reusability of Stimulus No Yes
4 Scalability of Testbench No Yes
5
Approximate Lines Of Code
per testcase
>225 <40
THANK YOU!!
TM 17

More Related Content

PDF
20111015 勉強会 (PCIe / SR-IOV)
PPTX
OpenvSwitch Deep Dive
PDF
Linux Preempt-RT Internals
PDF
Cilium - Container Networking with BPF & XDP
PDF
DPDK In Depth
PPTX
Dockerと外部ルータを連携させる仕組みを作ってみた
PDF
Intel DPDK Step by Step instructions
PDF
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
20111015 勉強会 (PCIe / SR-IOV)
OpenvSwitch Deep Dive
Linux Preempt-RT Internals
Cilium - Container Networking with BPF & XDP
DPDK In Depth
Dockerと外部ルータを連携させる仕組みを作ってみた
Intel DPDK Step by Step instructions
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2

What's hot (20)

PDF
Linux Kernel Overview
PDF
Linux on RISC-V with Open Hardware (ELC-E 2020)
PDF
Function Level Analysis of Linux NVMe Driver
PPTX
Linux kernel debugging
PDF
DPDK in Containers Hands-on Lab
PPTX
Understanding DPDK
PDF
Zynq MPSoC勉強会 Codec編
PDF
Monitoring MySQL with DTrace/SystemTap
PPTX
FD.io VPP事始め
PDF
Online game server on Akka.NET (NDC2016)
PDF
VXLAN and FRRouting
PDF
RISC-V software state of the union
PDF
ARM Trusted FirmwareのBL31を単体で使う!
PDF
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
PPTX
worker_threadsを使った実装の勘所
PPTX
Dpdk applications
PPTX
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
PDF
Verification Challenges and Methodologies
PDF
Project ACRN: SR-IOV implementation
PDF
x86とコンテキストスイッチ
Linux Kernel Overview
Linux on RISC-V with Open Hardware (ELC-E 2020)
Function Level Analysis of Linux NVMe Driver
Linux kernel debugging
DPDK in Containers Hands-on Lab
Understanding DPDK
Zynq MPSoC勉強会 Codec編
Monitoring MySQL with DTrace/SystemTap
FD.io VPP事始め
Online game server on Akka.NET (NDC2016)
VXLAN and FRRouting
RISC-V software state of the union
ARM Trusted FirmwareのBL31を単体で使う!
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
worker_threadsを使った実装の勘所
Dpdk applications
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
Verification Challenges and Methodologies
Project ACRN: SR-IOV implementation
x86とコンテキストスイッチ
Ad

Viewers also liked (7)

PPT
Verilog HDL Verification
PPTX
Verilog Tutorial - Verilog HDL Tutorial with Examples
PDF
Mixed signal verification challenges - slides
PDF
Testbench Linter: Automated Rule Checker Framework for Testbenches
PDF
Verilog hdl by samir palnitkar for verilog know how
PDF
Re usable continuous-time analog sva assertions - slides
PPTX
AMBA 2.0 PPT
Verilog HDL Verification
Verilog Tutorial - Verilog HDL Tutorial with Examples
Mixed signal verification challenges - slides
Testbench Linter: Automated Rule Checker Framework for Testbenches
Verilog hdl by samir palnitkar for verilog know how
Re usable continuous-time analog sva assertions - slides
AMBA 2.0 PPT
Ad

Similar to Efficient Migration of Verilog Testbenches to 'UVM' Keeping the Functionality Intact (20)

PPTX
Application of the automation know-how within the EGS-CC project
PDF
[EWiLi2016] Enabling power-awareness for the Xen Hypervisor
PPTX
10 implementing subprograms
PDF
Slide used at ACM-SAC 2014 by Suzaki
PDF
Fault tolerance
PDF
UVM TUTORIAL;
PPTX
Control unit design
PPTX
RR_07 Maint Monitoring and Tshooting.pptx
PPT
Libckpt transparent checkpointing under unix
PDF
UVM Basics.pdf
PDF
UVM basics Arm Cpu verificationThis lecture aims to: ▪ demonstrate the need f...
PPTX
3. CPU virtualization and scheduling
PDF
Hypervisors
PPTX
System verilog control flow
PPTX
MODULE 3 process synchronizationnnn.pptx
PPTX
ASIC design verification
PDF
Mike Bartley - Innovations for Testing Parallel Software - EuroSTAR 2012
PPTX
17-virtualization.pptx
PDF
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
PDF
XPDDS17: Approach to Native Applications in XEN on ARM - Volodymyr Babchuk, E...
Application of the automation know-how within the EGS-CC project
[EWiLi2016] Enabling power-awareness for the Xen Hypervisor
10 implementing subprograms
Slide used at ACM-SAC 2014 by Suzaki
Fault tolerance
UVM TUTORIAL;
Control unit design
RR_07 Maint Monitoring and Tshooting.pptx
Libckpt transparent checkpointing under unix
UVM Basics.pdf
UVM basics Arm Cpu verificationThis lecture aims to: ▪ demonstrate the need f...
3. CPU virtualization and scheduling
Hypervisors
System verilog control flow
MODULE 3 process synchronizationnnn.pptx
ASIC design verification
Mike Bartley - Innovations for Testing Parallel Software - EuroSTAR 2012
17-virtualization.pptx
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
XPDDS17: Approach to Native Applications in XEN on ARM - Volodymyr Babchuk, E...

More from DVClub (20)

PDF
IP Reuse Impact on Design Verification Management Across the Enterprise
PDF
Cisco Base Environment Overview
PDF
Intel Xeon Pre-Silicon Validation: Introduction and Challenges
PDF
Verification of Graphics ASICs (Part II)
PDF
Verification of Graphics ASICs (Part I)
PDF
Stop Writing Assertions! Efficient Verification Methodology
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
IP Reuse Impact on Design Verification Management Across the Enterprise
Cisco Base Environment Overview
Intel Xeon Pre-Silicon Validation: Introduction and Challenges
Verification of Graphics ASICs (Part II)
Verification of Graphics ASICs (Part I)
Stop Writing Assertions! Efficient Verification Methodology
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

Efficient Migration of Verilog Testbenches to 'UVM' Keeping the Functionality Intact

  • 1. TM Efficient Migration ofEfficient Migration of VerilogVerilog TestbenchesTestbenches to ‘UVM’ keepingto ‘UVM’ keeping the functionality intact:the functionality intact: Do’s andDo’s and Dont’sDont’s Mehul Kumar & Nitin Goel Date – 22 Dec 2011
  • 2. Agenda • Need for Migration • Conversion of Sequential, Combinatorial and Continous assignments • Conversion of forces & releases •Conversion of Inout ports •Conversion of UI from APIs •Conversion of monitor events TM 2 •Conversion of monitor events •Establishing coherency between converted code with verilog counterpart •Conclusion
  • 3. Why is this migration needed? • Increase in design complexity • More than 100 IPs per SoC • Reuse of legacy IP • Avoid hybrid testbenches • Newer components in the latest methodology TM 3 • Newer components in the latest methodology • Environment bring up • Complex to scale • Maintain
  • 4. Verilog Testbench and its equivalent UVM Testbench TM 4
  • 5. Converting always sequential logic, always combinatorial logic and Continuous assignments TM 5 • Combinatorial and sequential blocks are converted to 'task‘ • Sequential block non-blocking assignments are changed to blocking • Continuous assignments mapped to functions returning values. •A simple script is utilized to perform the conversion •'naming 'of tasks could be edited later on.
  • 6. How the Verilog event behavior is compensated when all assignment types have been transformed to blocking? •Events executed in order: • Active events • Inactive events (#0 delay assignments) • Non Blocking assignments • Monitor events •In one time step all events are TM 6 handled by Simulator
  • 7. apb_interface : apb_master class: Dynamics of SystemVerilog code in terms of the events and functional mapping of Verilog behavior TM 7 •Two events are declared inside the APB interface • 'master_nba_evt' (non-blocking event) • 'master_act_evt' (Active event). •Active event blocks the execution of the following: • Waiting for posedge of clock • Generation of Non-Blocking event. •A 'main' task is used to synchronize code flow for APB master class Note the "->>" being different from active event trigger "->"
  • 8. Event synchronization between code execution and region execution TM 8 Step 1: Active Event execution of line " ->apb_if.master_act_evnt; “ Generate trigger “master_nba_evnt” All the combinatorial converted tasks executed The code jumps to the wait of the sequential block trigger. #Step2: NBA event "master_nba_evt" is triggered in the NBA region "assign_current_state" task is executed Blocking assignment of "present_state" variable is scheduled for #Step3. #Step3: Blocking assignment for “present_state” is done . Repeat #Step1. Verilog code transitions in following manner: #Step1: Change in wire triggers 'always' block and 'next_state' is assigned. #Step2: NBA assignment of 'present_state' is done #Step3: Repeat #Step1
  • 9. Timing Diagram to explain Verilog and System Verilog code flow TM 9 •In Verilog at simulator timestep 4 'pending_transaction' wire has a change in value • Triggers the 'always' block to decide the 'next_state‘ handled in active region of timestep5. • Assigned to 'present_state' variable in NBA region of timestep6 falling after the posedge of PCLK. • In SystemVerilog 'act_evt' gets triggers in active region of timestep5 before the posedge of the PCLK. • 'next_state' assignment is done in the same timestep in active region • 'nba_evt' gets triggered in the NBA region of timestep6 falling after the posedge of PCLK • 'present_state' assignment is scheduled to be done in active region of time step7. • At timestep7 both code shows value of 'next_state' deposited on 'present_state' variable
  • 10. Conversion of Force & Releases TM 10 • A mux based logic is implemented inside the interface • output signal 'a_o‘ • A mux select signal 'force_a_at_x‘ • force value at the wire 'a' when the select is '1' else actual 'a_o' value •Functionality is similar to Verilog
  • 11. Conversion of Inout Ports TM 11 •A Verilog inout pin bifurcated : • 'output_enable‘ • 'output‘ • 'input’ •UVM driver class implements these three ports instead of one' inout' pin. •When the output is not selected a high'z' is driven
  • 12. Conversion of User Interface from APIs •API of Verilog driver • 'addr', 'data' , 'strb' and 'write as arguments •API removed •Sequence item class is utilized • Testcase only needs to randomize one sequence item instead of calling separate APIs for each functionality to be executed by the driver TM 12 functionality to be executed by the driver
  • 13. Monitor :: Event Base -> Object Base reporting via Analysis Ports TM 13 • 'event' data type is triggered on occurrence of a particular condition. • UVM monitor class an analysis port of type of 'apb_transaction' is created • ‘write’ method of the analysis port is called to publish the event information. • All events are stored inside TLM fifo to be processed by subscriber (scoreboard). • Conversion mapping is direct • triggering 'event‘ modified to a 'write' method call
  • 14. How to establish that the ported UVM testbench is conforming with Verilog testbench? •No LEC kind of tool to check the conformity between two different forms of same testbench. • A Verilog proven assertion/protocol checker plugged in UVM converted testbench • Testcases were run to achieve 100% DUT code coverage TM 14
  • 15. Benefits of the approach • Cycle time reduction. • a reduction in cycle time of 30%-50%(approx.), •UVM provides additional benefits • Layered testbench enabling reuse • Randomization • Coverage driven Verification. •UVM RAL provides the automated register check testcases TM 15
  • 16. Some Facts from a Typical IP Testbench environment porting S.No. Data Points Verilog Testbench UVM Testbench 1. Number Of Tests 550 35 2 Randomization No Yes 3 Reusability of Stimulus No Yes TM 16 3 Reusability of Stimulus No Yes 4 Scalability of Testbench No Yes 5 Approximate Lines Of Code per testcase >225 <40