Академический Документы
Профессиональный Документы
Культура Документы
--MUPLEX: process(CLOCK_MAIN)
--begin
--if (CLOCK_MAIN'event and CLOCK_MAIN='1') then
-case display is
-when 0 =>F<=cent;SEL<="011";
-when 1 =>F<=dec; SEL<="101";
-when 2 =>F<=uni; SEL<="110";
-when others =>F<="0000";SEL<="111";
-end case;
--if (display<2) then
-display<=display+1;
-else
-display<=0;
-end if;
--end if;
---end process MUPLEX;
--------------------------------------------entero:=conv_integer(DX);
if (entero<10) then
tmp:=DX+"000000000000";
cent<=tmp(11 downto 8);
dec<=tmp(7 downto 4);
uni<=DX(3 downto 0);
elsif ((entero>9)and(entero<20)) then
tmp:=DX+"000000000110";
cent<=tmp(11 downto 8);
dec<=tmp(7 downto 4);
uni<=tmp(3 downto 0);
elsif ((entero>=20)and(entero<30)) then
tmp:=DX+"000000001100";
cent<=tmp(11 downto 8);
dec<=tmp(7 downto 4);
uni<=tmp(3 downto 0);
elsif ((entero>=30)and(entero<40)) then
tmp:=DX+"000000010010";
cent<=tmp(11 downto 8);
dec<=tmp(7 downto 4);
uni<=tmp(3 downto 0);
elsif ((entero>=40)and(entero<50)) then
tmp:=DX+"000000011000";
cent<=tmp(11 downto 8);
dec<=tmp(7 downto 4);