下面是修改后的程序和功能仿真图
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY wc IS
PORT
(
clock: IN STD_LOGIC;
reset: IN STD_LOGIC;
req0,req1,req2,req3,req4,req5: IN STD_LOGIC;
dataout0,dataout1,dataout2,dataout3,dataout4,dataout5: IN STD_LOGIC;
gnt0,gnt1,gnt2,gnt3,gnt4,gnt5: IN STD_LOGIC;
frame : IN STD_LOGIC;
req10,req11,req12,req13,req14,req15: OUT STD_LOGIC
);
END wc;
ARCHITECTURE a OF wc IS
signal tmp0,tmp1,tmp2,tmp3,tmp4,tmp5: std_logic;
signal dataout_rise0,dataout_rise1,dataout_rise2,dataout_rise3,dataout_rise4,dataout_rise5: std_logic;
signal frame0:std_logic;
signal frame_rise:std_logic;
BEGIN
p1:process(clock,dataout_rise0,gnt0,frame_rise,reset)
begin
if clock'event and clock='1' then
if(reset='0' or dataout_rise0='1' ) then
req10<='1';
elsif(reset='1' or (gnt0='0' and frame_rise='1'))then
req10<=req0;
end if;
end if;
end process p1;
p2:process(clock)
begin
if clock'event and clock='1' then
tmp0 <=dataout0;
end if;
end process p2;
dataout_rise0<='1' when (dataout0='0' and tmp0='1') else
'0';
p3:process(clock,dataout_rise1,gnt1,frame_rise,reset)
begin
if clock'event and clock='1' then
if(reset='0' or dataout_rise1='1' ) then
req11<='1';
elsif(reset='1' or (gnt1='0' and frame_rise='1'))then
req11<=req1;
end if;
end if;
end process p3;
p4:process(clock)
begin
if clock'event and clock='1' then
tmp1 <=dataout1;
end if;
end process p4;
dataout_rise1<='1' when (dataout1='0' and tmp1='1') else
'0';
p5:process(clock,dataout_rise2,gnt2,frame_rise,reset)
begin
if clock'event and clock='1' then
if(reset='0' or dataout_rise2='1' ) then
req12<='1';
elsif(reset='1' or (gnt2='0' and frame_rise='1'))then
req12<=req2;
end if;
end if;
end process p5;
p6:process(clock)
begin
if clock'event and clock='1' then
tmp2 <=dataout2;
end if;
end process p6;
dataout_rise2<='1' when (dataout2='0' and tmp2='1') else
'0';
p7:process(clock,dataout_rise3,gnt3,frame_rise,reset)
begin
if clock'event and clock='1' then
if(reset='0' or dataout_rise3='1' ) then
req13<='1';
elsif(reset='1' or (gnt3='0' and frame_rise='1'))then
req13<=req3;
end if;
end if;
end process p7;
p8:process(clock)
begin
if clock'event and clock='1' then
tmp3 <=dataout3;
end if;
end process p8;
dataout_rise3<='1' when (dataout3='0' and tmp3='1') else
'0';
p9:process(clock,dataout_rise4,gnt4,frame_rise,reset)
begin
if clock'event and clock='1' then
if(reset='0' or dataout_rise4='1' ) then
req14<='1';
elsif(reset='1' or (gnt4='0' and frame_rise='1'))then
req14<=req4;
end if;
end if;
end process p9;
p10:process(clock)
begin
if clock'event and clock='1' then
tmp4 <=dataout4;
end if;
end process p10;
dataout_rise4<='1' when (dataout4='0' and tmp4='1') else
'0';
p11:process(clock,dataout_rise5,gnt5,frame_rise,reset)
begin
if clock'event and clock='1' then
if(reset='0' or dataout_rise5='1' ) then
req15<='1';
elsif(reset='1' or (gnt5='0' and frame_rise='1'))then
req15<=req5;
end if;
end if;
end process p11;
p12:process(clock)
begin
if clock'event and clock='1' then
tmp5 <=dataout5;
end if;
end process p12;
dataout_rise5<='1' when (dataout5='0' and tmp5='1') else
'0';
p14:process(clock)
begin
if clock'event and clock='1' then
frame0 <=frame;
end if;
end process p14;
frame_rise<='1' when (frame='0' and frame0='1') else
'0';
END a; |