ok heres is one of the components. It just takes an input from one of
two inputs and places it into a fifo. I get the following warnings when
synthesising it:
rnitop_rni_downstream_Mux1__n0030(rnitop_rni_downstream_Mux1__n0030:O)|
NONE(*)(rnitop_rni_downstream_Mux1_muwr_ack)| 1 |
rnitop_rni_downstream_Mux1__n0031(rnitop_rni_downstream_Mux1__n0031:O)|
NONE(*)(rnitop_rni_downstream_Mux1_vcwr_ack)| 1 |
rnitop_rni_downstream_Mux1_State_FFd5:Q| NONE | 1
|
rnitop_rni_downstream_Mux1__n0032(rnitop_rni_downstream_Mux1__n0032:O)|
NONE(*)(rnitop_rni_downstream_Mux1_fdata_106)| 121 |
Code:
library ieee;
use ieee.std_logic_1164.all;
entity mux1_downstream is
port (
Clk,Reset : in std_logic;
--to vc_downstream
vcdata : in std_logic_vector(127 downto 0);
vcwr_ack : out std_logic;
vcwr_en : in std_logic;
--to FIFO2_downstream
fdata : out std_logic_vector(127 downto 0);
fwr_en : out std_logic;
fwr_ack : in std_logic;
--to mux1_uppstream
mudata : in std_logic_vector(127 downto 0);
muwr_ack : out std_logic;
muwr_en : in std_logic);
end mux1_downstream;
architecture Arch_mux1_downstream of mux1_downstream is
type State_type is (SInit,S0,S1,S1_1,S2,S2_1,S3);
signal State : State_type := SInit;
signal Next_state : State_type := SInit;
begin
Clock: process (Clk,Reset, Next_state)
begin
if Reset = '0' then
State <= SInit;
elsif Clk = '1' and Clk'event then
State <= Next_state;
end if;
end process;
transition: process(State, vcwr_en, vcdata, mudata, muwr_en, fwr_ack)
begin
case State is
when SInit =>
fdata <= (others => '0');
fwr_en <= '0';
vcwr_ack <= '0';
muwr_ack <= '0';
Next_state <= S0;
--------------------------------------------------------------------------------------------------------
when S0 =>
if muwr_en = '1' then
fdata <= mudata;
Next_state <= S1;
elsif vcwr_en = '1' then
fdata <= vcdata;
Next_state <= S2;
else
Next_state <= S0;
end if;
--------------------------------------------------------------------------------------------------------
--for mux
when S1 =>
fwr_en <= '1';
Next_state <= S1_1;
when S1_1 =>
if fwr_ack = '1' then
fwr_en <= '0';
muwr_ack <= '1';
Next_state <= SInit;
else
Next_state <= S1_1;
end if;
-------------------------------------------------------------------------------------------------------
--for vc
when S2 =>
fwr_en <= '1';
Next_state <= S2_1;
when S2_1 =>
if fwr_ack = '1' then
fwr_en <= '0';
vcwr_ack <= '1';
Next_state <= SInit;
else
Next_state <= S2_1;
end if;
--------------------------------------------------------------------------------------------------------
when others =>
fdata <= (others => '0');
fwr_en <= '0';
vcwr_ack <= '0';
muwr_ack <= '0';
end case;
end process;
end Arch_mux1_downstream;