EDA四人智力抢答器程序
1个回答
展开全部
我这个能实现8个人抢答。。有主持人启动。记得给分哦!!!!!!!
library ieee;
use ieee.std_logic_1164.all;
entity qiangdaqi is
port(rest:in std_logic;
n:in std_logic_vector(7 downto 0);
q:out std_logic_vector(6 downto 0)
);
end ;
architecture one of qiangdaqi is
signal t:std_logic;
begin
process(rest)
begin
if rest='1' then
q<="1000000";
t<='1';
end if;
if n="00000001"and t='1'then
q<="1111001";
t<='0';
elsif n="00000010"and t='1'then
q<="0100100";
t<='0';
elsif n="00000100"and t='1'then
q<="0110000";
t<='0';
elsif n="00001000"and t='1'then
q<="0011001";
t<='0';
elsif n="00010000"and t='1'then
q<="0010010";
t<='0';
elsif n="00100000"and t='1'then
q<="0000010";
t<='0';
elsif n="01000000"and t='1'then
q<="1111000";
t<='0';
elsif n="10000000"and t='1'then
q<="0000000";
t<='0';
end if;
end process;
end ;
library ieee;
use ieee.std_logic_1164.all;
entity qiangdaqi is
port(rest:in std_logic;
n:in std_logic_vector(7 downto 0);
q:out std_logic_vector(6 downto 0)
);
end ;
architecture one of qiangdaqi is
signal t:std_logic;
begin
process(rest)
begin
if rest='1' then
q<="1000000";
t<='1';
end if;
if n="00000001"and t='1'then
q<="1111001";
t<='0';
elsif n="00000010"and t='1'then
q<="0100100";
t<='0';
elsif n="00000100"and t='1'then
q<="0110000";
t<='0';
elsif n="00001000"and t='1'then
q<="0011001";
t<='0';
elsif n="00010000"and t='1'then
q<="0010010";
t<='0';
elsif n="00100000"and t='1'then
q<="0000010";
t<='0';
elsif n="01000000"and t='1'then
q<="1111000";
t<='0';
elsif n="10000000"and t='1'then
q<="0000000";
t<='0';
end if;
end process;
end ;
北京康思
2018-09-20 广告
2018-09-20 广告
电压的测量利用示波器所做的任何测量,都是归结为对电压的测量。示波器可以测量各种波形的电压幅度,既可以测量直流电压和正弦电压,又可以测量脉冲或非正弦电压的幅度。更有用的是它可以测量一个脉冲电压波形各部分的电压幅值,如上冲量或顶部下降量等。这是...
点击进入详情页
本回答由北京康思提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询