急求四人抢答器vhdl语言编的 !!高手速来帮忙!!

作者&投稿:薄胡 (若有异议请与网页底部的电邮联系)
急求四人抢答器vhdl语言编的 !!高手速来帮忙!!~

library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; -------------------------------------------------------------------- entity exp5 is port( S1,S2,S3,S4 : in std_logic; --输入:表示4个人 S5 : in std_logic; --主持人按键 D1,D2,D3,D4 : out std_logic --抢答结果显示 ); end exp5; -------------------------------------------------------------------- architecture behave of exp5 is signal Enable_Flag : std_logic; signal S : std_logic_vector(3 downto 0); begin process(S1,S2,S3,S4,S5) --允许抢答控制 begin S<=S1&S2&S3&S4; if(S5='0') then Enable_Flag<='1'; elsif(S/="1111") then Enable_Flag<='0'; end if; end process; process(S1,S2,S3,S4,S5) --抢答结果显示 begin if(S5='0') then D1<='0'; D2<='0'; D3<='0'; D4<='0'; elsif(Enable_Flag='1') then if(S1='0') then D1<='1'; elsif(S2='0') then D2<='1'; elsif(S3='0') then D3<='1'; elsif(S4='0') then D4<='1'; end if; end if; end process; end behave;

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity QDQ4R is
port(sta:in std_logic;
clk :in std_logic;
rst :in std_logic;
a,b,c,d :in std_logic;
lb :out std_logic;
t_limit :out std_logic_vector(3 downto 0);
led :out std_logic_vector(3 downto 0);
seg :out std_logic_vector(3 downto 0));

