How to modify this VHDL code?

Status
Not open for further replies.

sally wang

Newbie level 5
Joined
Jan 2, 2008
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,336
Hi, I'm now trying to write a VHDL code for LED controll system. But why there is always an error says: 'Object O6 of mode OUT can not be read'. How to modify that?

entity led1 is
Port ( IO_L1P_D31_LC_1 : in STD_LOGIC;
IO_L1P_D30_LC_1 : in STD_LOGIC;
O6,O4 : out STD_LOGIC);
end;

architecture Behavioral of led1 is
signal I6,I4: STD_LOGIC;
begin
process(IO_L1P_D30_LC_1,IO_L1P_D30_LC_1)
begin
I6 <= IO_L1P_D31_LC_1;
I4 <= IO_L1P_D30_LC_1;
end process;

O6 <= '1' when (O6=I6) else '0';
O4 <= '0' when (O4=I4) else '1';

end;
 

easiest way is to make o6,o4 as inout i.e. bidirectional
Coz for "O6 <= '1' when (O6=I6) else '0';" you are reading the value from o6 which is not allowed for a port in out mode.
 

    sally wang

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…