打印
[Actel FPGA]

请大家帮我看看,VHDL 语句的毛病

[复制链接]
1125|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

粉丝