end QDQ4R;
architecture bhe of QDQ4R is
signal tem :std_logic_vector(3 downto 0);
signal scq :std_logic;
signal s :std_logic;
signal t :std_logic;
signal ns :std_logic;
signal s_sta :std_logic;
constant w1 :std_logic_vector:="0001";
constant w2 :std_logic_vector:="0010";
constant w3 :std_logic_vector:="0011";
constant w4 :std_logic_vector:="0100";
begin
tem<=d&c&b&a;
s<=a or b or c or d;
ns<=not(a or b or c or d);
p1: process(sta,ns)
begin
if sta='1' then
s_sta<='1';
elsif(ns'event and ns='1')then
s_sta<='0';
end if;
end process p1;
p2: process(rst,s_sta,s,t)
begin
if rst='1' then
led<="0000";
elsif(s'event and s='1')then
if (s_sta='1' and t='1') then
case tem is
when "0001"=> led<="0001";
when "0010"=> led<="0010";
when "0100"=> led<="0100";
when "1000"=> led<="1000";
when others=> led<="0000";
end case;
end if;
end if;
end process p2;

p3: process(clk,s_sta)
variable lb_cnt :std_logic_vector(1 downto 0):="10";
begin
if(s='1') then
if (clk='1' and clk'event) then
if lb_cnt>"00" then
lb<=clk;
lb_cnt:=lb_cnt+1;
else
lb_cnt:="10";
lb<='0';
end if;
end if;
end if;
end process p3;
p4: process(s)
begin
if(rst='1') then
seg<="0000";
elsif(s'event and s='1') then
case tem is
when "0001" =>seg<=w1;
when "0010" =>seg<=w2;
when "0100" =>seg<=w3;
when "1000" =>seg<=w4;
when others =>seg<="0000";
end case;
end if;
end process p4;
p5: process(clk,s_sta)
variable s_time :std_logic_vector(3 downto 0):="1010";
begin
if(clk'event and clk='1') then
if(sta='1' and s_time>"0000") then
t<='1';
s_time:=s_time-1;
t_limit<=s_time;
else
s_time:="1010";
t<='0';
end if;
end if;
end process p5;
end bhe;

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
--------------------------------------------------------------------
entity exp5 is
port( S1,S2,S3,S4 : in std_logic; --输入:表示4个人
S5 : in std_logic; --主持人按键
D1,D2,D3,D4 : out std_logic --抢答结果显示
);
end exp5;
--------------------------------------------------------------------
architecture behave of exp5 is
signal Enable_Flag : std_logic;
signal S : std_logic_vector(3 downto 0);
begin
process(S1,S2,S3,S4,S5) --允许抢答控制
begin
S<=S1&S2&S3&S4;
if(S5='0') then
Enable_Flag<='1';
elsif(S/="1111") then
Enable_Flag<='0';
end if;
end process;
process(S1,S2,S3,S4,S5) --抢答结果显示
begin
if(S5='0') then
D1<='0';
D2<='0';
D3<='0';
D4<='0';
elsif(Enable_Flag='1') then
if(S1='0') then
D1<='1';
elsif(S2='0') then
D2<='1';
elsif(S3='0') then
D3<='1';
elsif(S4='0') then
D4<='1';
end if;
end if;
end process;

end behave;


用VHDL语言实现四人智力竞赛抢答器的设计,高分寻高人解答
3、锁存器模块LOCKB的VHDL源程序 -lockb.vhd LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;ENTITY LOCKB IS PORT(D1,D2,D3,D4:IN STD_LOGIC;CLK,CLR:IN STD_LOGIC;Q1,Q2,Q3,Q4,ALM:OUT STD_LOGIC);END LOCKB;ARCHITECTURE LOCK_ARC OF LOCKB IS BEGIN PROCESS(CLK)BEGIN IF CLR='...

qiangdaqi.vhd(45): positional associations must be listed before...
上面两个元件例化语句的端口映射中,不能够既有位置关联,又有名称关联。应当统一,要么所有端口都采用位置关联、要么所有端口都采用名称关联。

龙湖区15392107189: 急求四人抢答器vhdl语言编的 !!高手速来帮忙!! -
薄鸣甲芬: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all;-------------------------------------------------------------------- entity exp5 is port( S1,S2,S3,S4 : in std_logic; --输入:表示4个人 S5 : in std_logic; --主持人...

龙湖区15392107189: 用VHDL语言实现四人智力竞赛抢答器的设计,高分寻高人解答 -
薄鸣甲芬: 各模块VHDL源代码1、抢答鉴别模块FENG的VHDL源程序--feng.vhd LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY FENG IS PORT(CP,CLR:IN STD_LOGIC; Q :OUT STD_LOGIC); END FENG; ARCHITECTURE FENG_ARC OF ...

龙湖区15392107189: VHDL语言编抢答器 四人抢答器 -
薄鸣甲芬: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity QDQ4R is port(sta:in std_logic; clk :in std_logic; rst :in std_logic; a,b,c,d :in std_logic; lb :out std_logic; t_limit :out std_logic_vector(3 downto 0); led :out std_logic_vector...

龙湖区15392107189: 用vhdl或verilog设计四人竞赛抢答器 -
薄鸣甲芬: 我可以给你啊,用数字电路做的,你移植到CPLD上就可以了.报警电路,你用CPLD做个频率就好了,很简单的.延时电路也是一样的.

龙湖区15392107189: 设计数字式竞赛抢答器,用VHDL语言描述,用QuartusII工具编译和综合 -
薄鸣甲芬: 7位抢答器设计:LIBRARY IEEE;USE IEEE.Std_logic_1164.ALL;ENTITY Responder IS -- 实体声明 PORT(Start:IN Std_logic; -- 端口声明 Key:IN Std_logic_Vector(7 DOWNTO 1); Led:OUT Std_logic_Vector(7 DOWNTO 1));END Responder;...

龙湖区15392107189: 求quartus2 的 设计实例
薄鸣甲芬:EDA中用VHDL语言设计五人抢答器 1.电路设置有5个抢答按钮A~E,开始抢答控制按钮Start,以及复位按钮RST 2.抢答前或复位时数码管显示为“0”,抢答完成后则显示抢答者的编号“1”~“5” library ieee; use ieee.std_logic_1164.all; use ...

龙湖区15392107189: 设计一个抢答器,用verilog - HDL编程,用module模块!要求如下:你会么 ,高分悬赏!急急急!追加200积分 -
薄鸣甲芬: module lx0825(a,b,c,d,e,res,clk,clk1,q1,q2,q3,q4,q5,row,ra,Q1,beep); input a,b,c,d,e; input res,clk,clk1; output[7:0]row,ra; output[3:0]Q1; output q1,q2,q3,q4,q5,beep; reg q1,q2,q3,q4,q5,beep; reg[7:0]row,ra; reg[3:0]Q1; reg[2:0]Y; always @(res or q1 ...

龙湖区15392107189: 如何在基于VHDL设计的抢答器中加入语音功能,比如在强大倒数时能语音数秒,语音喊开始等功能 -
薄鸣甲芬: 你的抢答器肯定是由许多的计时电路构成的,你可以加一个蜂鸣器,用一定频率的时钟来使蜂鸣器工作,一般都是用256HZ.先说读秒,把你的读秒时钟脉冲(CLK)和蜂鸣器的驱动时钟用一个与门接在一起再送给蜂鸣器,这样蜂鸣器就会在CLK高电平期间发声,低电平停止工作,实现了读秒.报警报错,可以再你的计数末尾输出一个高电平脉冲,作为错误或警报信号给蜂鸣器就可以了.

龙湖区15392107189: 用VHDL语言IF语句来实现4选1数据选择器,亲们我很着急啊,有没有好心人啊,帮帮我 啊 -
薄鸣甲芬: entity mux4_1 is port ( a,b,c,d: in std_logic; --4位输入信号,数据类型自己改 s1,s2: in std_logic; --选择信号 y : out std_logic ); --输出信号,数据类型和输入应一致 end entity; architecture bhv of mux4_1 is signal s :std_logic_vector(1 downto 0); ...

龙湖区15392107189: 急求基于单片机的4路电子抢答器c语言程序 -
薄鸣甲芬: 2、实现现象:同时按键抢答,先按的键有效,其他按键锁死 复位后重新开始抢答 3、硬件要求:按键 LED灯原理:最先按下按键者有效,其他均无效------------------------------------------------*/#include<reg52.h> //包含头文件,一般情况不需要改动,...

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网