Altera_Forum
Honored Contributor
13 years agoproblem with custom istruction: clk_en never changes
hello
i'm trying to do a multicycle custom instruction in oder to pilot a led. my problem is the fact that the clk_en never takes the value '1', it always remains to '0' (seen from signaltab) and i don' know why. that is the code that i'm using : l port ( clk : in std_logic; reset: in std_logic; clk_en: in std_logic; dataa : in std_logic_vector (31 downto 0); datab : in std_logic_vector (31 downto 0); result: out std_logic_vector (31 downto 0); coe_conduitOn_export: out std_logic ); end entity; architecture rtl of turnOn is -- RTL au lieu de led signal result_i: std_logic_vector (31 downto 0); signal zero :std_logic_vector(31 downto 0); begin process(clk) begin if(reset = '1') then result <= (others=>'0'); coe_conduitOn_export<='0'; else if(clk_en='1') then if (rising_edge(clk))then coe_conduitOn_export<= dataa(0);--dataa(0); result <= dataa or datab; end if; else result <= (others=>'0'); coe_conduitOn_export<='0'; end if; end if; end process; please help me.