1、最新EDA16x16点阵滚动+动画显示EDA16x16点阵滚动+动画显示四、课程设计的总体步骤1、单个字符的显示(如:黄):library ieee;entity xianshi isport( clk2:in std_logic; rck,sck:out std_logic; si:out std_logic);end ;architecture one of xianshi issignal sel:std_logic_vector(3 downto 0);signal q: std_logic_vector(31 downto 0);signal i:integer range 0 to
2、 31;signal coi:std_logic;begin process(sel,clk1)begincase sel is when others =null; end case; if clk1event and clk1=1then si=q(i);i=i+1;coi=0; if i=31 then i=0;coi=1;sel=sel+1; end if; rck=not coi; end if;end process;sck=clk1;end ;时序仿真:从图中可以看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,故此程序满足要求。 2、多个字符的跳动显
3、示(如:黄小红):library ieee;entity xianshi isport( clk1:in std_logic; clk2:in std_logic; rck,sck:out std_logic; si:out std_logic);end ;architecture one of xianshi issignal lie:std_logic_vector(3 downto 0);signal sel:std_logic_vector(3 downto 0);signal q: std_logic_vector(31 downto 0);signal i:integer rang
4、e 0 to 31;signal coi:std_logic;begin process(sel,clk1,clk2)beginif clk2event and clk2=1 then lie case sel is when others =null; end case; when0001= case sel is when others =null; end case; when0010= case sel is when others =null; end case; when others=null; end case; if clk1event and clk1=1then si=q
5、(i);i=i+1;coi=0; if i=31 then i=0;coi=1;sel=sel+1; end if; rck=not coi; end if;end process;sck=clk1;end ; 时序仿真:从上图看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,故此程序满足要求。3、汉字的滚动和动画显示(如:黄小红+笑脸):library ieee;entity xianshi isport( clk1:in std_logic; clk2:in std_logic; rck,sck:out std_logic; si:out std_logic);
6、end ;architecture one of xianshi issignal lie:std_logic_vector(3 downto 0);signal sel:std_logic_vector(3 downto 0);signal q: std_logic_vector(31 downto 0);signal i:integer range 0 to 31;signal coi:std_logic;begin process(sel,clk1,clk2)beginif clk2event and clk2=1 then lie case sel is when others =nu
7、ll; end case; when0001= case sel is when others =null; end case; when0010= case sel is when others =null; end case; when0011= case sel is when others =null; end case; when0100= case sel is when others =null; end case; when0101= case sel is when others =null; end case; when0110= case sel is when othe
8、rs =null; end case; when0111= case sel is when others =null; end case; when1000= case sel is when others =null; end case; when1001= case sel is when others =null; end case; when1010= case sel is when others =null; end case; when1011= case sel is when others =null; end case; when1100= case sel is whe
9、n others =null; end case; when1101= case sel is when others =null; end case; when1110= case sel is when others =null; end case; when1111= case sel is when others =null; end case;when others =null; end case; if clk1event and clk1=1then si=q(i);i=i+1;coi=0; if i=31 then i=0;coi=1;sel=sel+1; end if; rc
10、k=not coi; end if;end process;sck=clk1;end ;时序仿真:从上图看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,si为输出电频,故此程序满足要求。五、结论与收获在三周的EDA课程设计过程中,我对VHDL语言有了更加深刻的认识。VHDL是超高速集成电路的硬件描述语言,它能够描述硬件的结构、行为与功能。另外,VHDL具有并发性,采用自上而下的结构式设计方法,适合大型设计工程的分工合作。在编写程序的时候,我才发现能看懂程序和能自己写程序是两个完全不同的概念,自己一开始写程序时,即便是一个很简单的功能模块,在编译时也可能产生很多错误
11、,在不断的改错过程中,自己对VHDL语言的语法结构有了深刻的理解,对编译过程中常见的错误也有了全面的认识。通过这十三周的课程设计,我在熟悉了基于FPGA设计的同时,也学到了很多在学习课本知识时所体会不到的东西。完成此次设计后,我不仅能对Quartus II开发仿真软件熟练操作,能达到学以致用,同时还掌握了矩阵键盘和1616点阵的工作原理。经过这一过程,我发现平常的学习在注重理论知识的掌握同时,要加强实验环节,只有通过不断地实践,我们才能把知识掌握的更牢固,理解的更透彻。通过这次课程设计使我懂得了理论与实际相结合是很重要的,只有理论知识是远远不够的,只有把所学的理论知识与实践相结合起来,从理论中得出结论,才能真正为社会服务,从而提高自己的实际动手能力和独立思考的能力。在设计的过程中遇到问题,可以说得是困难重重,这毕竟第一次做的,难免会遇到过各种各样的问题,同时在设计的过程中发现了自己的不足之处,对以前所学过的知识理解得不够深刻,掌握得不够牢固。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1