77范文网 - 专业文章范例文档资料分享平台

复杂数字电路设计实验报告_数字抢答器(3)

来源:网络收集 时间:2019-01-27 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

ppoint_ten_C := ppoint_ten_C - 1;

else

ppoint_one_C := ppoint_one_C - 1;

end if;

end if;

if (input(3) = '1') then

if (ppoint_one_D = \

ppoint_one_D := \

ppoint_ten_D := ppoint_ten_D - 1;

else

ppoint_one_D := ppoint_one_D - 1;

end if;

end if;--input

end if;

end if;

end if;

point_one_A <= ppoint_one_A; point_ten_A <= ppoint_ten_A;

point_one_B <= ppoint_one_B; point_ten_B <= ppoint_ten_B;

point_one_C <= ppoint_one_C; point_ten_C <= ppoint_ten_C;

point_one_D <= ppoint_one_D; point_ten_D <= ppoint_ten_D;

end process;

end Behavioral;

防抖模块:

entity shaking is

Port ( clk500 : in STD_LOGIC; input : in STD_LOGIC; output : out STD_LOGIC); end shaking;

architecture Behavioral of shaking is signal flag : STD_LOGIC := '0'; begin

process(clk500, input) is variable count : integer := 0; begin

if(clk500'event and clk500 = '1') then

if (input = '1' and count = 0) then—有输入,将输入延展

count := count + 1; flag <= '1';

elsif (flag = '1') then

if (count <500) then--500

count := count + 1;

else

count := 0; flag <= '0';

end if;

end if;

end if;

end process;

end Behavioral;

output <= flag;

用于判断是否答题超时的计时模块(Timer)

entity timer is

Port ( clk1 : in STD_LOGIC; --1hz

violationflag : in STD_LOGIC;

input : in STD_LOGIC_VECTOR (3 downto 0); reset : in STD_LOGIC; clr : in STD_LOGIC;

resetforpoints : in STD_LOGIC;

timeout : out STD_LOGIC); end timer;

architecture Behavioral of timer is signal en : STD_LOGIC; begin

en <= reset and clr and resetforpoints; process (clk1, en, violationflag, input) is variable count : integer := 0; begin

if (en = '0') then

count := 0; timeout <= '0';

else

if (input /= \正常答题中

if (clk1'event and clk1 = '1') then

if (count < 50) then—50s

count := count + 1;

elsif (count < 55) then—超时,鸣响直至55s

count := count + 1; timeout <= '1';--超时

else

timeout <= '0';

end if;

end if;

end if;

end if;

end process;

end Behavioral;

用于提示犯规的计时模块(Timer3):

entity timer3 is

Port ( clk1 : in STD_LOGIC; --1hz

violationflag : in STD_LOGIC;

input : in STD_LOGIC_VECTOR (3 downto 0); reset : in STD_LOGIC; clr : in STD_LOGIC;

resetforpoints : in STD_LOGIC;

timeout : out STD_LOGIC); end timer3;

architecture Behavioral of timer3 is signal en : STD_LOGIC; begin

en <= not(reset) and clr and resetforpoints;

process (clk1, en, violationflag, input) is variable count : integer := 0; begin

if (en = '0') then

count := 0; timeout <= '0';

else

if (input /= \犯规

if (clk1'event and clk1 = '1') then

if (count < 2) then

count := count + 1; timeout <= '1';--提示犯规

else—清零

timeout <= '0';

end if;

end if;

end if;

end if;

end process;

end Behavioral;

用于提示有人抢答成功的计时模块(Timer1):

entity timer1 is

Port ( clk1 : in STD_LOGIC; --1hz

violationflag : in STD_LOGIC;

input : in STD_LOGIC_VECTOR (3 downto 0);

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库复杂数字电路设计实验报告_数字抢答器(3)在线全文阅读。

复杂数字电路设计实验报告_数字抢答器(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/460294.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: