⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baud.vhd

📁 EDA实验--UART串口实验:UART 主要有由数据总线接口、控制逻辑、波特率发生器、发送部分和接收部分等组成。UART 发送器 --- 发送器每隔16 个CLK16 时钟周期输出1 位
💻 VHD
字号:
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
begin
process(clk,resetb)
variable cnt:integer;    
begin
  if resetb='0' then cnt:=0; bclk<='0';                           --复位
  elsif rising_edge(clk) then
     if cnt>=325 then cnt:=0; bclk<='1';                        --设置分频系数
	 else cnt:=cnt+1; bclk<='0';
	 end if;
  end if;
end process;
end Behavioral;

⌨️ 快捷键说明

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