Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > VHDL file IO (using file as variable)

Thread Tools

VHDL file IO (using file as variable)

veevee1 veevee1 is offline
Junior Member
Join Date: Mar 2007
Posts: 6

If I have multiple files and depending on the conditions, there is a certain file to use, is there a way to assign the content of the file to a signal/variable? It would be helpfull to make this assignment only once after which I could use the assigned "file".

for example I have two files (vhdl 87 syntax)
file interlaced_data text is "./input_data_interlaced.trc"
file progressive_data text is "./input_data_progressive.trc"

--assign file to "used_data"
if interlaced_enable = '1' then
used_file <= interlaced_data;
used_file <= progressive_data;
end if;

readline(used_file,filerow); --here the selected file is read
Is there a way to do this? I have a problem to define "used_file" so that the compiler would accept it.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL'87: avoiding FATAL ERROR when "Failed to open VHDL file" occurs VHDL 2 09-04-2007 09:06 PM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
VHDL 2002 vs VHDL 1993 dude VHDL 1 03-23-2006 01:18 PM
multiD-vhdl: Multi Dimensional Arrays (allowing generics on each dimension) for VHDL (including ports) VHDL 2 03-21-2006 04:05 PM
what's the difference between VHDL 93 CONCATENATION and VHDL 87 CONCATENATION? walala VHDL 3 09-18-2003 04:17 AM