[Actel FPGA] 请大家帮我看看,VHDL 语句的毛病

[复制链接]
2500|2
 楼主| kakasisi 发表于 2009-9-27 19:05 | 显示全部楼层 |阅读模式
这是一个 带清零的8位并行加载移位寄存器;



library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity ks is
port (clk:in std_logic;
      a,b,c,d,e,f,g,h:in std_logic;
      fe,sl,clr:in std_logic;
      q:out std_logic);
end;
architecture one of ks is
signal temp:std_logic_vector(7 downto 0);
begin
process(clk,sl,fe,clr)
begin
if (clr='0')then
temp<="00000000";
q<=temp(7);
elsif((clk'event) and (clk='1')and fe='0')then
if (sl='0')then
temp(0)<=a;
temp(1)<=temp(0);
temp(2)<=temp(1);
temp(3)<=temp(2);
temp(4)<=temp(3);
temp(5)<=temp(4);
temp(6)<=temp(5);
temp(7)<=temp(6);
q<=temp(7);
end if;
end if;
end process;
end;
synics 发表于 2009-10-24 21:07 | 显示全部楼层
呵呵,只回答问题,不看程序啦
synics 发表于 2009-10-24 21:07 | 显示全部楼层
原因很简单,我不知道你想干什么
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

3

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部