From 97976d1f01665b9d5b5469ad4b43d275824a41d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= <joachim@secworks.se>
Date: Thu, 25 Jun 2015 09:42:31 +0200
Subject: Added another state for setting s_mem_read_addr to allow shortcutting
 one cycle in each loop.

---
 src/rtl/montprod.v | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src')

diff --git a/src/rtl/montprod.v b/src/rtl/montprod.v
index 6959833..ee87b97 100644
--- a/src/rtl/montprod.v
+++ b/src/rtl/montprod.v
@@ -319,6 +319,11 @@ module montprod #(parameter OPW = 32, parameter ADW = 8)
             s_mem_read_addr = length_m1;
           end
 
+        CTRL_LOOP_BQ:
+          begin
+            s_mem_read_addr = length_m1;
+          end
+
         CTRL_CALC_ADD:
           begin
             //s = (s + q*M + b*A) >>> 1;, if(b==1) S+= A. Takes (1..length) cycles.
-- 
cgit v1.2.3