VUnit / vunit

VUnit is a unit testing framework for VHDL/SystemVerilog
http://vunit.github.io/
Other
696 stars 250 forks source link

check_equal support for fixed_pkg resolve #909 #989

Closed abaebae closed 3 months ago

abaebae commented 4 months ago

How do you want to handle the string representation of fixed_pkg types? I used the to_string function from the fixed_pkg. Do you prefer the to_nibble_string style or a merge of both styles?

creiter64 commented 4 months ago

I'm not an expert in VUnits code, but this looks quite good. About the string representation, I think since fixed_pkg already has one and it's part of the VHDL standard, it should be used.

umarcor commented 4 months ago

After updating license copyright years and running black, the remaining CI errors are related to the code in this PR. Check the following format mismatch:

Got:

   logger = check

   log_level = pass

   msg = Equality check passed - Got 1010.0101 (1.03125e1).

   file_name:line_num = :0

expected:

   logger = check

   log_level = pass

   msg = Equality check passed - Got 1010.0101 (10.3125).

   file_name:line_num = :0
abaebae commented 4 months ago

It seems that every simulator had a slightly different default format for the to_string(real) implementation. The format is now explicitly set to the format string "%f". That should lead to a consistent output style. The format style is up for debate.

umarcor commented 3 months ago

See #997.