小弟跪求:怎么把下面程序放到EPF10K10LC84-4管脚上

来源:百度知道 编辑:UC知道 时间:2024/06/05 07:32:48
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity count10 is
port( clk:in std_logic; --1hz
en:in std_logic;
clr:in std_logic;
up,dn:in std_logic;
dout:out std_logic_vector(3 downto 0)
);
end count10;
architecture behav of count10 is
signal q:integer range 0 to 9;

begin

process(clk,clr)
begin
if clr='1' then q<=3;
elsif clk'event and clk='1' then
if en='1' then
if up='1' then
if q<9 then q<=q+1;
else q<=3;end if;

elsif dn='1' then
if q>0 then q<=q-1;
else q<=3;end if;
end if;

end if;
end if;
end process;

dout<=conv_std_logic_vector (q,4);
end behav;
--*************************************************************
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;

entity zlqdq is
port(clk:in std_logic; --4MHz
key:in std_logic_vector(3 downto 0); --4组抢答键
clr:in std_logic; --系统清零 键
start:in std_logic; --开始键,复位键
startled:out std_logic; --开始标志
wrong:in std_logic; --减分键
wled:out std_logic; --减分标志
right:in std_logic; --加分键
rled:out std_logic; --加分标志
selout:out std_logic_vector(5 downto 0);--扫描信号
segout:out std_logic_vector(6 downto 0);--数码显示
ring:out std_logic --响铃信号
);
end zlqdq;

architecture behav of zlqdq is
component Debunce --消除弹跳
PORT(
CP : IN STD_LOGIC; -- CLOCK 4MHZ
Key : IN STD_LOGIC; -- Input Signal
DOUT : OUT STD_LOGIC -- Debounce O/P

);
END component;
component count10 --可控加减计数器
port(clk:in std_logic; --1hz
en:in std_logic;
clr:in std_logic;
up,dn:in std_log