Merged
Conversation
|
|
Paebbels
requested changes
Jan 12, 2020
Owner
|
When editing files to reflect the reviews above, please do also these minor changes:
|
eaebf6d to
19ec558
Compare
Paebbels
reviewed
Jan 12, 2020
df837ff to
3288575
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coming from VUnit/vunit#588 and VUnit/vunit#595, the main purpose of this PR is to add the possibility to encode generic strings, in order to work around the limitations of some simulators which do not accept all the symbols.
This is achieved by adding a new package (
Encodings). Currently, it contains functionsb16encodeandb16decodeonly. Nonetheless, it can be extended in the future to support other encodings such as base32 or base64. Precisely, the naming of the functions mimicks https://docs.python.org/3/library/base64.html.A function named
decodeis used injsonLoadto detect and decode the input, if required. As a result, users don't need to change their VHDL code to use new feature. Decoding is done before loading the JSON file. Hence, it is possible to encode the path to the JSON file, should any simulator have issues with\,/,:, etc. and should the length also be limited. The detection logic can be significantly improved: https://stackoverflow.com/questions/18419428/what-is-the-minimum-valid-jsonA new testbench (
Examples/Encodings_VUnit.vhdl) is added, where encoding/decoding functions are tested independently from JSON features. Apart from that, exampleBoards_VUnit.vhdlis extended:stringified JSON generic,b16encoded stringified JSON generic,JSON file path genericandb16encoded JSON file path generic.test_board0andtest_board1are described. These can be potentially saved in a separate package, to be used in other testbenches.run.pyfile,from base64 import b16encodeis used to encode the stringified JSON/object.Apart from adding 'Encodings', since this projects has not been updated in 1.5y, I added other modifications to this PR:
jsonLoadFilewas merged intojsonLoad, but the former is still shown in the README and used in Boards2. It is fixed.Boards.cmdfile is added.Tests/VUnitandTests/ghdlare executed..travis.ymlis removed./cc @LarsAsplund @felixn