Altera_Forum
Honored Contributor
14 years agoerror in dual edge dff in vhdl
Some where in web I found a dual edge DFF in vhdl and add to my cyclone iii project, after compiling there comes a strange error message :
Error (10327): VHDL error at fdff.vhd(20): can't determine definition of operator ""="" -- found 0 possible definitions and my codes are : library IEEE ; use IEEE.STD_LOGIC_1164.ALL,IEEE.Numeric_std.ALL; entity edff is generic ( impl_rn : integer := 1 ; impl_sn : integer := 1 ) ; port ( rn : in std_ulogic ; sn : in std_ulogic ; d : in std_ulogic ; c : in std_ulogic ; q : out std_ulogic ) ; end edff ; architecture behavior of edff is signal ff_rise , ff_fall : std_ulogic ; begin process ( rn , sn , c ) begin if ( impl_rn = 1 and rn = 0 ) then ff_rise <= 0; elsif ( impl_sn = 1 and sn = 0 ) then ff_rise <= 1; elsif rising_edge ( c ) then if ( d = 1 ) then ff_rise <= not( ff_fall ) ; else ff_rise <= ff_fall ; end if ; end if ; end process ; process ( rn , sn , c ) begin if ( implrn =1 AND rn = 0 ) then ff_fall <= 0; elsif ( implsn =1 AND sn = 0 ) then ff_fall <= 0; elsif falling_edge ( c ) then if ( d = 1 ) then ff_fall <= not( ff_rise ) ; else ff_fall <= ff_rise ; end if ; end if ; end process ; q <= 0 when ( implrn =1 AND rn = 0 ) else 1 when ( impl_sn =1 AND sn = 0 ) else ff_ris XOR ff_fall ; end behavior ; Can someones help me solve this problem ???