baud.vhd

来自「波特率发生器」· VHDL 代码 · 共 22 行

VHD
22
字号
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity baud is
    Port (clk,resetb:in std_logic;
	     bclk:out std_logic);
end baud;
architecture Behavioral of baud is
signal cnt:std_logic_vector(7 downto 0);
begin
process(clk,resetb)
begin
  if resetb='1' then cnt<=(others=>'0'); bclk<='0';                           
  elsif rising_edge(clk) then
     if cnt="11010000" then cnt<=(others=>'0'); bclk<='1';                        
	 else cnt<=cnt+1; bclk<='0';
	 end if;
  end if;
end process;
end Behavioral;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?