版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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 when0000=qqqqqqqqqqqqqqqqnull; 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变为低电频,
3、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 one of xianshi issignal lie:std_logic_vector(3 downto 0);signal sel
4、: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 when0000=qqqqqqqqqqqqqqqqnull; end case; when0001= case sel is when0000=qqqqqqqqqqqqqqqqnull; end ca
5、se; when0010= case sel is when0000=qqqqqqqqqqqqqqqqnull; 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; rck=not coi; end if;end process;sck=clk1;end ; 时序仿真:从上图看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,故此程序满足要求。3、汉字的滚动和动画显
6、示(如:黄小红+笑脸):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 one of xianshi issignal lie:std_logic_vector(3 downto 0);signal sel:std_logic_vector(3 downto 0);s
7、ignal 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 when0000=qqqqqqqqqqqqqqqqnull; end case; when0001= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when0010= case sel is when0
8、000=qqqqqqqqqqqqqqqqnull; end case; when0011= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when0100= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when0101= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when0110= case sel is when0000=qqqqqqqqqqqqqqqnull; end case; when0111= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when1000= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when1001= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when1010= case sel is when0000=qqqqqqqqqqqqqqqqnull; end case; when1011= case sel is when0000=qqqqqqqqqqqqqqqqnull; end ca
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年环境监测人员考试真题解析卷(专项训练)
- 2026年小学数学教师招聘考试培训试卷解析
- 2026年心理咨询师二级考试模拟试题冲刺训练
- 2026年教师资格《中学历史》教学能力模拟试卷
- 2026年小学语文期末考试专项训练试卷(附答案)
- 初中地理七年级下册大洲认识教学设计
- 初中八年级生命安全教育-冬季防火守护安全主题班会教学设计
- 人教版八年级物理上册3.1温度教学设计
- 小学一年级音乐教学设计:游戏闹翻天节奏变变变单元整体教学设计与实践
- 高中化学选择性必修3《3.2 醇 酚》第2课时 酚的结构与性质 教学设计
- 2026四川甘孜州泸定县招聘“一村一幼”辅导员8人备考题库附答案详解ab卷
- 集中电源应急照明监理实施细则
- 炒货生产车间现场管理制度
- 企业年度预算编制框架及关键指标表
- 三人合伙包工程协议书
- 2025年安徽合肥慧丰人才服务有限公司第一批招聘劳务派遣工作人员笔试题库历年考点版附带答案详解
- 新建学校施工组织设计全案
- 中药采收与加工课件
- 东南西北英语教学课件
- 泌尿结石围手术期护理
- 佤族医药知识图谱构建-洞察及研究
评论
0/150
提交评论