write(L, bitout(0)); -> cool but where yer two arguments?

Joined
Oct 2, 2009
Messages
19
Reaction score
0
So I generated some std_logic bits for bitout(i). I had something like
Code:
if b(i-1) > "0100" then
 bitout(i) <= '0';
elsif b(i-1) < "0100" then
 bitout(i) <='1';
elsif b(i-1) = "0100" then
 bitout(i) <='X';
end if;
PS: Please someone tell me I can just write something simpler for this, like
Code:
if b(i-1) > ....
elsif b(i-1) < ....
else ...

Example is
Code:
use STD.textio.all;

process
file output : text open WRITE_MODE is "nice_file.txt";
variable L : line;

begin
write(L, bitout(0));
...
write(L, bitout(7));
writeline(output, L);
end;

For write(L, bitout(0)) through to bitout(7) (for eg.), error message was "write expects 2 arguments". What 2 arguments are they asking for?
 
Joined
Oct 2, 2009
Messages
19
Reaction score
0
The solution:
Code:
library IEEE;
use ieee.std_logic_arith;
use std.textio.all;
use ieee.std_logic_textio.all;

good day good night
 

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,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top