Function for comparing simulator version strings?
See original GitHub issueIcarus Verilog master, reporting SIM_VERSION
“11.0 (devel)”, now supports bit selects (see https://github.com/steveicarus/iverilog/issues/323).
Thus, we need a way to selectively expect an error in our tests based on the version.
While I could compare with either the “11.0” string part, or the “10.” string of the released version (and assume nobody uses a version before 10), or treat the number part as a float etc., this gets all ugly for the general case. Since we have to support more such older/newer comparisons in the future (e.g. for upcoming GHDL improvements), does it make sense to provide a version comparison function that would gradually be extended to handle more simulators as needed?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Compare two version strings in Swift - Stack Overflow
Using Swift 3, application version strings can be compare using the compare function with the option set to numeric.
Read more >How to compare two app version strings in Swift - Sarunw
To compare app version strings, you can use compare(_:options:range:) with an option of .numeric . let version1 = "1.0.0" let version2 ...
Read more >Compare two Version numbers - GeeksforGeeks
Method to compare two versions. // Returns 1 if v2 is smaller, -1. // if v1 is smaller, 0 if equal. int versionCompare(string...
Read more >Simulink.sdi.compareRuns - MathWorks
This MATLAB function compares the data in the runs that correspond to runID1 and runID2 and returns the result in the Simulink.sdi.
Read more >versioning - Comparing two software versions in C#
As a solution to this problem, I propose a simple set of rules and requirements that dictate how version numbers are assigned and...
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
https://github.com/python/cpython/blob/master/Lib/distutils/version.py#L260-L262 - ha! …OTOH: https://github.com/python/cpython/blob/master/Lib/distutils/version.py#L296-L297
Interestingly,
LooseVersion
doesn’t like Aldec Active-HDL version numbers (taken from https://github.com/VUnit/vunit/pull/585/files#diff-8e7169ad9a827f7ebe5cb68193d01c63R423-R437):This bug is still present in Python 3.9-dev: https://travis-ci.org/github/cocotb/cocotb/jobs/707016738