file testo VHDL - capire dove sta l'errore nel seguente codice

D

dariopra

Guest
Ciao a tutti

sto cercando di scrivere un codice VHDL per la verifica, il quale dovrà effettuare la lettura di un file contenete gli ingressi ed effettuare la scrittura in un file contente i valori di uscita prodotti.
Sareste cortesi a capire dove sta l'errore nel seguente codice:
ARCHITECTURE rtl OF contatore_tb IS
SIGNAL start, stop, reset : STD_LOGIC;
SIGNAL valore_iniziale: INTEGER RANGE 0 TO 9;
SIGNAL clock: STD_LOGIC := '0';
SIGNAL y1, y2: INTEGER RANGE 0 TO 9;
SIGNAL y3: INTEGER RANGE 0  TO 1;
SIGNAL segments1, segments2, segments3: STD_LOGIC_VECTOR (7 DOWNTO 0);
BEGIN
valore_iniziale <= 0;
clock <=NOT clock AFTER 5 ns;


READ_file: PROCESS( clock )
FILE fpi: text open read_mode is "in.dat";
VARIABLE lni: line;
BEGIN
IF (clock'EVENT) AND (clock = '1') THEN
readline( fpi, lni );
read( lni, start );
read( lni, stop );
read( lni, reset);
IF endfile( fpi ) = true THEN
wait;
END IF;
END IF;
END PROCESS;

WRITE_file: PROCESS( clock )
FILE fpo: text open write_mode is "out.dat";
VARIABLE lno: line;
BEGIN
IF (clock'EVENT) AND (clock = '1') THEN
write( lno, y1 );
write( lno, y2 );
write( lno, y3 );
writeline( fpo, lno );
END IF;
END PROCESS;


Nel fare compile mi si presentano i seguenti error:
Error: CSVHEX0004: project.vhdl: (line 319): Overloaded Subprogram 'read' does not match its parameter profile
Error: CSVHEX0004: project.vhdl: (line 320): Overloaded Subprogram 'read' does not match its parameter profile
Error: CSVHEX0004: project.vhdl: (line 321): Overloaded Subprogram 'read' does not match its parameter profile
Error: CSVHDL0160: project.vhdl: (line 323): WAIT statements are not allowed in a PROCESS with a sensitivity list
Error: CSVHDL0265: project.vhdl: Skipping compilation of 0 file(s) due to errors compiling file 'project.vhdl'

Grazie
 

Welcome to EDABoard.com

Sponsor

Back
Top