Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"No feasible entries for subprogram"

901 views
Skip to first unread message

Castreuil Anthony

unread,
Oct 14, 2005, 12:34:40 PM10/14/05
to
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;
[/code]
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;
[/code]

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

unread,
Oct 14, 2005, 12:36:25 PM10/14/05
to
> 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


sudhi

unread,
Oct 14, 2005, 2:29:32 PM10/14/05
to
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

unread,
Oct 17, 2005, 10:51:56 PM10/17/05
to
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".

0 new messages