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

📄 reach.txt

📁 基于VHDL的异步串行通信电路设计 随着电子技术的发展
💻 TXT
字号:
1引言

  随着电子技术的发展,现场可编程门阵列FPGA和复杂可编程逻辑器件CPLD的出现,使得电子系统的设计者利用与器件相应的电子CAD软件,在实验室里就可以设计自己的专用集成电路ASIC器件。这种可编程ASIC不仅使设计的产品达到小型化、集成化和高可靠性,而且器件具有用户可编程特性,大大缩短了设计周期,减少了设计费用,降低了设计风险。目前数字系统的设计可以直接面向用户需求,根据系统的行为和功能要求,自上至下地逐层完成相应的描述﹑综合﹑优化﹑仿真与验证,直到生成器件,实现电子设计自动化。其中电子设计自动化(EDA)的关键技术之一就是可以用硬件描述语言(HDL)来描述硬件电路。VHDL是用来描述从抽象到具体级别硬件的工业标准语言,它是由美国国防部在80年代开发的HDL,现在已成为IEEE承认的标准硬件描述语言。VHDL支持硬件的设计、验证、综合和测试,以及硬件设计数据的交换、维护、修改和硬件的实现,具有描述能力强、生命周期长、支持大规模设计的分解和已有设计的再利用等优点。利用VHDL这些优点和先进的EDA工具,根据具体的实际要求,我们可以自己来设计串口异步通信电路


libraryieee;
useieee.std_logic_1164.all;
entitycount625is
port(clk,en:instd_logic;Clock1,Clock3:outstd_logic);
endcount625;
architecturecount625_arcofcount625is
begin
process(clk,en)
variablecount:integerrange0to625:=0;
begin
ifen=‘0‘then
NUll;
elsif(rising_edge(clk))then
count:=count+1;
ifcount=625then
Clock1<=‘1‘;count:=0;
else
Clock1<=‘0‘;
endif;
if(count=100orcount=300orcount=500)then
Clock3<=‘1‘;
else
Clock3<=‘0‘;
endif;
endif;
endprocess;
endcount625_arc;



libraryieee;
useieee.std_logic_1164.all;
entityComis
port(clk,en:instd_logic;
Send_data:instd_logic_vector(9downto0);
serial:outstd_logic);
endcom;
architecturecom_arcofcomis
begin
process(clk)
variablecount:integerrange0to9:=0;
begin
ifen=‘0‘then
count:=0;
serial<=‘1‘;
elsifrising_edge(clk)then
ifcount=9then
serial<=Send_data(9);
else
serial<=Send_data(count);
count:=count+1;
endif;
endif;
endprocess;
endcom_arc;





















libraryieee;
useieee.std_logic_1164.all;
entitycom_receive10is
port(com,clr,clk1,clk3:instd_logic;Q:outstd_logic_vector(0to9);Valid:outstd_logic);
endcom_receive10;
architecturecom_receive10_arcofcom_receive10is
SignalEnable:std_logic:=‘1‘;
SignalHold:std_logic:=‘0‘;
SignalN:std_logic_vector(0to2):="000";
begin
Valid<=EnableandHold;
process(clk1,clr)
variableNum:integerrange0to9:=0;
begin
ifclr=‘0‘then
Enable<=‘1‘ Num:=0;Q<="0000000000";
elsif(rising_edge(clk1))then
Q(Num)<=(N(0)andN(1))or(N(1)andN(2))or(N(0)andN(2));
ifNum=9then
Enable<=‘0‘;Num:=0;
else
Num:=Num+1;
endif;
endif;
endprocess;
process(clk3,clr)
variablem:integerrange0to2:=0;
begin
ifclr=‘0‘then
m:=0;
elsif(rising_edge(clk3))then
N(m)<=com;
ifm=2then
m:=0;
else
m:=m+1;
endif;
endif;
endprocess;
process(clr,com)
begin
ifclr=‘0‘then
Hold<=‘0‘;
elsiffalling_edge(com)then
Hold<=‘1‘;
endif;
endprocess;
endcom_receive10_arc;






⌨️ 快捷键说明

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