76 Network Packet Header Generation

download 76 Network Packet Header Generation

of 14

Transcript of 76 Network Packet Header Generation

  • 8/17/2019 76 Network Packet Header Generation

    1/14

    Network Packet Header Generation UsingGraph Based Techniques combined with

    Software Testing Strategies

    Sridevi Navulur

    Satheesh Parasumanna

    Rama Chaganti

    © Accellera Systems Initiative 1

  • 8/17/2019 76 Network Packet Header Generation

    2/14

  • 8/17/2019 76 Network Packet Header Generation

    3/14

    Application Overview• Simulation-based Network Processor Verification presents

    unique challenges due to the large number of packet

    constructions and requirements to model and measure

    those that are legal.

    © Accellera Systems Initiative 3

  • 8/17/2019 76 Network Packet Header Generation

    4/14

    Motivation & Challenges

    • Motivation :

     – Simplify generation of complex packet or frame headerinformation and exhaustively test all randompermutations and combinations of legal network protocolheaders.

    • Challenges

     – Huge space of legal combinations to cover

     – Computational expensive simulation cycles

     – Cumbersome hand written cover groups and hence nometrics for what has been covered.

  • 8/17/2019 76 Network Packet Header Generation

    5/14

    Goals & Main IdeaStimulus Generation Goals & Modeling Approaches tried

    Stimulus Generation Goals & Approaches tried Functional Coverage Generation Approaches tried

    Rand-sequence:

    o Rand-sequence to cover all the

    combinations

    o Multiple hand-coded tests with different

    rand-sequences for path coverage

    o No automatic functional coverage

    generation support

    Hand-coding :

    o A huge task in identifying and coding to

    cover all the protocols header types

    o ~800 lines of hand-written Cover point

    code for SV Transition coverage

    o Difficult to handle illegal and ignore bins

    for SV cover points and cross points

    Recursive Graph: Initial solution

    Cons :

    o Lack of recursion depth control

    o No automatic functional coverage

    generation support

    Graph Based:

    o Graph tool supports automatic creation of

    pairwise SV cover points & crosses.

    o Generates cross of previous header type and

    index of next header type

    o Automatic generation of previous & next SV

    illegal bins restrict solutions to legal subset

    Pairwise Graph:

    Final solution, addressed recursion issues and

    enabled functional coverage generation

  • 8/17/2019 76 Network Packet Header Generation

    6/14

    Strategy and Approach

    © Accellera Systems Initiative 6

    • Uses a Portable Stimulus solver

    • Constraint-based stimulus description• Goal-based value generation

    • User developed portable stimulus rules

    • Analyzes variables for reachability

    • Identifies strategy-specific (pair-wise) goals

    • Tool creates

    • Stimulus-generator class

    • Strategy-specific SV cover group

    • Why pair-wise testing ?

    • Proven approach from the software testing domain

    • Strategize to select pairs, triples, quads of variable

    to exercise

    • Pairwise strategy sufficient for this application

    • Pairwise Graph Structure• Previous/Next State options tracked

    • Scalable to large sequential headers

    • Tool generates SV Coverage classes

  • 8/17/2019 76 Network Packet Header Generation

    7/14

    © Accellera Systems Initiative 7

    Implementation : Stimulus Generator

    Portable Stimulus Rule file

  • 8/17/2019 76 Network Packet Header Generation

    8/14

    Implementation of Stimulus

    © Accellera Systems Initiative 8

    Example Application Rules:

    Every Packet in this examplewould start with EthernetHeader and can traversethrough multiple types ofheaders of various

    combinations and construct apacket.

    Maximum depth of the headertypes can also be changed. Inthis application example welimited the MAX Depth of the

    header combinations to be 8 atany given time.

    • Portable Stimulus rules syntax

    • Rules coverage strategy

  • 8/17/2019 76 Network Packet Header Generation

    9/14

  • 8/17/2019 76 Network Packet Header Generation

    10/14

    Implementation of test

    © Accellera Systems Initiative

    10

    Portable Stimulus UVM test

  • 8/17/2019 76 Network Packet Header Generation

    11/14

    Evidence & Results

    © Accellera Systems Initiative 11

    # Tests Code Cov Func. Cov Lines of Code Cpu time

    12 directed + CR tests 85% none ~1800 Lines 4 hours

    1 Portable Stimulus test 94.98% 100% ~220 lines 40 minutes

    • Compare Pairwise-driven generation and Rand-Sequence

     –  Use Ethernet packet –  Apply pairwise strategy

    • Pairwise-driven stimulus easily hits all cases

    • Replace a suite of random+directed tests with 1 portablestimulus test

     –  12 directed+CR tests (~1800 lines of code) replacedwith 1 portable stimulus test (220 lines of code)

    attaining 95% code coverage and 100% functionalcoverage. Coverage snippet below.

  • 8/17/2019 76 Network Packet Header Generation

    12/14

    Conclusion

    © Accellera Systems Initiative 12

  • 8/17/2019 76 Network Packet Header Generation

    13/14

    Limitation & Future Scope

    © Accellera Systems Initiative 13

    Limitations : Every time design spec changes, thestimulus rule graph needs to be updated.

    Future Scope : Automate the ability to choosevarious rule graphs with respective strategies

    References• http://www.xilinx.com/applications/wired-communications/sdnet.html

    • http://www.pairwise.org/

  • 8/17/2019 76 Network Packet Header Generation

    14/14

    Q&A

    © Accellera Systems Initiative 14