1 / 6
文档名称:

EDA触发器功能模拟实验报告.doc

格式:doc   大小:216KB   页数:6页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

EDA触发器功能模拟实验报告.doc

上传人:86979448 2017/11/30 文件大小:216 KB

下载得到文件列表

EDA触发器功能模拟实验报告.doc

文档介绍

文档介绍:EDA技术实验项目报告
项目题目: 触发器功能模拟
姓名: 左修林
院系: 应用技术学院
专业: 电子信息工程
学号: 201015254135
指导教师: 陈强
综合成绩:
完成时间: 2012年 5月 21日
项目实验内容摘要
基于FPGA硬件开发板,利用QuartusII软件通过VHDL输入的方式实现基本RS触发器,同步触发器,JK触发器,D触发器同时集成在一个FPGA芯片中模拟功能;
实验原理图:
二、项目实验源代码
library ieee;
use ;
entity mff is
port(sd,rd,r,s,clk,j,k,d:in std_logic;
qrs,nqrs,qrsc,nqrsc,qjk,nqjk,qd,nqd:out std_logic); --定义多触发器I/O.
end mff;
architecture mff of mff is
signal qtp, qbtp,dd,ndd: std_logic;
begin
rsff:process(rd,sd) --基本RS触发器功能模拟
begin
if rd='0' and sd='1' then
qrs<='0';nqrs<='1';
elsif rd='1' and sd='0' then
qrs<='1';nqrs<='0';
elsif rd='1' and sd='1' then null;
end if;
end process rsff;
rsc:process(clk,rd,sd,r,s) --同步RS触发器功能模拟
begin
if sd='0' then
qrsc<='1'; nqrsc<='0';
elsif rd='0' then
qrsc<='0'; nqrsc<='1';
elsif clk='1' then
if r='0' and s='1' then
qrsc<='0';nqrsc<='1';
elsif r='1' and s='0' then
qrsc<='1';nqrsc<='0';
elsif r='0' and s='0' then null;
end if;
end if;
end process rsc;
jk:PROCESS(clk, sd, rd, j, k) --JK触发器功能模拟
BEGIN
IF sd='0' then qtp<='1'; qbtp<='0';
elsif rd='0' THEN qtp<='0';qbtp<='1';
elsif rising_edge(clk) then
if j='0' and k='0' then null;
elsif j='0' and k='1' then
qtp<='0'; qbtp<='1';
elsif j='1' and k='0' then
qtp<='1'; qbtp<='0';
else
qtp<=NOT qtp; qbtp<=NOT qbtp;
end if;
end if;
qjk<=qtp;nqjk<=qbtp