case statement: VHDL

Joined
Oct 19, 2006
Messages
8
Reaction score
0
Hello there!!
I have question about Case statement, can I restrict the expression input of case statement, to make it more clear I will review an example:

--------------------------------------------------------------------
ENTITY interface IS
PORT (input: IN std_logic_vector (15 downto 0));
-- the ports interface still in the construction phase
END ENTITY interface;

--
ARCHITECTURE behavioral OF interface IS
BEGIN
mapping: Process (input)
Begin
case input is
when "000000001" => writeline(output, "Clear Display");
when "000000011" => writeline(output, "Return Home");
when "000000010" => writeline(output, "Return Home");
when "000000001" => writeline(output, "Clear Display");
end case;
End Process;
END ARCHITECTURE behavioral;
--------------------------------------------------------------------
so that I want case not to take all the bits (from 0 to 15) in "input", I want just to make comparison on the first 8 bit like "case input (4 downto 11) is", is this possible in case statement of vhdl?

Thanks
ahmad
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top