|
这是一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; |
|