请问如何让程序中输入code的值赋值给信号q(程序可以编译通过但code不能实现赋值的功能) 10
libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitykzisport(...
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity kz is
port(clk : in std_logic;
L,E,G: in std_logic;
code: in std_logic_vector(4 downto 0);
c :out std_logic;
control : out std_logic_vector(4 downto 0)
);
end;
architecture aaa of kz is
signal q : std_logic_vector(4 downto 0):=code;
signal x : std_logic;
begin
process(L,G,E)
begin
if clk'event and clk='1' then
if L='1' then
q<=q+'1';x<='1';
end if;
if G='1' then
q<=q-'1';x<='1';
end if;
if E='1' then
end if;
end if;
end process;
control<=q;
c<=x;
end; 展开
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity kz is
port(clk : in std_logic;
L,E,G: in std_logic;
code: in std_logic_vector(4 downto 0);
c :out std_logic;
control : out std_logic_vector(4 downto 0)
);
end;
architecture aaa of kz is
signal q : std_logic_vector(4 downto 0):=code;
signal x : std_logic;
begin
process(L,G,E)
begin
if clk'event and clk='1' then
if L='1' then
q<=q+'1';x<='1';
end if;
if G='1' then
q<=q-'1';x<='1';
end if;
if E='1' then
end if;
end if;
end process;
control<=q;
c<=x;
end; 展开
1个回答
2011-04-27
展开全部
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3403762&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:3403762:47" alt="客服" title="客服"></a>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询