Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add jsonGetBooleanArray and jsonGetRealArray #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eine
Copy link
Collaborator

@eine eine commented May 23, 2018

jsonGetBooleanArray and jsonGetRealArray are added, with the same implementation approach as jsonGetIntegerArray: see #7.

However, there is an issue with the current implementation: boolean'value and real'value are used. As explained in #7 (comment), this is not supported by Vivado. Therefore, to_boolean(str : STRING) return BOOLEAN and to_real(str : STRING) return REAL need to be written. to_natural_dec can be used as a reference.

Furthermore, since time_vector is also defined in VHDL 2008, the same approach can be followed to implement jsonGetTimeArray(JSONContext : T_JSON; Path : string) return time_vector. This would require a to_real(str : STRING) return REAL function, along with jsonIsTime(JSONContext : T_JSON; Path : STRING) return BOOLEAN (which does not exist, yet).

@CLAassistant
Copy link

CLAassistant commented May 23, 2018

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -1 +1 @@
["test",[true,false,18,null,"hello"],[9,8],3324.34,832432,"world"]
["test",[true,false,18,null,"hello"],[9,8],3324.34,832432,[2.5, 3.33, 5.25],"world"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove 2.5, .

Boards0.json was derived from Boards1.json as the maximum possible JSON example, that doesn't cause Vivado to explode. Synthesis time was exponentially growing by each character in the string.

If you need more complex test, please extend other files or create a new input file. I would like to keep this string short and simple until Vivado can handle strings efficiently.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Nonetheless, note that this PR won't work in Vivado as is. See first comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants