File-IO

Gast #579093
Lesenswert?

Hallo Leute!

Ich möchte für Simulationszwecke unter VHDL ein File schreiben.

z.B.
architecture ....
file fh_file: bitfile open write_mode is "c:\testfile.dat";
begin
...

Der Compiler meldet folgendes:
Unknown identifier "bitfile"
FILE declaration must have a subtype indication that is a file type


Welche Library oder welches Package muss ich implementieren, damit das 
Öffnen des Files funktioniert oder habe ich einen anderen Fehler 
gemacht?

Danke Leute.
Tschüss
Martin
#579113
Lesenswert?

Bei mir hat das Schreiben so funktionieren:

process
  type characterFile_Typ is file of character;
  file f: characterFile_Typ open write_mode is "fifo.ts";
  variable c:character;
  variable i:integer;
begin
      wait until(XXX);
      i:=CONV_INTEGER(UNSIGNED(data_out(7 downto 0)));
      c:=character'val(i);
      write(f=>f,value=>c);
end;

Gruß
Jörn

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren