JSON-for-VHDL icon indicating copy to clipboard operation
JSON-for-VHDL copied to clipboard

add jsonGetBooleanArray and jsonGetRealArray

Open eine opened this issue 6 years ago • 1 comments

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 https://github.com/Paebbels/JSON-for-VHDL/pull/7#discussion_r190026204, 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).

eine avatar May 23 '18 02:05 eine

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.

CLAassistant avatar May 23 '18 02:05 CLAassistant