Closed Kuri-aldec closed 1 year ago
Hello,
Regarding the CoverCross, an error occurs when three CoverPoints are set. When I set two CoverPoints, it works fine without error. Does CoverCross support two CoverPoints only? If the setting method is different, would you teach it?
TxMod_cover = coverage_section ( CoverPoint ("TxMod.dt1", xf = lambda data_bit, stop_bit, parity_bit: data_bit, bins = [0, 1, 2, 3], bins_labels = ["l_bit5", "l_bit6", "l_bit7", "l_bit8"]), CoverPoint ("TxMod.st1", xf = lambda data_bit, stop_bit, parity_bit: stop_bit, bins = [0, 1], bins_labels = ["stop_1", "stop_2"]), CoverPoint ("TxMod.pt1", xf = lambda data_bit, stop_bit, parity_bit: parity_bit, bins = [1, 3], bins_labels = ["parity_o", "parity_e"]), CoverCross ("TxMod.cross_cov", items = ["TxMod.dt1", "TxMod.st1", "TxMod.cross_cov"]) ## CoverCross ("TxMod.cross_cov", items = ["TxMod.dt1", "TxMod.st1"]) )
I got:
# COUT: Traceback (most recent call last): # COUT: File "/usr/local/lib64/python3.9/site-packages/cocotb/__init__.py", line 233, in _initialise_testbench # COUT: _initialise_testbench_(argv_) # COUT: File "/usr/local/lib64/python3.9/site-packages/cocotb/__init__.py", line 316, in _initialise_testbench_ # COUT: regression_manager = RegressionManager.from_discovery(top) # COUT: File "/usr/local/lib64/python3.9/site-packages/cocotb/regression.py", line 160, in from_discovery # COUT: return cls(dut, tests) # COUT: File "/usr/local/lib64/python3.9/site-packages/cocotb/regression.py", line 139, in __init__ # COUT: for test in tests: # COUT: File "/usr/local/lib64/python3.9/site-packages/cocotb/regression.py", line 189, in _discover_tests # COUT: module = _my_import(module_name) # COUT: File "/usr/local/lib64/python3.9/site-packages/cocotb/regression.py", line 72, in _my_import # COUT: mod = __import__(name) # COUT: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load # COUT: File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked # COUT: File "<frozen importlib._bootstrap>", line 680, in _load_unlocked # COUT: File "/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module # COUT: exec(co, module.__dict__) # COUT: File "/home/kuri/temp/cocotb_sample/uart_sample/test_cover/test_uart.py", line 16, in <module> # COUT: CoverCross ("TxMod.cross_cov", items = ["TxMod.dt1", "TxMod.st1", "TxMod.cross_cov"]) # COUT: File "/usr/local/lib/python3.9/site-packages/cocotb_coverage/coverage.py", line 677, in __init__ # COUT: coverage_db[cp_names].detailed_coverage.keys()) # COUT: File "/usr/local/lib/python3.9/site-packages/cocotb_coverage/coverage.py", line 740, in detailed_coverage # COUT: return self._hits # COUT: AttributeError: 'CoverCross' object has no attribute '_hits'
I'm so sorry I found a typo in this description after this. So, this issue is resolved
Hello,
Regarding the CoverCross, an error occurs when three CoverPoints are set. When I set two CoverPoints, it works fine without error. Does CoverCross support two CoverPoints only? If the setting method is different, would you teach it?
I got: