[Cryptech-Commits] [core/rng/trng] branch master updated: Added control FSM states to handle entropy for testing. Nits: Changed to localparam.

git at cryptech.is git at cryptech.is
Mon Sep 21 15:02:07 UTC 2015


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

joachim at secworks.se pushed a commit to branch master
in repository core/rng/trng.

The following commit(s) were added to refs/heads/master by this push:
       new  8dcb4d0   Added control FSM states to handle entropy for testing. Nits: Changed to localparam.
8dcb4d0 is described below

commit 8dcb4d016e3f6fe18da0e00ddb21f3bf5859cd5b
Author: Joachim Strömbergson <joachim at secworks.se>
Date:   Mon Sep 21 17:01:57 2015 +0200

    Added control FSM states to handle entropy for testing. Nits: Changed to localparam.
---
 src/rtl/trng_mixer.v | 50 ++++++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/src/rtl/trng_mixer.v b/src/rtl/trng_mixer.v
index 449dc5c..0d565c7 100644
--- a/src/rtl/trng_mixer.v
+++ b/src/rtl/trng_mixer.v
@@ -80,30 +80,32 @@ module trng_mixer(
   //----------------------------------------------------------------
   // Internal constant and parameter definitions.
   //----------------------------------------------------------------
-  parameter MODE_SHA_512 = 2'h3;
-
-  parameter ENTROPY_IDLE     = 4'h0;
-  parameter ENTROPY_SRC0     = 4'h1;
-  parameter ENTROPY_SRC0_ACK = 4'h2;
-  parameter ENTROPY_SRC1     = 4'h3;
-  parameter ENTROPY_SRC1_ACK = 4'h4;
-  parameter ENTROPY_SRC2     = 4'h5;
-  parameter ENTROPY_SRC2_ACK = 4'h6;
-
-  parameter CTRL_IDLE    = 4'h0;
-  parameter CTRL_COLLECT = 4'h1;
-  parameter CTRL_MIX     = 4'h2;
-  parameter CTRL_SYN     = 4'h3;
-  parameter CTRL_ACK     = 4'h4;
-  parameter CTRL_NEXT    = 4'h5;
-
-  parameter ADDR_MIXER_CTRL        = 8'h10;
-  parameter MIXER_CTRL_ENABLE_BIT  = 0;
-  parameter MIXER_CTRL_RESTART_BIT = 1;
-  parameter ADDR_MIXER_STATUS      = 8'h11;
-  parameter ADDR_MIXER_TIMEOUT     = 8'h20;
-
-  parameter DEFAULT_ENTROPY_TIMEOUT = 24'h100000;
+  localparam MODE_SHA_512 = 2'h3;
+
+  localparam ENTROPY_IDLE     = 4'h0;
+  localparam ENTROPY_SRC0     = 4'h1;
+  localparam ENTROPY_SRC0_ACK = 4'h2;
+  localparam ENTROPY_SRC1     = 4'h3;
+  localparam ENTROPY_SRC1_ACK = 4'h4;
+  localparam ENTROPY_SRC2     = 4'h5;
+  localparam ENTROPY_SRC2_ACK = 4'h6;
+  localparam TEST_ENTROPY     = 4'he;
+  localparam TEST_ENTROPY_ACK = 4'hf;
+
+  localparam CTRL_IDLE    = 4'h0;
+  localparam CTRL_COLLECT = 4'h1;
+  localparam CTRL_MIX     = 4'h2;
+  localparam CTRL_SYN     = 4'h3;
+  localparam CTRL_ACK     = 4'h4;
+  localparam CTRL_NEXT    = 4'h5;
+
+  localparam ADDR_MIXER_CTRL        = 8'h10;
+  localparam MIXER_CTRL_ENABLE_BIT  = 0;
+  localparam MIXER_CTRL_RESTART_BIT = 1;
+  localparam ADDR_MIXER_STATUS      = 8'h11;
+  localparam ADDR_MIXER_TIMEOUT     = 8'h20;
+
+  localparam DEFAULT_ENTROPY_TIMEOUT = 24'h100000;
 
 
   //----------------------------------------------------------------

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list