[ µðÁöÅ» ³í¸®È¸·Î ±âÃÊ ]
 
   UP Counter_2bit : upcounter_2bit.gdf
                              upcounter_2bi..vhd

   [SCH]

 

   [VHDL]

            -- upcounter_2bit.vhd

            LIBRARY ieee; 
            USE ieee.std_logic_1164.all; 
            USE ieee.std_logic_signed.all;
            USE ieee.std_logic_arith.all; 

            ENTITY upcounter_2bit IS 
            PORT (  clk, reset  : in std_logic; 
                       count_out  : out std_logic_vector(1 downto 0));
            END upcounter_2bit; 

            ARCHITECTURE maxpld OF upcounter_2bit IS 
            signal tmp : std_logic_vector(1 downto 0);
            BEGIN  
               count_out <= tmp;
               process(clk, reset)
               begin
                  if (reset= '1') then
                     tmp <= "00";
                  elsif (clk='1' and clk'event) then
                     tmp <= tmp + '1';
                  end if;
               end process;
             END maxpld;
 


   [RESULT]

 
HOME | TOP | PREVIOUS | NEXT]