Metadata-Version: 2.1
Name: cocotb-coverage
Version: 0.1.dev0
Summary: Functional Coverage and Constrained Randomization Extensions for Cocotb
Home-page: https://github.com/mciepluc/cocotb-coverage
Author: Marek Cieplucha
Author-email: 
License: BSD
Description: # cocotb-coverage
        Functional Coverage and Constrained Randomization Extensions for Cocotb
        
        [![Documentation Status](https://readthedocs.org/projects/cocotb-coverage/badge/?version=latest)](http://cocotb-coverage.readthedocs.org/en/latest/)
        
        This package allows you to use constrained randomization and functional coverage techniques known from CRV (constrained random verification) and MDV (metric-driven verification) methodologies, available in SystemVerilog or _e_. Such extensions enable the implementation of an advanced verification environment for complex projects.
        
        The implemented functionality is intended to be easily understandable by SystemVerilog users and provides significant extensions compared to Hardware Verification Languages. 
        
        References:
        * cocotb core package - [cocotb](https://github.com/potentialventures/cocotb)
        * Constraint Solving Problem resolver used in this project - [python-constraint](https://github.com/python-constraint/python-constraint)
        * [documentation](https://cocotb-coverage.readthedocs.io/en/latest/) 
        * DVCon 2017 Paper - [New Constrained Random and MDV Methodology using Python](http://events.dvcon.org/2017/proceedings/papers/02_3.pdf)
        * DVCon 2017 Presentation - [SLIDES](http://events.dvcon.org/2017/proceedings/slides/02_3.pdf)
        * example advanced verification project - [apbi2c_cocotb_example](https://github.com/mciepluc/apbi2c_cocotb_example)
        
        Simple example below:
        ```Python
        # point represented by x and y coordinates in range (-10,10)
        class Point(crv.Randomized):
        
            def __init__(self, x, y):
                crv.Randomized.__init__(self)
                self.x = x
                self.y = y
        
                self.add_rand("x", list(range(-10, 10)))
                self.add_rand("y", list(range(-10, 10)))
                # constraining the space so that x < y
                self.add_constraint(lambda x, y: x < y)
        
        ...
        
        # create an arbitrary point
        p = Point(0,0)
        
        for _ in range (10):
            
            # cover example arithmetic properties
            @CoverPoint("top.x_negative", xf = lambda point : point.x < 0, bins = [True, False])
            @CoverPoint("top.y_negative", xf = lambda point : point.y < 0, bins = [True, False])
            @CoverPoint("top.xy_equal", xf = lambda point : point.x == point.y, bins = [True, False])
            @CoverCross("top.cross", items = ["top.x_negative", "top.y_negative"])
            def plot_point(point):
                ...
            
            p.randomize()  # randomize object
            plot_point(p)  # call a function which will sample the coverage
                      
        ```
        
Platform: any
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Requires-Python: >=3.0
Description-Content-Type: text/markdown
