已阅读5页,还剩42页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1.已知信号源脉冲频率为50M,试编写一分频程序,得到一周期为1秒(频率为1Hz)的脉冲频率。library ieee; -调用库use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity fp is -实体说明port(inclk:in std_logic; -端口说明 outputa:out std_logic);end fp;architecture arch_fp of fp is -构造体说明 signal fp:std_logic_vector(24 downto 0); -信号定义 signal f:std_logic; begin process(inclk) -进程语句描述 begin if (inclkevent and inclk=1) then -将时钟分频至1Hz if fp=24999999 then fp=0000000000000000000000000; f=not f; else fp=fp+1; end if; end if; end process; outputa=f; end arch_fp; -构造体结束 library ieee; -调用库use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity fp is -实体说明port(inclk:in std_logic; -端口说明 outputa:out std_logic);end fp;architecture arch_fp of fp is -构造体说明 signal fp:std_logic_vector(24 downto 0); -信号定义 signal f:std_logic; begin process(inclk) -进程语句描述 begin if (inclkevent and inclk=1) then -将时钟分频至0.5Hz if fp=12499999then fp=0000000000000000000000000; f=not f; else fp=fp+1; end if; end if; end process; outputafinclk,outputa=f); process(f) -进程语句描述 begin if (rising_edge(f) then -十二归一条件语句模块 if (sa=2 and sb=1) then sa=0001; sb=0000; else if sa=9 then sa=0000; sb=sb+1; else sa=sa+1; end if; end if; end if; end process; with sa select -段码转换模块 outputa=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0 with sb select -段码转换模块 outputbfinclk,outputa=f); process(f) -进程语句描述 begin if (rising_edge(f) then -十归一条件语句模块 if (sa=0 and sb=1) then sa=0001; sb=0000; else if sa=9 then sa=0000; sb=sb+1; else sa=sa+1; end if; end if; end if; end process; with sa select -段码转换模块 outputa=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0 with sb select -段码转换模块 outputbfinclk,outputa=f); process(f) -进程语句描述 begin if (rising_edge(f) then -十二归一条件语句模块 if (sa=0and sb=6) then sa=0000; sb=0000; else if sa=9 then sa=0000; sb=sb+1; else sa=sa+1; end if; end if; end if; end process; with sa select -段码转换模块 outputa=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0 with sb select -段码转换模块 outputb=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0end arch_twelveto1; 11, 用文本输入法设计一个10归1电路,并进行功能测试,记录测试结果。时钟源采用50MHz的脉冲。library ieee; -调用库use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity twelveto1 is -实体描述port(inclk: in std_logic; -端口说明 outputa:out std_logic_vector(6 downto 0); outputb:out std_logic_vector(6 downto 0); end twelveto1; architecture arch_twelveto1 of twelveto1 is -结构体描述 signal sa:std_logic_vector(3 downto 0); signal sb:std_logic_vector(3 downto 0);signal fp:std_logic_vector(24 downto 0); -信号定义 signal f:std_logic; begin process(inclk) -进程语句描述 begin if (inclkevent and inclk=1) then -将时钟分频至1Hz if fp=24999999 then fp=0000000000000000000000000; f=not f; else fp=fp+1; end if; end if; end process; with sa select -段码转换模块 outputa=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0 with sb select -段码转换模块 outputb=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0end arch_twelveto1; oo用文本输入法设计一个12归1电路,并进行功能测试,记录测试结果。时钟源采用50MHz的脉冲。library ieee; -调用库use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity twelveto1 is -实体描述port(inclk: in std_logic; -端口说明 outputa:out std_logic_vector(6 downto 0); outputb:out std_logic_vector(6 downto 0); end twelveto1; architecture arch_twelveto1 of twelveto1 is -结构体描述 signal sa:std_logic_vector(3 downto 0); signal sb:std_logic_vector(3 downto 0);signal fp:std_logic_vector(24 downto 0); -信号定义 signal f:std_logic; begin process(inclk) -进程语句描述 begin if (inclkevent and inclk=1) then -将时钟分频至1Hz if fp=24999999 then fp=0000000000000000000000000; f=not f; else fp=fp+1; end if; end if; end process;process(finclk) -进程语句描述 begin if (rising_edge(f) then -十二归一条件语句模块 if (sa=2and sb=1) then sa=0001; sb=0000; else if sa=9 then sa=0000; sb=sb+1; else sa=sa+1; end if; end if; end if; end process; with sa select -段码转换模块 outputa=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0 with sb select -段码转换模块 outputb=0110000 when 0001, -1 1101101 when 0010, -2 1111001 when 0011, -3 0110011 when 0100, -4 1011011 when 0101, -5 1011111 when 0110, -6 1110000 when 0111, -7 1111111 when 1000, -8 1111011 when 1001, -9 1110111 when 1010, -A 0011111 when 1011, -b 1001110 when 1100, -C 0111101 when 1101, -d 1001111 when 1110, -E 1000111 when 1111, -F 1111110 when others; -0end arch_twelveto1; 用文本输入法设计一个串行扫描电路,由8个动态数码管依次轮流显示计数过程,记录测试结果(扫描显示的内容及顺序)。library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity tcx isport (inclk:in std_logic; outa:out std_logic_vector(6 downto 0); outb:out std_logic_vector(2 downto 0);end tcx;architecture arch_tcx of tcx is signal ma:std_logic_vector(2 downto 0); signal mb:std_logic_vector(3 downto 0); signal fp:std_logic_vector(23 downto 0); signal f:std_logic;begin process(inclk) begin if (inclkevent and inclk =1)then
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026中国新材料钛合金材料行业市场现状供需分析及投资评估规划分析研究报告
- 2026中国智能行车行业市场现状供需分析及投资评估规划分析研究报告
- 2026中国松石市场供需现状分析及投资机会规划研究深度报告
- 2026中国托管行业市场现状供需分析及投资评估规划分析研究报告
- 2026中国电力系统智能传感器运维模式与故障诊断研究
- 2026中国连续玄武岩纤维在船舶制造中的减重效果与海事规范适应性
- 2026中国证券银行业金融机构投资银行业金融机构行业市场深度调研及发展趋势和投资前景预测研究报告
- 2026中国医疗健康保险行业市场发展与创新产品设计研究报告
- 2026中国休闲食品行业消费趋势与产品差异化竞争报告
- 2026中国智能机器人应用制造行业市场供需格局及其投资健康可持续发展研究分析报告
- DB3210T 1178-2024林权地籍调查技术规程
- 全自动切菜机毕业设计
- 钢结构焊接技术中的焊缝检验与分析方法
- 居民自建桩安装告知书回执
- 医院药剂科专项处方点评作业细则与处方点评表格汇编
- 2023版《思想道德与法治》考试习题库600题(含答案)
- 《2019公路工程施工安全防护设施技术指南广东版》贯标培训资料
- 湖南介绍PPT(湖南简介经典版)
- GB/T 605-2006化学试剂色度测定通用方法
- GB/T 38952-2020无损检测残余应力超声体波检测方法
- FZ/T 01004-2008涂层织物抗渗水性的测定
评论
0/150
提交评论