📄 binarycouter.vhd
字号:
------------------------------------------------------------------------------------ Company: -- Engineer: -- -- Create Date: 16:10:32 10/07/2006 -- Design Name: -- Module Name: binarycouter - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: ---- Dependencies: ---- Revision: -- Revision 0.01 - File Created-- Additional Comments: ------------------------------------------------------------------------------------library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity BinaryCounter is
Port ( clk : in std_logic;
ledce: out std_logic;
dout : out std_logic_vector(7 downto 0));
end BinaryCounter;
architecture Behavioral of BinaryCounter is
signal tempcounter:std_logic_vector(23 downto 0);
signal counterclk:std_logic;
signal counter:std_logic_vector(7 downto 0);
begin
process(clk)
begin
if(clk'event and clk='1')then
tempcounter<=tempcounter+'1';
end if;
end process;
counterclk<=tempcounter(23);
process(counterclk)
begin
if counterclk'event and counterclk='1' then
counter<=counter+'1';
end if;
end process;
dout<= not counter;
ledce<='0';
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -