cocotb 1.4 issue in scoreboard with hexdiffs and hexdumps
See original GitHub issueSince release 1.4 where strings passed to cocotb.utils.hexdump()
and cocotb.utils.hexdiffs()
are deprecated, I found out that I experienced issues with the scoreboard results when tests fail.
Although all my tests are updated to work with bytes instead of string data, it seems that inside the scoreboard code the got
and exp
data is still internally converted to strings before the cocotb.utils.hexdump()
and cocotb.utils.hexdiffs()
are called. It results in a hanging behaviour of the simulator. The same applies for the log.info()
where expected and received data is logged inside this piece of code.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:24 (17 by maintainers)
Top Results From Across the Web
Release Notes — cocotb 1.7.2 documentation
Its latest version resolves an issue for users on RedHat Enterprise Linux (RHEL) 8 and Python 3.8, where the correct Python library would...
Read more >cocotb/Lobby - Gitter
Hi all, i am confused since the 1.4 release when test results differ. The release notes say that passing str to hexdump and...
Read more >cocotb Documentation - Read the Docs
Using a Scoreboard to Track Testbench Errors . ... Assuming you have installed cocotb as described in Installing ... 1.4.1 Architecture.
Read more >Library Reference — cocotb 1.5.0.dev0 documentation
Deprecated since version 1.4: Use a return statement instead; this works in all supported versions of Python. exception cocotb.result.
Read more >sig/sigs.yaml · openEuler/community - Gitee.com
src-openeuler/jboss-jacc-1.4-api. - src-openeuler/jboss-jacc-1.5-api ... src-openeuler/internal-issue ... src-openeuler/perl-Parallel-Scoreboard.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feels like a problem we should delegate to pytest, which already has a fair number of comparison tools, source here:
@hjwmedenblik @eric-wieser The use of
str
is causing serious problems. Passing bytes tostr()
returns the representation, it does not decode the string. The resulting string is not equivalent to the original bytes, for exampleb'\x00\x01\x02\x03'
becomes the string"b'\x00\x01\x02\x03'"
which has 19 characters. Yourexp
value as a string is 6083 characters long. This is not only incorrect, but explodes that O(n**2) algo and makes it seem to hang.We need to fix the scoreboard.I actually have no idea what the intent of the code in the scoreboard is. I’m guessing it was only supposed to ever be used with BinaryValue, but even thenhexdiffs
isn’t appropriate sinceBinaryValue.__str__
never returned a hex string. My inclination is to just change the scoreboard to do simpler reporting like I suggested above. But I also think that @hjwmedenblik should just stop using the scoreboard. I remember we talked on the gitter about how I was trying to get rid of the testbenching components because they were “fake useful”, I think you understand now.