Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Text io in Xilinx

 
Thread Tools Search this Thread
Old 05-05-2005, 01:27 PM   #1
Default Text io in Xilinx


Hi everyone,

I've got some simple code, shown below:
entity hello_world is -- test bench (top level like "main")
end entity hello_world;

library IEEE; -- but may need other libraries
use IEEE.std_logic_1164.all; -- basic logic types
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
Library STD;
use STD.textio.all; -- basic I/O

architecture test of hello_world is -- where declarations are placed
begin
my_print : process is -- a process is parallel
variable my_line : line; -- type 'line' comes from
textio
begin

wait;
end process my_print;
end architecture test;

Xilinx complains that

"ERROR:HDLParsers:3312 - C:/Xilinx/projects/test/test_io.vhd Line 21.
Undefined symbol 'line'."

I had a look at the Xilinx XST User Guide, and page 284 clearly shows
that 'line' is a supported type! I read a couple of other posts, and
they suggested that I enclose the code with -- pragma translate_off /
-- pragma translate_on, but Xilinx complained that:

"ERROR:HDLParsers:164 - C:/Xilinx/projects/test/test_io.vhd Line 27.
parse error, unexpected $"

What's going on??

Regards

Taras



Taras_96
  Reply With Quote
Old 05-07-2005, 05:57 PM   #2
info_
 
Posts: n/a
Default Re: Text io in Xilinx
Taras_96 wrote:
> Hi everyone,
>
> I've got some simple code, shown below:
> entity hello_world is -- test bench (top level like "main")
> end entity hello_world;
>
> library IEEE; -- but may need other libraries
> use IEEE.std_logic_1164.all; -- basic logic types
> use IEEE.STD_LOGIC_ARITH.ALL;
> use IEEE.STD_LOGIC_UNSIGNED.ALL;
> Library STD;
> use STD.textio.all; -- basic I/O
>
> architecture test of hello_world is -- where declarations are placed
> begin
> my_print : process is -- a process is parallel
> variable my_line : line; -- type 'line' comes from
> textio
> begin
>
> wait;
> end process my_print;
> end architecture test;
>
> Xilinx complains that
>
> "ERROR:HDLParsers:3312 - C:/Xilinx/projects/test/test_io.vhd Line 21.
> Undefined symbol 'line'."
>
> I had a look at the Xilinx XST User Guide, and page 284 clearly shows
> that 'line' is a supported type! I read a couple of other posts, and
> they suggested that I enclose the code with -- pragma translate_off /
> -- pragma translate_on, but Xilinx complained that:
>
> "ERROR:HDLParsers:164 - C:/Xilinx/projects/test/test_io.vhd Line 27.
> parse error, unexpected $"
>
> What's going on??
>



Do you want to _synthesize_ writeline and access types (line) ?
Where do you expect the text to go to in the silicon ?

Files are for simulation (ModelSim), not for silicon (XST).

you may find useful to use file output in synthesizable code
for debug purpose, in which case you should embed this code within
the correct pragmas (in doubt, use synopsys' which are usually recognized).

Bert Cuzeau


info_
  Reply With Quote
Old 05-08-2005, 04:45 AM   #3
Taras_96
 
Posts: n/a
Default Re: Text io in Xilinx
Thanks Bert,

I was getting confused about what Xilinx has to offer. I was using
'Check Syntax' to check unsynthesisable code, expecting it to check to
make sure it was correct VHDL, but it must actually check to see if its
synthesisable as well. Why doesn't Xilinx support writing files?

Thanks

Taras



Taras_96
  Reply With Quote
Old 05-10-2005, 06:07 PM   #4
Andy Peters
 
Posts: n/a
Default Re: Text io in Xilinx
Taras_96 wrote:
> Thanks Bert,
>
> I was getting confused about what Xilinx has to offer. I was using
> 'Check Syntax' to check unsynthesisable code, expecting it to check

to
> make sure it was correct VHDL, but it must actually check to see if

its
> synthesisable as well. Why doesn't Xilinx support writing files?


The question was already answered: how is the synthesis tool supposed
to know how to put file I/O into a chip? It can't! File I/O is for
simulation use only. Remember that synthesis supports only a small
subset of the language -- a not-so-minor detail that the XST
documentation makes clear.

Another question: why are you using:

use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

I thought these were deprecated in favor of numeric_std.

--a



Andy Peters
  Reply With Quote
Old 05-31-2005, 01:38 PM   #5
Taras_96
 
Posts: n/a
Default Re: Text io in Xilinx
I was getting confused by the difference between Xilinx and Modelsim.
I was thinking (for some reason) that Modelsim is a subset of Xilinx,
which isn't true. In my last message I was asking why it wasn't
possible to write files for simulation purposes only, thinking that
because Modelsim was a subset of Xilinx, it should be able to simulate.


I was using those libraries because they were the first ones to pop up
in Andrew Rushton's book - I think I might change to numeric_std...

Thanks

Taras



Taras_96
  Reply With Quote
Old 06-03-2005, 08:38 AM   #6
Neo
 
Posts: n/a
Default Re: Text io in Xilinx
hey dude, where do you come from, carelessly dabbling with free tools
without trying to know what its about.
Please dont assume that everything that runs though a software is a
software program.



Neo
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Put cursor at the end of input text peace2007 Software 1 10-17-2007 11:41 AM
VHDL (Assigning pins in xilinx) amanpervaiz Hardware 3 12-02-2006 04:37 PM
Memories on TV 3 and Text alca11 Software 0 07-20-2006 09:32 PM
SONY DVD RW DW-G120A SOMETIMES FAILS...... atlantic965 DVD Video 0 06-18-2006 10:36 PM
Burn process failed - help! Log file posted for help troubleshooting Michael Mason DVD Video 1 08-16-2004 09:24 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46