diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-08-06 07:49:00 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-08-06 07:49:00 +0200 |
commit | 5034635df4c711dfa2dc3ae1faad49c49d018511 (patch) | |
tree | 9e5aacd67a88ae9f4852cd491ed147227d7e4242 /libraries/std/textio-body.vhdl | |
parent | 7687582d7faebfb3e3c691ccd57df15106f09046 (diff) | |
download | ghdl-5034635df4c711dfa2dc3ae1faad49c49d018511.tar.gz ghdl-5034635df4c711dfa2dc3ae1faad49c49d018511.tar.bz2 ghdl-5034635df4c711dfa2dc3ae1faad49c49d018511.zip |
vhdl: for time resolution, do not consider unit name from textio body.
For #881
Diffstat (limited to 'libraries/std/textio-body.vhdl')
-rw-r--r-- | libraries/std/textio-body.vhdl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libraries/std/textio-body.vhdl b/libraries/std/textio-body.vhdl index d01cb8bad..235da706a 100644 --- a/libraries/std/textio-body.vhdl +++ b/libraries/std/textio-body.vhdl @@ -287,9 +287,9 @@ package body textio is -- Note: we must start from unit, since all units are not a power of 10. -- Note: UN can be multiplied only after we know it is possible. This -- is a to avoid overflow. - if un <= 0 fs then + if un <= 0 sec then assert false report "UNIT argument is not positive" severity error; - un := 1 ns; + un := ns; end if; while val / 10 >= un or val / 10 <= -un loop un := un * 10; @@ -1034,7 +1034,7 @@ package body textio is is_neg := false; exp := 0; exp_neg := false; - res := 0 fs; + res := 0 sec; -- Look for exponent and unit name. -- Parse the string: this loop checks the correctness of the format, and @@ -1199,7 +1199,7 @@ package body textio is end if; when '0' to '9' => -- Leading "0" are not significant. - if l (i) /= '0' or res /= 0 fs then + if l (i) /= '0' or res /= 0 sec then res := res + char_to_nat (l (i)) * unit; unit := unit / 10; end if; |