Coverage

Published on July 2018 | Categories: Documents | Downloads: 6 | Comments: 0 | Views: 299
of 10
Download PDF   Embed   Report

Comments

Content

Functional Coverage

Introduction Code coverage refects how thorough the HDL code was exercised. the set o eatures provided by code coverage tools usually includes line/bloc coverage! arc coverage or state "achines! expression coverage! event coverage and toggle coverage.  #here are so"e li"itiation with this approach. they are! $verlooing non%i"ple"ented eatures.  #he inability to "easure the interaction between "ultiple "odules.  #he ability to "easure si"ultaneous events or se&uences o events. •









Functional coverage perceives the design ro" a user's or a syste" point o view.  –

 –

 –

 –

 –

 Have you covered all o your typical scenarios( )rror cases( Corner cases( *rotocols(  Functional coverage also allows relationships! +$,! I've covered every state in "y state "achine! but did I ever have an interrupt at the sa"e ti"e( -hen the input buer was ull! did I have all types o pacets inected(  Did I ever inect two erroneous pacets in a row(+



0yste"1erilog unctional coverage eatures are below.  –

 –

 –

 –

 –

 –

 –

Coverage o variables and expressions! as well as cross coverage between the" 3uto"atic as well as user%de4ned coverage bins 3ssociate bins with sets o values! transitions! or cross products Filtering conditions at "ultiple levels )vents and se&uences to auto"atically trigger coverage sa"pling *rocedural activation and &uery o coverage $ptional directives to control and regulate coverage

Functional Coverage types •

 #here are 5 places where unctional coverage points can be coded in a veri4cation enviro"ent! and they can be class4ed as  –

 –

 –

 –

F6 7 Functional coverage F9 7 Functional coverage D:# F; 7 Functional coverage states F5 7 Functional coverage D:#

points are very near the rando"i8ation points are sa"pled at input interace o points which sa"ple internal D:# points which sa"ple output interace o









F1 Coverage points #hese set o coverage points are coded in class which is instantiated very near to the rando"i8ation and it is beore actual <F=/driver to D:#. F2 Coverage points #hese set o coverage points are coded in class which is instantiated inside a input "onitor or coverage class itsel will have ablitiy to sa"ple the D:# input signals. #his is perect or having unctional coverage on sti"ulus that D:# is being driven with! F3 Coverage points #hese set o coverage points are coded in class which is instantiated as standalone class! and it "onitors the internal states o D:#! lie F0= states! or so"e registers. F4 Coverage points #hese set o coverage points are coded in class which is instantiated inside a output "onitor or coverage class itsel will have ablitiy to sa"ple the D:# output signals. #his is perect or having unctional coverage on output o D:#!

CoverGroup Inside a Class •

3s said earlier! covergroup can be e"bedded inside a class! interace! or "odule. -hen e"ebedded inside a class! it allows to generate coverage on subset o class properties. I"portant dierence between a covergroup in "odule and covergroup in class is that! it is optional to create the instance o covergroup in class. as this is ind o auto"atic i.e the coverage group is i"plicitly declared. 3n e"bedded covergroup can de4ne a coverage "odel or protected and local class properties without any changes to the class data encapsulation. Class "e"bers can beco"e coverage points or can be used in other coverage constructs! such as conditional guards or option initiali8ation. 3 class can have "ore than one covergroup.

Cross coverage •





 coverage group can speciy cross coverage between two or "ore coverage points or variables. Cross coverage is speci4ed using the cross construct. -hen veriying co"plex syste"s it is i"portant that co"bination o unctional points are veri4ed. cross c"d >?)3D/-?I#)@ and addres or "e"ory co"ponent cross pacet type and pacet length or a networing co"ponent

Coverage options •

Coverage OptionsLie in 1era! 0yste"verilog provides ways to control the behavior o the covergroup! coverpoint and cross. $ne o the "ost co""on usage o these coverage options is setting weightage o a covergroup. In a advanced testbench there could be "any covergroups! and ro" the veri4cation point o view so"e covergroups have high priority! and they "igh be is less nu"ber! on other there hand there could be covergroups which are o low priority! and they are in large nu"ber. #here is no way si"ulator is going to now this priority inor"ation! so 0yste"verilog provides options to co""unicate this to si"ulator. #his way! even i don't have good coverage on low priority covegroup! it won't eect overall coverage in big way.





 #here are two types o options







covergroup instance speci4c options 3ll instance speci4c options

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close