VHDL / Compliance-Tests

Tests to evaluate the support of VHDL 2008 and VHDL 2019 features
https://vhdl.github.io/Compliance-Tests/
Apache License 2.0
25 stars 7 forks source link

Test to_string function and 'reflect attribute in tb_041 #48

Closed nickg closed 1 year ago

nickg commented 1 year ago

At the moment tb_041 defines a generic to_string function but doesn't actually call it. This patch adds a few quick sanity tests.

bpadalino commented 1 year ago

Is it guaranteed in the LRM that the element names will all be capitalized? Should the to_string function ensure that element names in records are all the same case when able to be converted?

Note that is there is an issue with the to_string function, I believe it was lifted from the LRM itself - so any issue with it should be addressed in the LRM as well.

nickg commented 1 year ago

It just says

Returns the element name of the element_idx-th record element.

Which seems to leave it unspecified.

nickg commented 1 year ago

Is it guaranteed in the LRM that the element names will all be capitalized? Should the to_string function ensure that element names in records are all the same case when able to be converted?

I changed the test to convert to upper case if not already.

Note that is there is an issue with the to_string function, I believe it was lifted from the LRM itself - so any issue with it should be addressed in the LRM as well.

The to_string for arrays didn't work but was quite different from what is in the LRM. However the LRM version also has errors which I've fixed here. @Paebbels could you have a look? We should fix this in the next LRM revision too.