Hi Tristan,

> Looks like you have found a bug in GHDL.  Could you try with GHDL 0.29 ?
> If the bug is still there, could you send byte2file.vhd to me ?

Yes, 0.29 is the same -- I tried the precompiled archive provided on the
website. My "bytefile.vhd" is a simple debugging-device to log certain
signals into files. I will attend it to this e-mail. If necessary, maybe
someone can make suggestions for a little improvements? I'm just
beginning to learn VHDL...

Greetings
Martin

---------

library ieee;
use ieee.std_logic_1164.ALL;
use ieee.numeric_std.all;

-- Textaus/eingabekram
library std;
use std.textio.ALL;

entity byte2file is
  generic (
    filename : string := "vhdl.byte2file.log.default";
    bitlength_dataword_in : natural range 1 to 32 := 8
  );
        port (
    rst       : in  std_ulogic := '0';
    data_in   : in  signed( bitlength_dataword_in-1 downto 0 ) :=
(others => '0');

    do_write  : in  std_logic := '0'
  );
end byte2file;

architecture behaviour of byte2file is

begin

  write_words: process( rst, do_write )

  file out_file : text open write_mode is filename;
  variable out_line : line;
  variable out_data : integer;

  begin
    if (rst='1') then
      out_data := 0;
    elsif ( rising_edge(do_write) ) then

      out_data := to_integer(resize(data_in,32));--kann logischerweise
keine Zahlen groesser als Integer abspeichern
        -- TODO: Die 32 irgendwie per Attribute aus dem out_data
raushohlen

      write(out_file,integer'image(out_data));
      writeline(out_file, out_line);

    end if;
  end process;

end behaviour;


_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to