Hi Dave,
Quick turn-around. Thanks.
Perhaps for the TIME version of to_string, the 4th parameter should be
timebase? Would using the simulation time base be a better, more meaningful
choice here? If so, I think we still need a deferred constant for
simulation resolution, but we also would need one for timebase (or default
timebase).
-Steve Bailey
> -----Original Message-----
> From: owner-vhdl-200x-ft@eda.org
> [mailto:owner-vhdl-200x-ft@eda.org] On Behalf Of David Bishop
> Sent: Tuesday, August 24, 2004 12:18 PM
> To: vhdl-200x-ft@eda.org
> Subject: [vhdl-200x-ft] to_string for real and time
>
> From last night's telecon again:
>
> function to_string (
> VALUE : in REAL;
> JUSTIFIED : in SIDE := right;
> FIELD : in WIDTH := 0;
> format : in string := " "
> ) return STRING ;
> Will also accept "f" "e", "E", "g" and "G" notation (just
> like the C printf command). Defaults to a 'image
> Example "8.3f" for 3.14 will give you " 3.140"
> (This should be fun to implement, maybe call the PLI "printf" command)
>
>
> function to_string (
> VALUE : in TIME;
> JUSTIFIED : in SIDE := right;
> FIELD : in WIDTH := 0;
> resolution : in TIME := Sim_Resolution
> ) return STRING ;
> Where "Sim_Resolution" will be a differed constant comming
> from package std.standard.
>
> This if you do a to_string (1.6 us) with a simulator
> resolution set to "1 ns" then you will get "1600.0 ns" as the
> resulting string.
> Question though, what do you get if your resolution is "10 ps"?
>
Received on Tue Aug 24 16:23:21 2004
This archive was generated by hypermail 2.1.8 : Tue Aug 24 2004 - 16:23:27 PDT