Comments (3)
Hi Hodjat,
Interesting... I thought I had a test for coverpoints on enum types, but perhaps not. Can you add a testcase for both cases (enum, list) to the issue?
Thanks,
Matthew
from pyvsc.
Hi Matthew,
There is actually separate tests for the covergroup and coverage report, but not a combination for a coverpoint with cp_t=enum type
and the coverage report. Here is a small test:
import vsc
from enum import IntEnum, auto
from vsc import *
class my_e(IntEnum):
A = auto()
B = auto()
my_l = ["one", "two"]
@covergroup
class my_covergroup(object):
def __init__(self, a, b, c): # Need to use lambda for non-reference values
super().__init__()
self.cp1 = coverpoint(a,
options=dict(
auto_bin_max=64
),
bins=dict(
a=bin_array([], [1, 15])
))
self.cp2 = coverpoint(b, cp_t=my_e)
self.cp3 = coverpoint(c, cp_t=my_l)
a = 1
b = my_e.A
c = "one"
cg = my_covergroup(lambda: a, lambda: b, lambda: c)
cg.sample()
cg.dump()
vsc.report_coverage(details=True)
-Hodjat
from pyvsc.
Hi Hodjat,
Okay, there might be a couple of issues here. I uncovered a few issues with coverpoints on enumerated types. These are resolved now, and the only change needed to the enumerated-type portion of your test is that you need to wrap the parameter value for cp_t
with enum_t
:
pyvsc/ve/unit/test_coverpoint_bins.py
Lines 46 to 49 in 67735fc
The coverpoint on a string is a different story. PyVSC doesn't currently support coverpoints on string values -- not to say that it shouldn't ;-). Is there a reason you need to use a string instead of an enum? If so, please open a separate enhancement request for that.
By the way, I've released version 0.0.8 with the fixes needed for coverpoints on enum types.
Thanks and Best Regards,
Matthew
from pyvsc.
Related Issues (20)
- Can't have a randsz_list_t of randobj HOT 1
- ModuleNotFoundError: No module named 'pyboolector' HOT 10
- I'm not able to install pyvsc package, it fails when handling the pyboolector module HOT 3
- Selecting a list element from a list of bit-vectors returns an int HOT 3
- Setting constraint_mode to False retains the previous range/bounds of the constraint HOT 1
- Cannot make constraint under if_then soft HOT 13
- Cannot use random value as list index in a constraint HOT 2
- PicklingError when trying to pickle a VSC randobj HOT 2
- What is the relation between pyvsc and portable stimulus (pss)? HOT 2
- how to print coverage model HOT 3
- pyvsc performance dominated by stack frame operations in inspect module HOT 1
- import error _boolector_add
- Enh: Support Default bin (How to write "default" in vsc.coverpoint ?)
- install error for latest version macos HOT 3
- support for function incur in constraint functions HOT 5
- constraint solver error HOT 1
- Installing pyvsc fails on pyboolector for python 3.11.5 on Linux (Arch) HOT 3
- Distributions have higher priority than soft constraints HOT 1
- I can't install pyvsc for pypy3.10! HOT 4
- not_inside constraint unexpectedly reducing output set significantly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvsc.