1、1实 验 报 告课 程 名 称 : 电 子 设 计 自 动 化 技 术 实 验 专 业 班 级 : 电 科 1002班 姓 名 : 学 号 : 2湖 南 工 业 大 学 理 学 院实 验 名 称 预置分频器实验实 验 地 点 理 学 楼 210 实 验 时 间 2012年 11 月 20 日实 验 成 绩31实验目的(1) 掌握使用并行下载程序(2) 掌握VHDL 语言(3) 掌握分频器的设计方法2 、实验内容(1)根据 VHDL语言描述输入法编译和波形仿真(2)将 VHDL程序下载到FPGA芯片中(3)连接连线,用扬声器听不同分频数的声音3 、实验要求(1) 熟悉VHDL 程序下载(2) 设
2、计一个预置分频器,用扬声器测试分频结果(3) 掌握if语句(4) 把自己认为好的实验结果写成实验报告。(要计成绩)四 、 实 验 电 路 或 者 实 验 源 程 序 、library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity fenpin is port (key:in std_logic;clk,reset: in std_logic;oput:out std_logic);end fenpin;5architecture behav
3、e of fenpin issignal b,m1:integer range 0 to 500;signal a:integer range 0 to 500:=50;signal boolean:std_logic;beginprocess(clk,reset,key)beginif reset=1 thena=5;elsif boolean =1thena=5+m1;b=0;elsif a=0 thena=5+m1;elsif rising_edge(clk) thenif b=a thenoput=1;b=0;elsif ba thenb=b+1;oput=0;else b=0;oput=0;end if; end if;end process; add1:process(key,reset)beginif reset=1 thenm1=0;boolean=0;elsif key=0 thenboolean=0;elsif rising_edge(key)thenm1=m1+1;boolean=1; end if;5end process;end behave;五 、 实 验 结 果六 、 实 验 心 得 体 会