當前位置:編程學習大全網 - 編程軟體 - 誰能幫我寫壹個eda帶有異步清零六十進制計數器的編程 謝謝了

誰能幫我寫壹個eda帶有異步清零六十進制計數器的編程 謝謝了

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

entity fp40 is

port( rst: in std_logic;

clk: in std_logic;

fpclk: out std_logic);

end fp40;

architecture arc of fp40 is

begin

process(clk)

variable count: integer range 0 to 30;

variable clk0: std_logic;

begin

if rst='0' then

clk0<='0' ;

elsif clk'event and clk='0' then

if count=30 then

clk0:=not clk0;

count:=0;

else

count:=count+1;

end if;

end if;

fpclk<=clk0;

end process;

end arc;

rst為低時候復位信號有效,此時輸出為0!

  • 上一篇:熵變公式是怎樣的?
  • 下一篇:誰能告訴我壹個FC外星戰士的金手指啊?EC碼也可以!謝謝了!!!
  • copyright 2024編程學習大全網