aboutsummaryrefslogtreecommitdiffstats
path: root/boothmul.v
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-04-21 17:39:18 +0000
committerGravatar Peter McGoron 2023-04-21 17:39:18 +0000
commit619734f54eaa8ab12214174b97e3bfca5be9ca1a (patch)
tree5e081f59ff6b0ffe9abaa95dd40aea8048e86a4c /boothmul.v
parentlicense and bump version (diff)
add reset pinHEAD1.1master
Diffstat (limited to 'boothmul.v')
-rw-r--r--boothmul.v10
1 files changed, 8 insertions, 2 deletions
diff --git a/boothmul.v b/boothmul.v
index b6b96d5..5583004 100644
--- a/boothmul.v
+++ b/boothmul.v
@@ -1,4 +1,4 @@
-/* Booth Multiplication v1.0
+/* Booth Multiplication v1.1
* Written by Peter McGoron, 2022.
*
* This source describes Open Hardware and is licensed under the
@@ -25,6 +25,7 @@ module boothmul
)
(
input clk,
+ input rst_L,
input arm,
input [A1_LEN-1:0] a1,
input [A2_LEN-1:0] a2,
@@ -104,7 +105,12 @@ assign debug_state = loop_accul;
`endif
always @ (posedge clk) begin
- if (!arm) begin
+ if (!rst_L) begin
+ loop_accul <= 0;
+ fin <= 0;
+ p <= 0;
+ a1_reg <= 0;
+ end else if (!arm) begin
loop_accul <= 0;
fin <= 0;
end else if (loop_accul == 0) begin