Home > Archive > VHDL > October 2005 > "No feasible entries for subprogram"
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
"No feasible entries for subprogram"
|
|
| Castreuil Anthony 2005-10-14, 7:02 pm |
| Hi,
I'm pretty new to VHDL. I use ModelSim to write, compile and simulate
it.
I have to write a VHDL program that can output numbers into a textfile
from a for-loop.
This is the code I hacked together with code I found with Google, wich
compiles:
code:
use std.textio.all;
entity io is
end io;
architecture gedrag of io is
begin
process
file OUTFILE: text is out "C:\dataout.txt";
variable temp: line;
begin
for j in 1 to 9 loop
write (temp, j);
writeline (OUTFILE, temp);
end loop;
wait;
end process;
end gedrag;
Note that this compiles correctly (but I don't know how to see if it
works correctly)
I'm now trying to rewrite it with stuff from my Coursebook.
This is what I have:
code:
use std.textio.all;
entity io is --geenpoortennodig
end io;
architecture gedrag of io is
begin
process
type bestand is file of character;
file OUTFILE: bestand;
variable temp: line;
variable j: character;
begin
file_open(OUTFILE,"dataout.txt",write_mode);
for j in 1 to 9 loop
write (temp, j);
writeline (OUTFILE, temp);
end loop;
wait;
file_close(OUTFILE);
end process;
end gedrag;
This does not compile:
Compiler output is:
# ** Error: C:/Modeltech_xe_starter/examples/opdracht2d(19): No
feasible entries for subprogram "writeline".
# ** Error: C:/Modeltech_xe_starter/examples/opdracht2d(24): VHDL
Compiler exiting
Any suggestions ?
Thanks
| |
| Castreuil Anthony 2005-10-14, 7:02 pm |
| > variable temp: line;
> variable j: character;
>
I want to add that I already changed "variable j: integer;" like it
should, but that doesn't compile either
| |
|
| The only difference I see is the file type you have declared "OUTFILE".
Modelsim gives the error "No
feasible entries for subprogram "writeline". " when either the
"writeline" procedure does not exists or it exists but there is a type
mismatch in one of its arguments.
You may want to recheck if your course book also gives you a
corresopnding writeline procedure as you had a seperate procedure to
open a file.
To check you first code, after you compile do a vsim and run. Then you
may check the file dataout.txt for the output.
| |
| James Unterburger 2005-10-17, 9:57 pm |
| The two procedures
file_open(file F : bestand;
External_Name : in STRING;
Open_Kind : in FILE_OPEN_KIND := READ_MODE);
and
file_open(Status : out FILE_OPEN_STATUS;
file F : bestand;
External_Name : in STRING;
Open_Kind : in FILE_OPEN_KIND := READ_MODE);
are implicitly defined when the file type "bestand" is declared.
So the call to file_open() will compile with no problems.
There is no visible procedure "writeline()" that takes a FILE object of
type "bestand". The package STD.TEXTIO defines only a procedure thus:
writeline(file F : text, L : inout LINE);
which will work only for a FILE actual parameter of type "text".
|
|
|
|
|