projects
/
hwmod.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quartus fuer windows:
[hwmod.git]
/
src
/
calc.vhd
diff --git
a/src/calc.vhd
b/src/calc.vhd
index c17199c00fef0f085f43628b8cf4260ee7c0813a..7347002dcd823619e8d00e7ef18358d3f9a41645 100644
(file)
--- a/
src/calc.vhd
+++ b/
src/calc.vhd
@@
-44,14
+44,20
@@
begin
opcode => opcode
);
opcode => opcode
);
- process
+ process
(sys_clk, sys_res_n)
begin
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;
end process;
end architecture top;