aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rtl/trng_mixer.v50
1 files 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;
//----------------------------------------------------------------