+ All Categories
Home > Documents > 5.1SpadariMNemerix

5.1SpadariMNemerix

Date post: 03-Jun-2018
Category:
Upload: naveed-beigh
View: 215 times
Download: 0 times
Share this document with a friend

of 32

Transcript
  • 8/12/2019 5.1SpadariMNemerix

    1/32

    Formal verification of AHB interfaces

    Session 5.1Formal Verification of AHB

    interfaces

    Maurizio Spadari

    NemeriX

  • 8/12/2019 5.1SpadariMNemerix

    2/32

    Formal verification of AHB interfaces

    Agenda

    Company & personal overview

    Main project features

    AMBA bus features

    Verification challenge & strategy

    AMBA verification strategy

    Benefits of the approach

    Conclusion

  • 8/12/2019 5.1SpadariMNemerix

    3/32

    Formal verification of AHB interfaces

    Company overview

    NemeriX (http://www.nemerix.com) is a provider of

    GPS solutions

    Analog RF receivers

    Digital base-band chip

    Processors

    NemeriXs core competence is development oflow-power integrated circuits

  • 8/12/2019 5.1SpadariMNemerix

    4/32

    Formal verification of AHB interfaces

    Personal overview

    10+ year of experience in digital design &

    verification at various companies ( LSI-Logic,

    ST-Microelectronics)

    Currently managing design verification and

    verification methodologies at NemeriX

  • 8/12/2019 5.1SpadariMNemerix

    5/32

    Formal verification of AHB interfaces

    Next generation base-band processor

    Proprietary IP for GNSS signal processing3rd-party IP processor

    3rd-party communication peripherals

    Commodity IP developed in-house

    Modules connected via AMBA interface

    Design overview

  • 8/12/2019 5.1SpadariMNemerix

    6/32

    Formal verification of AHB interfaces

    Base-band processor

    Processor

    (AHB Master)

    DMA Controller

    (AHB Master)

    GNSS IPCommunicationIP.s

    CommunicationIP.s

    Communication

    IP

    Commodity

    IP

    AMBA bus

  • 8/12/2019 5.1SpadariMNemerix

    7/32

    Formal verification of AHB interfaces

    AMBA bus structures

    Multi-master system (processor + DMA

    controller)

    AHB-Lite interface for slave peripherals

    Requirement for AMBA bus

    Robustness

    Low power implementation

    No routing overhead

    Reduced toggling activity

  • 8/12/2019 5.1SpadariMNemerix

    8/32

    Formal verification of AHB interfaces

    AMBA bus features

    Read-Data from slave are ORed together

    Peripherals should keep HRDATA bus low when notaddresses

    Multi-clock domain system

    Source/Destination register may be in general on a clock

    domain different than HCLK Fields of the same register might be in clock domains

    different from each other

  • 8/12/2019 5.1SpadariMNemerix

    9/32

    Formal verification of AHB interfaces

    AMBA bus implementation

    For write/read operation re-timing and hand-shake

    might be required

    For read operation value is returned on HRDATA only

    when hand-shake has completed

    For write operation peripherals assert HREADY only when

    data has been transferred to destination registerSince hand-shake circuitry has a penalty in term of area

    and timing it should be used only when necessary

    For time critical operation where hand-shake is

    required a read-ahead mechanism is implemented

  • 8/12/2019 5.1SpadariMNemerix

    10/32

    Formal verification of AHB interfaces

    Register handshake

    AHB slave

    interfaceReg. field B

    Reg. field A

    HCLK

    AHB slave

    interface

    HSK

    CLK A

    HSK

    CLK B

    CLKB

    CLKA

  • 8/12/2019 5.1SpadariMNemerix

    11/32

    Formal verification of AHB interfaces

    Design flow

    RTL

    verification

    Application

    software

    C-model

    RTL code

    FPGA

    ASIC

    Gate-level

    verification

    System

    validation

  • 8/12/2019 5.1SpadariMNemerix

    12/32

    Formal verification of AHB interfaces

    Final green-light is given by system team that checks

    the SW drivers achieve the expected performances on

    the HW.GPS signal processing requires long integration

    (especially when acquiring low signals)

    System must be checked with real-life signals

    An FPGA implementation is mandatory

    Architectural exploration is also made at FPGA level

    This implies several architectural modifications also in

    AMAB bus structure

    Verification challenges

  • 8/12/2019 5.1SpadariMNemerix

    13/32

    Formal verification of AHB interfaces

    AMBA design &verification requirements

    The above approach demands frequent changes on the

    AMBA structure:

    Register changes/additional/removal

    Address map changes to improve efficiency in register

    access

    A design methodology is required to quickly implement

    and verify changes

    Automatic generation of register structure

    Automated verification methodology

  • 8/12/2019 5.1SpadariMNemerix

    14/32

    Formal verification of AHB interfaces

    AMBA register generation

    A Python script (RegGen) has been devised to generate

    AHB infrastructure at peripheral level:

    AHB-Slave Lite interface

    Hand-shake mechanism for register fields requiring it

    Script structure

    GUI interface

    Generation of Verilog HDL code

    Generation of documentation (HTML file)

  • 8/12/2019 5.1SpadariMNemerix

    15/32

    Formal verification of AHB interfaces

    RegGen script : user interface

    Via GUI user can

    Define register map

    At register level define each field and its relevant clock domain

    Place a short field and register description ( for documentation

    purposes)

    Deliverables Documentation : HTML file

    Generation of Verilog HDL code

    Python script for re-loading session ( useful for modifying an

    existing register configuration)RegGen script is not a pre-defined product but a living script:

    new feature are added continuously

  • 8/12/2019 5.1SpadariMNemerix

    16/32

    Formal verification of AHB interfaces

    RegGen script : RTL deliverables

    RegGen generates following deliverables:

    AMBA interface control logic

    Handles AHB interface signal

    Generate the clock hand-shake signals

    Register interface

    Handles the register hand-shake signals

    Generate read/write signals to physical register (located in

    design hierarchy)

  • 8/12/2019 5.1SpadariMNemerix

    17/32

    Formal verification of AHB interfaces

    RegGen RTL structure

    AHB

    Interface

    Register

    Interface

    AHB

    SlaveItf.

    HSK

    Control

    & data

    Reg. field

    Reg. field

    RegGen output

  • 8/12/2019 5.1SpadariMNemerix

    18/32

    Formal verification of AHB interfaces

    RegGen script : RTL deliverables

    Interface control logic block is relatively independent

    from actual register configuration

    Variable parts of this blocks are number of clock domains

    and specific block features like read-ahead buffer

    Register interface block is very implementation specific

    since it handles hand-shake signals for bit fields ofregisters being instantiated

  • 8/12/2019 5.1SpadariMNemerix

    19/32

    Formal verification of AHB interfaces

    Formal verification on AMBA

    Formal verification (FV) methodology is well suited to

    validate current AMBA structure.

    FV explores all possible scenarios and interactions

    between AMBA operations.

    AMBA VIP allows to check that slave responses are

    consistent with AMBA.

    VIP checks are supplemented with additional checks

    that ensure that project specific features ( hand-shake,

    look-ahead buffer ) operate correctly.

  • 8/12/2019 5.1SpadariMNemerix

    20/32

    Formal verification of AHB interfaces

    Modular approach

    RegGen script allows a modular approach to validation.

    out-of-context verification

    When a new feature or a modification is done on script,

    script itself is validated by generating a simple but

    exhaustive test-case

    in-context verification

    When register file is modified at module-level the new

    module is validated via IFV

  • 8/12/2019 5.1SpadariMNemerix

    21/32

    Formal verification of AHB interfaces

    Out-of-context verification

    Purpose of out-of-context verification is to ensure all

    supported features operate correctly

    Test-case used for validation should be exhaustive in

    the sense that contains all features supported by the

    script

    Verification is done with a combination of AMBA VIP

    together with additional checks

    AMBA VIP ensures that module is compliant to AMBA

    specification

    Additional checks ensure compliancy to project-specific

    requirements

  • 8/12/2019 5.1SpadariMNemerix

    22/32

    Formal verification of AHB interfaces

    Project specific requirements

    Project specific requirements are captured in a

    verification plan and address project-specific featuresof the AMBA bus

    Example of project-specific features:

    Valid address: An access to an unmapped area (inside the

    slave address space) should return an error response onHRESP bus

    Register write : A write operation should update registercontent.

    Register read : A read operation should return register

    content. Hand-shake : In a read/write operation the correct hand-

    shake signals should activate

  • 8/12/2019 5.1SpadariMNemerix

    23/32

    Formal verification of AHB interfaces

    Testcase

    Out-of-context test-bench

    AHB

    interface

    Register

    interface

    Sample

    Reg. block

    AMBA VIPProject specific

    assertions

    AMBA VIP

    Slave

    AMBA VIP

    Master

  • 8/12/2019 5.1SpadariMNemerix

    24/32

    Formal verification of AHB interfaces

    Advantage of out-of-context verification

    A simple test-case allows faster turn-around time

    Limited number of assertions required to validate

    design

    Easy to add specific assertions to debug/analyze in-depth

    the FSM and control block parts

    Due to module structure out-of-context verification will

    stress mostly the control part which is less

    implementation specific

  • 8/12/2019 5.1SpadariMNemerix

    25/32

    Formal verification of AHB interfaces

    In-context validation

    In-context validation is applied to the AHB peripheral

    It ensures that register file structure is consistent withspecification

    Unused areas are correctly defined

    Address map is correct : a write access places correct data

    in the physical register

    Each register is mapped to correct clock domain

  • 8/12/2019 5.1SpadariMNemerix

    26/32

    Formal verification of AHB interfaces

    Slave peripheral

    In-context test-bench: case 1

    AMBA VIP

    SlaveProject specific

    assertions

  • 8/12/2019 5.1SpadariMNemerix

    27/32

    Formal verification of AHB interfaces

    DMA controller

    In-context test-bench case 2

    AMBA VIP

    Slave Project specific

    assertions

    AMBA VIP

    Master

  • 8/12/2019 5.1SpadariMNemerix

    28/32

    Formal verification of AHB interfaces

    Advantage of in-context validation

    Most of control logic already validated in out-of-context

    verification Less likelihood to find a bug there

    Larger number of assertion required but most of them

    are similar and can be generated via a Perl script

    Using the regression script itself to generate assertions

    is not recommended since an error on input files will be

    reflected in both HDL and assertions

  • 8/12/2019 5.1SpadariMNemerix

    29/32

    Formal verification of AHB interfaces

    Example of bugs found (1)

    HCLK

    HADDR

    HTRANS NSQ

    HREADY

    IDLE IDLE NSQ IDLE

    Bug occurred on

    access marked in redA register access is

    done on the same

    cycle hand-shake

    completes andHREADY is released

    AMBA protocol is not

    violated however re-

    gister is not updated

    Reg.A A A A A

  • 8/12/2019 5.1SpadariMNemerix

    30/32

  • 8/12/2019 5.1SpadariMNemerix

    31/32

    Formal verification of AHB interfaces

    Benefit

    Modular approach reduces time spent on AMBA

    validation without compromising on accuracy andcompleteness

    RegGen script is fully reusable for future projects

    In previous projects SpecMan had been used to

    validate AMBA bus

    Once the test has been put in place several investigation

    has been done to ensure that all possible corner cases are

    covered: no guarantee that this goal is reached

    IFV approach is opposite: we check property on all possiblecases and then we restrict search space by ruling out false

    cases. Faster method and more comprehensive.

  • 8/12/2019 5.1SpadariMNemerix

    32/32

    Formal verification of AHB interfaces

    Conclusions

    VIP approach is a time-saving approach

    It allows to quickly verify standard bus & interfaces

    A re-usable methodology is essential to capitalize effort

    spent on assertion generation