[Cryptech-Commits] [core/rng/avalanche_entropy] 01/01: Remove the delayed read for EIM (see core/platform/novena commit 2f58e8f).

git at cryptech.is git at cryptech.is
Tue Apr 28 22:07:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch master
in repository core/rng/avalanche_entropy.

commit 4a0c59617c582ef3f0e558067f913309db772f75
Author: Paul Selkirk <paul at psgd.org>
Date:   Tue Apr 28 18:01:56 2015 -0400

    Remove the delayed read for EIM (see core/platform/novena commit 2f58e8f).
---
 src/rtl/avalanche_entropy.v | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/src/rtl/avalanche_entropy.v b/src/rtl/avalanche_entropy.v
index af04c91..3774f27 100644
--- a/src/rtl/avalanche_entropy.v
+++ b/src/rtl/avalanche_entropy.v
@@ -94,8 +94,7 @@ module avalanche_entropy(
   //----------------------------------------------------------------
   // Registers including update variables and write enable.
   //----------------------------------------------------------------
-  reg [31 : 0] read_data_hold_reg;
-  reg [31 : 0] read_data_hold_new;
+  reg [31 : 0] tmp_read_data;
 
   reg          enable_reg;
   reg          enable_new;
@@ -113,7 +112,7 @@ module avalanche_entropy(
   //----------------------------------------------------------------
   // Concurrent connectivity for ports etc.
   //----------------------------------------------------------------
-  assign read_data       = read_data_hold_reg;
+  assign read_data       = tmp_read_data;
   assign error           = tmp_error;
   assign security_error  = 0;
 
@@ -148,14 +147,10 @@ module avalanche_entropy(
     begin
       if (!reset_n)
         begin
-          read_data_hold_reg <= 32'h00000000;
           enable_reg         <= 1;
         end
       else
         begin
-          if (cs)
-            read_data_hold_reg <= read_data_hold_new;
-
           if (enable_we)
             enable_reg <= enable_new;
         end
@@ -167,7 +162,7 @@ module avalanche_entropy(
   //----------------------------------------------------------------
   always @*
     begin : api_logic
-      read_data_hold_new = 32'h00000000;
+      tmp_read_data = 32'h00000000;
       tmp_error          = 1'b0;
       enable_new         = 0;
       enable_we          = 0;
@@ -195,37 +190,37 @@ module avalanche_entropy(
               case (address)
                 ADDR_NAME0:
                   begin
-                    read_data_hold_new = CORE_NAME0;
+                    tmp_read_data = CORE_NAME0;
                   end
 
                 ADDR_NAME1:
                   begin
-                    read_data_hold_new = CORE_NAME1;
+                    tmp_read_data = CORE_NAME1;
                   end
 
                 ADDR_VERSION:
                   begin
-                    read_data_hold_new = CORE_VERSION;
+                    tmp_read_data = CORE_VERSION;
                   end
 
                 ADDR_CTRL:
                   begin
-                    read_data_hold_new = {31'h00000000, enable_reg};
+                    tmp_read_data = {31'h00000000, enable_reg};
                   end
 
                 ADDR_STATUS:
                   begin
-                    read_data_hold_new = {31'h00000000, entropy_valid};
+                    tmp_read_data = {31'h00000000, entropy_valid};
                    end
 
                 ADDR_ENTROPY:
                   begin
-                    read_data_hold_new = entropy_data;
+                    tmp_read_data = entropy_data;
                   end
 
                 ADDR_DELTA:
                   begin
-                    read_data_hold_new = delta;
+                    tmp_read_data = delta;
                   end
 
                 default:



More information about the Commits mailing list