Beruflich Dokumente
Kultur Dokumente
Classes
Dave Rich
Verification Architect
info@verificationacademy.com | www.verificationacademy.com
SV & OOP
Object Oriented Programming in SystemVerilog is supported through
the class data type
OOP enables the following concepts
Encapsulation
Inheritance (single inheritance model)
Data hiding
Generic programming(template/parameterization)
Polymorphism
Classes can be used to model
Reusable verification environments
Abstract data & methods that operate on them
Packet Pkt_h;
initial begin
Pkt_h = new();
Pkt_h.Command = Idle;
if (Pkt_h.Status == 3) Out = Pkt_h.Data[3];
info@verificationacademy.com | www.verificationacademy.com