abba
Member level 2
i need a 2to1 decoder with dual clock in (rising edge!).
(or another one with this true-table:
RESET A_CLK D_CLK OUT
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 x x 0
)
i've a little problem with this because im a newby in vhdl. - thanx
this is my source:
###########
entity decoder_2to1 is
Port ( RESET : in STD_LOGIC;
A_CLK : in STD_LOGIC;
D_CLK : in STD_LOGIC;
D_OUT : out STD_LOGIC
);
end decoder_2to1;
architecture Behavioral of decoder_2to1 is
begin
process(A_CLK, D_CLK, RESET)
begin
if ( RESET = '1') then
D_OUT <= '0';
elsif ( A_CLK'event and A_CLK ='1') then
D_OUT <= '0';
elsif ( D_CLK'event and D_CLK ='1') then
D_OUT <= '1';
end if;
end process;
end Behavioral;
this is the error message (xilinx- project navigator):
#################################
Analyzing Entity <decoder_2to1> (Architecture <behavioral>).
ERROR:Xst:827 - D:/xilinx/busmonitor/d10_andreas_home/decoder_2to1.vhd line 30: Signal d_out cannot be synthesized, bad synchronous description.
-->
(or another one with this true-table:
RESET A_CLK D_CLK OUT
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 x x 0
)
i've a little problem with this because im a newby in vhdl. - thanx
this is my source:
###########
entity decoder_2to1 is
Port ( RESET : in STD_LOGIC;
A_CLK : in STD_LOGIC;
D_CLK : in STD_LOGIC;
D_OUT : out STD_LOGIC
);
end decoder_2to1;
architecture Behavioral of decoder_2to1 is
begin
process(A_CLK, D_CLK, RESET)
begin
if ( RESET = '1') then
D_OUT <= '0';
elsif ( A_CLK'event and A_CLK ='1') then
D_OUT <= '0';
elsif ( D_CLK'event and D_CLK ='1') then
D_OUT <= '1';
end if;
end process;
end Behavioral;
this is the error message (xilinx- project navigator):
#################################
Analyzing Entity <decoder_2to1> (Architecture <behavioral>).
ERROR:Xst:827 - D:/xilinx/busmonitor/d10_andreas_home/decoder_2to1.vhd line 30: Signal d_out cannot be synthesized, bad synchronous description.
-->