Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > VHDL > Re: Decimal to ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 6045 of 6417
Post > Topic >>

Re: Decimal to binary for comparison

by Klaus Thiele <Thiele.K@[EMAIL PROTECTED] > May 23, 2008 at 05:22 PM

> process
> begin
>   Select_This <= (others => '0');
>   Select_This(Index) <= '1'
> end process;

that looks like a nice one ;)

process (A, E)
begin
if (E='0') then
D <= "0000000000000000";
else
case A is
when "0000" =>
D <= "0000000000000001";
when "0001" =>
D <= "0000000000000010";
when "0010" =>
D <= "0000000000000100";
when "0011" =>
D <= "0000000000001000";
when "0100" =>
D <= "0000000000010000";
when "0101" =>
D <= "0000000000100000";
when "0110" =>
D <= "0000000001000000";
when "0111" =>
D <= "0000000010000000";
when "1000" =>
D <= "0000000100000000";
when "1001" =>
D <= "0000001000000000";
when "1010" =>
D <= "0000010000000000";
when "1011" =>
D <= "0000100000000000";
when "1100" =>
D <= "0001000000000000";
when "1101" =>
D <= "0010000000000000";
when "1110" =>
D <= "0100000000000000";
when "1111" =>
D <= "1000000000000000";
when others =>
D <= "0000000000000000";
end case;
end if;
end process;
end Behavioral;

http://toolbox.xilinx.com/docsan/xilinx5/data/docs/lib/lib0126_110.html
 




 5 Posts in Topic:
Decimal to binary for comparison
Klaus Thiele <Thiele.K  2008-05-23 16:20:49 
Re: Decimal to binary for comparison
Mike Treseler <mike_tr  2008-05-23 08:40:25 
Re: Decimal to binary for comparison
KJ <kkjennings@[EMAIL   2008-05-23 08:42:07 
Re: Decimal to binary for comparison
Klaus Thiele <Thiele.K  2008-05-23 16:45:21 
Re: Decimal to binary for comparison
Klaus Thiele <Thiele.K  2008-05-23 17:22:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 16:33:38 CST 2008.