Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
731 Views

function wait

Hi, I´m a begginer! 

 

And a i´m trying to read a database from a .dat arquive, and i had trouble with the function wait... i took the program from the internet 

 

It appears on the srcreen : 

Error (10533): VHDL Wait Statement error at read_site.vhd(33): Wait Statement must contain condition clause with UNTIL keyword 

 

my program is this one 

-- versao VHDL-1993capa_1ra 

--  

ENTITY read_site IS 

GENERIC(n : INTEGER := 2); 

PORT(dado_lido : OUT STRING(1 TO n); 

tamanho : OUT NATURAL); -- 

END read_site; 

 

ARCHITECTURE teste OF read_site IS 

TYPE vetor_2d IS ARRAY(0 TO 7) OF STRING(1 TO 3); 

CONSTANT dado_escrito : vetor_2d := ("abc","def","ghi","jkl","mno","pqr","stu","vxz"); 

 

TYPE arquivo_u IS FILE OF STRING;  

FILE arq_rd : arquivo_u; 

TYPE arquivo_c IS FILE OF STRING(1 TO 3);  

FILE arq_wr : arquivo_c; 

BEGIN 

escreve_le: PROCESS 

VARIABLE dado_lido_v : STRING(1 TO n); 

VARIABLE tamanho_v : NATURAL; 

BEGIN 

FILE_OPEN(arq_wr, "\vhd\dado_j.dat",Write_Mode); 

FOR i IN 0 TO 7 LOOP  

WRITE(arq_wr, dado_escrito(i));  

END LOOP;  

FILE_CLOSE(arq_wr);  

 

FILE_OPEN(arq_rd, "\vhd\dado_j.dat",Read_Mode); 

WHILE NOT ENDFILE(arq_rd) LOOP  

READ(arq_rd, dado_lido_v, tamanho_v);  

dado_lido <= dado_lido_v;  

tamanho <= tamanho_v; 

WAIT FOR 10 ns;  

END LOOP;  

WAIT; 

END PROCESS escreve_le; 

END teste; 

 

There is something to wrong in them? 

 

thanks
0 Kudos
0 Replies
Reply