std.textio and ieee.std_logic_textio procedure overloading

M

Magne Munkejord

Hi,

I have problems using both std.textio.all and ieee.std_logic_textio.all
When I try to compile ModelSim gives me an error: Subprogram 'write' is
ambiguous. Suitable definitions exist in packages 'std_logic_textio' and
'textio'.

When i take a look at source code for std_logic_textio it says:
-- Purpose: This package overloads the standard TEXTIO procedures
-- READ and WRITE.

This is exactly what I want it to do. Any tips how to make this happen?
 
M

Magne Munkejord

Magne said:
Hi,

I have problems using both std.textio.all and ieee.std_logic_textio.all
When I try to compile ModelSim gives me an error: Subprogram 'write' is
ambiguous. Suitable definitions exist in packages 'std_logic_textio' and
'textio'.

When i take a look at source code for std_logic_textio it says:
-- Purpose: This package overloads the standard TEXTIO procedures
-- READ and WRITE.

This is exactly what I want it to do. Any tips how to make this happen?

I found a solution:
write(my_line, string'("my_string");
instead of:
write(my_line, "my_string");

(my_line is type LINE as defined in std.textio)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top