实验九 任意编码计数器的设计.doc_第1页
实验九 任意编码计数器的设计.doc_第2页
实验九 任意编码计数器的设计.doc_第3页
实验九 任意编码计数器的设计.doc_第4页
实验九 任意编码计数器的设计.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验九 任意编码计数器的设计一、实验目的1、通过任意编码计数器体会语言编程设计电路的便利。2、了解状态机的设计原理。二、实验内容用状态机设计任意编码计数器,实现如下编码7进制计数器:0,2,5,3,4,6,1,并通过数码管显示。三、实验原理状态转移图四、引脚分配情况:下表为GX-SOC/SOPC-EP2C35-M672创新开发实验平台引脚分配建议表设计端口芯片引脚开发平台模块out0AE13HEX_1Aout1AF13HEX_1Bout2AD12HEX_1Cout3AE12HEX_1Dout4AA12HEX_1Eout5Y12HEX_1Fout6V11HEX_1GclkP2550M 主时钟rstF6SW1A五、实验报告要求实验报告上要体现系统的设计过程,包括所有的代码、仿真结果和硬件验证结果。library IEEE; -get 1HZ use IEEE.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity dividef is port ( CLK : in std_logic; CLK_D: out std_logic );end entity;architecture DIVIDE_arch of dividef issignal COUNT : integer range 0 to 50000000;begin PROCESS(CLK) BEGIN if clkevent and clk=1 then IF COUNT=50000000 then COUNT=0; ELSE COUNT=count+1; END IF; END IF; END PROCESS;PROCESS(COUNT)BEGIN IF COUNT=50000000 THEN CLK_D=1; ELSE CLK_Dd=000;if reset=1then next_state=s1;else next_stated=010;if reset=1then next_state=s1;else next_stated=101;if reset=1then next_state=s1;else next_stated=011;if reset=1then next_state=s1;else next_stated=100;if reset=1then next_state=s1;else next_stated=110;if reset=1then next_state=s1;else next_stated=001;if reset=1then next_state=s1;else next_state=s2;end if;end case;end process;process(clk)beginif clk=1and clkevent thencurrent_state=next_state;end if;end process;end xsb1_arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity seg7 is port(indata: in std_logic_vector(3 downto 0); outdata: out std_logic_vector(0 to 6);end seg7;architecture behavior of seg7 is begin with indata select outdata=1111110 when 0000, 0110000 when 0001, 1101101 when 0010, 1111001 when 0011, 0110011 when 0100, 1011011 when 0101, 1011111 when 0110, 1110000 when 0111, 1111111 when 1000, 1111011 when 1001,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论