找回密码
 注册
搜索
查看: 2078|回复: 0

[讨论] 很急呀,请高手指点.谢谢

[复制链接]
发表于 2006-12-28 08:58:38 | 显示全部楼层 |阅读模式
这是一fifo 的控制程序,逻辑仿真正确,但综合总是出现以下问题,请高手指点,谢谢
@W: CL113 :"E:\pll\plld\fifo.vhd":38:4:38:5|Feedback mux created for signal x.
@W: CL113 :"E:\pll\plld\fifo.vhd":38:4:38:5|Feedback mux created for signal reg4.
@W: CL113 :"E:\pll\plld\fifo.vhd":38:4:38:5|Feedback mux created for signal reg3.
@W: CL113 :"E:\pll\plld\fifo.vhd":38:4:38:5|Feedback mux created for signal reg2.
@W: CL113 :"E:\pll\plld\fifo.vhd":38:4:38:5|Feedback mux created for signal reg1.
@W: CL190 :"E:\pll\plld\fifo.vhd":38:4:38:5|Optimizing register bit x to a constant 1
@W: CL159 :"E:\pll\plld\fifo.vhd":11:8:11:14|Input fifo_or is unused
@W: CL159 :"E:\pll\plld\fifo.vhd":11:20:11:26|Input fifo_hf is unused


library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity fifo is
port(   FIFO_OR,clk,FIFO_HF,clr:in std_logic;   
        int2,write1,write2,read1,read2,fifo_reset : out std_logic);
end fifo;
architecture clk of fifo is
SIGNAL  Y :STD_LOGIC;
begin  
process(clk,clr)
variable reg:integer range 0 to 3;
begin
  if clr='1'  then
           y<='0';
           reg:=0;
          fifo_reset<='0';
     elsif clk'event  and  clk='1'  then      
       if  reg<3  then
           Y<='0';               
           reg:=reg+1;
       ELSE
           Y<='1';                    
       END IF;
       fifo_reset<=Y;
  END IF;                  
end process;
PROCESS(FIFO_OR,fifo_hf,clr,clk,y)
   VARIABLE reg1,reg2,reg3,reg4,X :STD_LOGIC;
BEGIN                 
    if          clr='1'       then
                reg1:='0';
                reg2:='0';
                reg3:='0';
                reg4:='0';  
                  x:='1';        
                 --   INT2<='1';   
      elsif   y='1' and   clk'event and clk='1'      then
                    
            if   FIFO_or'EVENT AND FIFO_or='1'       THEN
                     reg1:='1';
                     reg2:='1';
                    
                     x:='1';     --close inter                             
            elsif    FIFO_hf'EVENT AND FIFO_hf='1'  THEN
                     reg1:='0';
                     reg2:='0';  
                  
                     x:='0';        --open read clk
            elsif    FIFO_hf'EVENT AND FIFO_hf='0'       THEN
                     reg3:='1';
                     reg4:='1';
               
                     x:='1';        --close inter               
            elsif    FIFO_or'EVENT AND FIFO_or='0'       THEN  
                     reg3:='0';
                     reg4:='0';
                    
                     x:='0';     --OPEN INTER
            else
                     x:='1';
            end if;
                    
          end if;
       INT2<=X;  
       write1<=reg1;
       write2<=reg2;
       read1<=reg3;
       read2<=reg4;
  
            
END PROCESS;
end clk;
单选投票, 共有 0 人参与投票

距结束还有: 3513 天14 小时37 分钟

您所在的用户组没有投票权限
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-9-29 18:21 , Processed in 0.053413 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表