On Wed, Nov 21, 2012 at 8:53 AM, René Doß <[email protected]> wrote:

>
> I want to use an textio function. The process below is from Peter Ashenden
> "The designer guide to VHDL".
> The time output like wirten produces an error. The subprogram is not found.
> Can anyone give me a hint? how can I use the timeoutput?
>
> Thanks
> René
>
>
> process(board_clk)
>   file log :text open write_mode is "buslog.txt";
>   variable trace_line :line;
>   begin
>     if rising_edge (board_clk) then
>
>       if Hbus_in.hrd='1' or Hbus_in.hwrite='1' then
>        write (trace_line, now, justified=> right, filed=>10, unit => us);
> <---- this is line 189
>         if Hbus_in.hrd='1' then
>           write (trace_line,'R');
>         else
>           write (trace_line,'W');
>         end if;
>        writeline(log,trace_line);
>       end if;
>     end if;
>   end process;
>
>
> ./rtl/MAIS_AHBlight.vhd:189:**14: can't find a subprogram for this
> overload call
> ghdl: compilation error
> make: *** [all] Error 1
>
>
>  ghdl -a -Wa,--32 --ieee=synopsys --work=work --workdir=work
> ../rtl/MAIS_AHBlight.vhd
>


Hmmm... I do see the following in vhdl/src/std/textio.v93

  --  UNIT must be a unit name declared in std.standard.  Of course, no
rules
  --  in the core VHDL language prevent you from using a value that is not a
  --  unit (eg: 10 ns or even 5 fs).
  --  An assertion error message is generated in this case, and question
mark
  --  (?) is written at the place of the unit name.
  procedure write
    (l: inout line; value : in time;
    justified: in side := right; field: in width := 0; unit : in TIME :=
ns);

Oh, is it your typo?
You wrote "filed" instead of "field".

-Pascal
-- 
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to