2 Coverify Uvm-Trans
2 Coverify Uvm-Trans
Puneet Goel
Coverify Systems Technology
April 2012
overify C
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
Introduction
UVM stands for Universal Verication Methodology UVM is the Accellera approved standard methodology for verication UVM is primarily coded in SystemVerilog In November 2011, Cadence released UVM Multi-language package on UVM website http://uvmworld.com
The package contains a partial port of UVM Library in SystemC and e
In Feburary 2012, Mentor Graphics released opensource implementation of uvm::connect, and named the library UVMC Both UVM-ML and UVMC have been released under Apache License
Getting Started with SystemC UVM
overify C
2 / 22
UVM Testbench
Test Layer
Testcase
Sequencer
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
Testcase
Sequencer
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
Testcase
Sequencer
Constrained Randomization
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
Testcase
Sequencer
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
In this section . . .
overify C
Getting Started with SystemC UVM SystemC Perspective 5 / 22
Why SystemC?
A couple of questions that obviously prop are: Is not verication meant to be done using HVLs like Specman/Vera/SystemVerilog etc? Is not UVM primarily coded in SystemVerilog? What advantage does SystemC has over SystemVerilog?
overify C
Getting Started with SystemC UVM SystemC Perspective 6 / 22
Why SystemC?
A couple of questions that obviously prop are: Is not verication meant to be done using HVLs like Specman/Vera/SystemVerilog etc? Is not UVM primarily coded in SystemVerilog? What advantage does SystemC has over SystemVerilog?
overify C
Getting Started with SystemC UVM SystemC Perspective 6 / 22
Why SystemC?
A couple of questions that obviously prop are: Is not verication meant to be done using HVLs like Specman/Vera/SystemVerilog etc? Is not UVM primarily coded in SystemVerilog? What advantage does SystemC has over SystemVerilog?
overify C
Getting Started with SystemC UVM SystemC Perspective 6 / 22
Verication of ESL components coded in SystemC using SystemVerilog based testbenches Using SystemC Driver and Monitor components in SystemVerilog testbench SystemC model used as golden reference model for verication
Test Layer
Testcase
Sequencer
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
overify C
Getting Started with SystemC UVM SystemC Perspective 7 / 22
Verication of ESL components coded in SystemC using SystemVerilog based testbenches Using SystemC Driver and Monitor components in SystemVerilog testbench SystemC model used as golden reference model for verication
Test Layer
Testcase
Sequencer
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
overify C
Getting Started with SystemC UVM SystemC Perspective 7 / 22
Verication of ESL components coded in SystemC using SystemVerilog based testbenches Using SystemC Driver and Monitor components in SystemVerilog testbench SystemC model used as golden reference model for verication
Test Layer
Testcase
Sequencer
Transactor
Monitor
Driver
Collector
Assertions
Collector
Signal Layer
overify C
Getting Started with SystemC UVM SystemC Perspective 7 / 22
When designers and verication engineers use same language, there is a risk that they might share code Or might make same mistakes they would have the same set of language gotchas to deal with
overify C
Getting Started with SystemC UVM SystemC Perspective 8 / 22
When designers and verication engineers use same language, there is a risk that they might share code Or might make same mistakes they would have the same set of language gotchas to deal with
overify C
Getting Started with SystemC UVM SystemC Perspective 8 / 22
When designers and verication engineers use same language, there is a risk that they might share code Or might make same mistakes they would have the same set of language gotchas to deal with
overify C
Getting Started with SystemC UVM SystemC Perspective 8 / 22
When designers and verication engineers use same language, there is a risk that they might share code Or might make same mistakes they would have the same set of language gotchas to deal with
overify C
Getting Started with SystemC UVM SystemC Perspective 8 / 22
When designers and verication engineers use same language, there is a risk that they might share code Or might make same mistakes they would have the same set of language gotchas to deal with
overify C
Getting Started with SystemC UVM SystemC Perspective 8 / 22
Generic Library
Though SystemVerilog supports parameterized classes, it does not support function and operator overloading As a result, SystemVerilog lacks a generic algorithmic library
For example if you develop a sort function in systemverilog that works for builtin number types, you can not generalize this function to work on user-dened data types
In comparison SystemC, since it is built over C++, has generic libraries such as STL and boost
These libraries come in handy when you are modeling at behavioral level Also since C++ has a much bigger user-base, these libraries are well-tested and therefor are ideal for creating reference models
overify C
Getting Started with SystemC UVM SystemC Perspective 9 / 22
Generic Library
Though SystemVerilog supports parameterized classes, it does not support function and operator overloading As a result, SystemVerilog lacks a generic algorithmic library
For example if you develop a sort function in systemverilog that works for builtin number types, you can not generalize this function to work on user-dened data types
In comparison SystemC, since it is built over C++, has generic libraries such as STL and boost
These libraries come in handy when you are modeling at behavioral level Also since C++ has a much bigger user-base, these libraries are well-tested and therefor are ideal for creating reference models
overify C
Getting Started with SystemC UVM SystemC Perspective 9 / 22
Generic Library
Though SystemVerilog supports parameterized classes, it does not support function and operator overloading As a result, SystemVerilog lacks a generic algorithmic library
For example if you develop a sort function in systemverilog that works for builtin number types, you can not generalize this function to work on user-dened data types
In comparison SystemC, since it is built over C++, has generic libraries such as STL and boost
These libraries come in handy when you are modeling at behavioral level Also since C++ has a much bigger user-base, these libraries are well-tested and therefor are ideal for creating reference models
overify C
Getting Started with SystemC UVM SystemC Perspective 9 / 22
Generic Library
Though SystemVerilog supports parameterized classes, it does not support function and operator overloading As a result, SystemVerilog lacks a generic algorithmic library
For example if you develop a sort function in systemverilog that works for builtin number types, you can not generalize this function to work on user-dened data types
In comparison SystemC, since it is built over C++, has generic libraries such as STL and boost
These libraries come in handy when you are modeling at behavioral level Also since C++ has a much bigger user-base, these libraries are well-tested and therefor are ideal for creating reference models
overify C
Getting Started with SystemC UVM SystemC Perspective 9 / 22
Generic Library
Though SystemVerilog supports parameterized classes, it does not support function and operator overloading As a result, SystemVerilog lacks a generic algorithmic library
For example if you develop a sort function in systemverilog that works for builtin number types, you can not generalize this function to work on user-dened data types
In comparison SystemC, since it is built over C++, has generic libraries such as STL and boost
These libraries come in handy when you are modeling at behavioral level Also since C++ has a much bigger user-base, these libraries are well-tested and therefor are ideal for creating reference models
overify C
Getting Started with SystemC UVM SystemC Perspective 9 / 22
Generic Library
Though SystemVerilog supports parameterized classes, it does not support function and operator overloading As a result, SystemVerilog lacks a generic algorithmic library
For example if you develop a sort function in systemverilog that works for builtin number types, you can not generalize this function to work on user-dened data types
In comparison SystemC, since it is built over C++, has generic libraries such as STL and boost
These libraries come in handy when you are modeling at behavioral level Also since C++ has a much bigger user-base, these libraries are well-tested and therefor are ideal for creating reference models
overify C
Getting Started with SystemC UVM SystemC Perspective 9 / 22
In this section . . .
overify C
Getting Started with SystemC UVM UVM for SystemC 10 / 22
UVM Components as well as SystemC models tend to be hierarchical in nature Different components in a hierarchy are bound by ports and channels
Ports and Channels form the interface of a component (or module) Any other component (or module) that wants to access a given module, does it through the interface
overify C
Getting Started with SystemC UVM UVM for SystemC 12 / 22
UVM Components as well as SystemC models tend to be hierarchical in nature Different components in a hierarchy are bound by ports and channels
Ports and Channels form the interface of a component (or module) Any other component (or module) that wants to access a given module, does it through the interface
overify C
Getting Started with SystemC UVM UVM for SystemC 12 / 22
UVM Components as well as SystemC models tend to be hierarchical in nature Different components in a hierarchy are bound by ports and channels
Ports and Channels form the interface of a component (or module) Any other component (or module) that wants to access a given module, does it through the interface
overify C
Getting Started with SystemC UVM UVM for SystemC 12 / 22
UVM Components as well as SystemC models tend to be hierarchical in nature Different components in a hierarchy are bound by ports and channels
Ports and Channels form the interface of a component (or module) Any other component (or module) that wants to access a given module, does it through the interface
overify C
Getting Started with SystemC UVM UVM for SystemC 12 / 22
UVM Components as well as SystemC models tend to be hierarchical in nature Different components in a hierarchy are bound by ports and channels
Ports and Channels form the interface of a component (or module) Any other component (or module) that wants to access a given module, does it through the interface
overify C
Getting Started with SystemC UVM UVM for SystemC 12 / 22
UVM Components as well as SystemC models tend to be hierarchical in nature Different components in a hierarchy are bound by ports and channels
Ports and Channels form the interface of a component (or module) Any other component (or module) that wants to access a given module, does it through the interface
overify C
Getting Started with SystemC UVM UVM for SystemC 12 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 13 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 13 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 13 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 13 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 13 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 13 / 22
OOP principles tell us not to program to the implementation Instead program to the interfaces, we are told
overify C
Getting Started with SystemC UVM UVM for SystemC 14 / 22
OOP principles tell us not to program to the implementation Instead program to the interfaces, we are told
overify C
Getting Started with SystemC UVM UVM for SystemC 14 / 22
OOP principles tell us not to program to the implementation Instead program to the interfaces, we are told
overify C
Getting Started with SystemC UVM UVM for SystemC 14 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
Comp A
While all other methods (class functions) can be made virtual, the constructor can not be As a result, at the time of creating the component, a particular implementation has to be specied Object generation spoils much of what polymorphism had to offer
Comp B
Cycle Accurate
<<interface>>
Comp B
Comp B
Loosely Timed
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
Comp A
While all other methods (class functions) can be made virtual, the constructor can not be As a result, at the time of creating the component, a particular implementation has to be specied Object generation spoils much of what polymorphism had to offer
Comp B
Cycle Accurate
<<interface>>
Comp B
Comp B
Loosely Timed
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
Comp A
While all other methods (class functions) can be made virtual, the constructor can not be As a result, at the time of creating the component, a particular implementation has to be specied Object generation spoils much of what polymorphism had to offer
Comp B
Cycle Accurate
<<interface>>
Comp B
Comp B
Loosely Timed
overify C
Getting Started with SystemC UVM UVM for SystemC 15 / 22
Comp B
UVM Factory
Comp B
Loosely Timed
Comp B
Cycle Accurate
overify C
Getting Started with SystemC UVM UVM for SystemC 16 / 22
Comp B
UVM Factory
Comp B
Loosely Timed
Comp B
Cycle Accurate
overify C
Getting Started with SystemC UVM UVM for SystemC 16 / 22
Comp B
UVM Factory
Comp B
Loosely Timed
Comp B
Cycle Accurate
overify C
Getting Started with SystemC UVM UVM for SystemC 16 / 22
UVM Phases
SystemC has only a few phases. In contrast, UVM has a very elaborate phase sequence.
VerilogElaboration End of Elaboration Start of Simulation UVM Build Phase UVM Connect Phase SystemC Elaboration End of Elaboration Start of Simulation UVM Run Phase UVM Extract Phase UVM Check Phase UVM Report Phase End of Simulation Simulation Run
Note that Start of Elaboration and Start of Simulation etc are PLI hooks in Verilog and similarly are function hooks in SystemC The Build and Connect phase in UVM happen at ZERO simulation time
overify C
Getting Started with SystemC UVM UVM for SystemC 17 / 22
UVM Phases
SystemC has only a few phases. In contrast, UVM has a very elaborate phase sequence.
VerilogElaboration End of Elaboration Start of Simulation UVM Build Phase UVM Connect Phase SystemC Elaboration End of Elaboration Start of Simulation UVM Run Phase UVM Extract Phase UVM Check Phase UVM Report Phase End of Simulation Simulation Run
Note that Start of Elaboration and Start of Simulation etc are PLI hooks in Verilog and similarly are function hooks in SystemC The Build and Connect phase in UVM happen at ZERO simulation time
overify C
Getting Started with SystemC UVM UVM for SystemC 17 / 22
Conguring a Build
Not all the instances of a class (UVM Component) may be exactly same in behaviour There may be a need to congure a UVM Component Often, it might be useful to build a UVM component while taking some conguration parameters into account
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Processor Master
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Global IO
Processor Master
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Global IO
overify C
Getting Started with SystemC UVM UVM for SystemC 18 / 22
Conguring a Build
Not all the instances of a class (UVM Component) may be exactly same in behaviour There may be a need to congure a UVM Component Often, it might be useful to build a UVM component while taking some conguration parameters into account
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Processor Master
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Global IO
Processor Master
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Global IO
overify C
Getting Started with SystemC UVM UVM for SystemC 18 / 22
Conguring a Build
Not all the instances of a class (UVM Component) may be exactly same in behaviour There may be a need to congure a UVM Component Often, it might be useful to build a UVM component while taking some conguration parameters into account
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Processor Master
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Global IO
Processor Master
Processor Master
Processor Master
Routing Node
Routing Node
Routing Node
Global IO
overify C
Getting Started with SystemC UVM UVM for SystemC 18 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
UVM Transactions
UVM-SC library provides a base class for creating a transaction (called sequence item in UVM) The UVM-SC implementation lacks CPP macros to automatically create virtual methods for print, pack, unpack, copy and compare operations UVM-SC makes it mendatory for the user to implement these functions A transaction class can be registered with the UVM factory, making it possible to generate transaction objects using the factory UVM-SC depends on the pack/unpack operations to send transactions across the language boundaries A user must make sure that pack/unpack methods for the transaction class in SystemC and SystemVerilog remain in sync Caveat When you pack data in SystemVerilog or in SystemC, you loose the control bits for any 4-valued logic data.
overify C
Getting Started with SystemC UVM UVM for SystemC 20 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 21 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 21 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 21 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 21 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 21 / 22
overify C
Getting Started with SystemC UVM UVM for SystemC 21 / 22
Thank You!
overify C