opcode => opcode
);
- process
+ process (sys_clk, sys_res_n)
begin
- op1 <= op3;
- opcode <= DIV;
- op2 <= to_signed(2,CBITS);
+ if sys_res_n = '0' then
+ op1 <= (others => '0');
+ opcode <= NOP;
+ op2 <= (others => '0');
+ do_calc <= '0';
+ elsif rising_edge(sys_clk) then
+ op1 <= op3;
+ opcode <= DIV;
+ op2 <= to_signed(2,CBITS);
- do_calc <= calc_done;
- wait until sys_clk = '1';
+ do_calc <= calc_done;
+ end if;
end process;
end architecture top;