




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、四、课程设计的总体步骤1、单个字符的显示(如:黄):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;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);signa
2、l i:integer range 0 to 31;signal coi:std_logic;begin process(sel,clk1)begincase sel is when others =>null; end case; if clk1'event and clk1='1'then 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
3、;end process;sck<=clk1;end ;时序仿真:从图中可以看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,故此程序满足要求。 2、多个字符的跳动显示(如:黄小红):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xianshi isport( clk1:in std_logic;clk2:in std_logic;rck,sck:out std_logic;si:out std_logic);end ;architecture o
4、ne 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 clk2'event and clk2='1' then lie<=lie+'1' end if; cas
5、e lie is when "0000"=> case sel is when others =>null; end case; when"0001"=> case sel is when others =>null; end case; when"0010"=> case sel is when others =>null; end case; when others=>null; end case; if clk1'event and clk1='1'then si
6、<=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是同一电频,故此程序满足要求。3、汉字的滚动和动画显示(如:黄小红+笑脸):library ieee;use ieee.std_logic_1164.all;use ieee.std_
7、logic_unsigned.all;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 range 0 to
8、 31;signal coi:std_logic;begin process(sel,clk1,clk2)beginif clk2'event and clk2='1' then lie<=lie+'1' end if; case lie is when "0000"=> case sel is when others =>null; end case; when"0001"=> case sel is when others =>null; end case; when"0
9、010"=> case sel is when others =>null; end case; when"0011"=> case sel is when others =>null; end case; when"0100"=> case sel is when others =>null; end case; when"0101"=> case sel is when others =>null; end case; when"0110"=> c
10、ase sel is when others =>null; end case; when"0111"=> case sel is when others =>null; end case; when"1000"=> case sel is when others =>null; end case; when"1001"=> case sel is when others =>null; end case; when"1010"=> case sel is when
11、others =>null; end case; when"1011"=> case sel is when others =>null; end case; when"1100"=> case sel is when others =>null; end case; when"1101"=> case sel is when others =>null; end case; when"1110"=> case sel is when others =>null
12、; end case; when"1111"=> case sel is when others =>null; end case;when others =>null; end case; if clk1'event and clk1='1'then 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
13、process;sck<=clk1;end ;时序仿真:从上图看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,si为输出电频,故此程序满足要求。五、结论与收获在三周的EDA课程设计过程中,我对VHDL语言有了更加深刻的认识。VHDL是超高速集成电路的硬件描述语言,它能够描述硬件的结构、行为与功能。另外,VHDL具有并发性,采用自上而下的结构式设计方法,适合大型设计工程的分工合作。在编写程序的时候,我才发现能看懂程序和能自己写程序是两个完全不同的概念,自己一开始写程序时,即便是一个很简单的功能模块,在编译时也可能产生很多错误,在不断的改错过程中,自己对VHDL语言的语法结构有了深刻的理解,对编译过程中常见的错误也有了全面的认识。通过这十三周的课程设计,我在熟悉了基于FPGA设计的同时,也学到了很多在学习课本知识时所体会不到的东西。完成此次设计后,我不仅能对Quartus II开发仿真软件熟练操作,能达到学以致用,同时还掌握了矩阵键盘和16×16点阵的工作原理。经过这一过程,我发现平常的学习在注重理论知识的掌握同时,要加强实验环节,只有通过不断
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025钢筋买卖合同模板
- 2025宜昌市房屋租赁合同样本
- 2025广告代理合同模板
- 2025防腐施工承包合同书
- 2025标准抵押借款合同
- 《肺大疱护理要点》课件
- 2025有关汽车买卖的合同范本
- 2025年建筑工程合同的基本内容
- 发电机制造的数字化转型考核试卷
- 航空旅游票价策略考核试卷
- 传统园林技艺智慧树知到期末考试答案2024年
- 直播中的礼仪与形象塑造
- 2024年八年级数学下册期中检测卷【含答案】
- 老年人中医健康知识讲座总结
- 海南声茂羊和禽类半自动屠宰场项目环评报告
- 跳绳市场调研报告
- 《民法典》合同编通则及司法解释培训课件
- 《大学生的情绪》课件
- 交通事故法律处理与索赔案例分析与实践指导
- 2023年河北高中学业水平考试物理试卷真题及答案详解
- 大学生组织管理能力大赛题库第三届
评论
0/150
提交评论