Skip to content

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.

@Paebbels Paebbels self-requested a review May 23, 2018 05:26
@Paebbels Paebbels self-assigned this May 23, 2018
@eine eine force-pushed the arrays branch 4 times, most recently from 0549653 to f783619 Compare January 13, 2020 03:08
@@ -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.

@yangyt96
Copy link

yangyt96 commented May 7, 2025

@Paebbels is this still active? A wish for this PR from Trumpf XD. Also wishes for real and integer type

@Paebbels
Copy link
Owner

Paebbels commented May 8, 2025

@yangyt96 I know, the repository isn't broken and it's actively used e.g. by VUnit. I'm open for contributions and updates. There is also a potential request by OSVVM, if a protected type based variant could be added usable in simulation with better speed and resource usage. (In the synthesizable variant, all data structures are pre-allocated to limit the maximum usage.)

For which tool do you need it?

  • I need to check how I can check it on all synthesis tools and synthesis versions
  • I need to check how I can check all simulators as well.

@yangyt96
Copy link

yangyt96 commented May 8, 2025

Currently we don't use it for synthesis, only for simulation. I use intensively with riviera-pro.

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.

4 participants