2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
9 sys_clk : in std_logic;
10 sys_res_n : in std_logic;
15 do_calc : in std_logic;
17 calc_done : out std_logic
21 architecture beh of alu is
22 type ALU_STATE is (SIDLE, SADD, SSUB, SMUL, SDIV, SDONE);
23 signal state, state_next : ALU_STATE;
24 signal done_intern : std_logic;
27 process(sys_clk, sys_res_n)
29 if sys_res_n = '0' then
31 elsif rising_edge(sys_clk) then
37 process(state, opcode, done_intern)
39 -- set a default value for next state
41 -- next state berechnen
57 if done_intern = '1' then
61 if done_intern = '1' then
65 if done_intern = '1' then
69 if done_intern = '1' then
82 op3 <= (others => '0');
105 end architecture beh;