[Cryptech-Commits] [core/rng/trng] 01/01: make cores contiguous, add mixer name/version
git at cryptech.is
git at cryptech.is
Wed Jun 10 16:41:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
paul at psgd.org pushed a commit to branch config_core_selector
in repository core/rng/trng.
commit a1c1b2afb0b437dc195b5103e3ae46395b0cd2f7
Author: Paul Selkirk <paul at psgd.org>
Date: Wed Jun 10 12:39:47 2015 -0400
make cores contiguous, add mixer name/version
---
src/rtl/trng.v | 8 ++++----
src/rtl/trng_mixer.v | 17 +++++++++++++++++
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/rtl/trng.v b/src/rtl/trng.v
index 728fa39..9e8bf69 100644
--- a/src/rtl/trng.v
+++ b/src/rtl/trng.v
@@ -61,10 +61,10 @@ module trng(
// Internal constant and parameter definitions.
//----------------------------------------------------------------
localparam TRNG_PREFIX = 4'h0;
- localparam ENTROPY1_PREFIX = 4'h5;
- localparam ENTROPY2_PREFIX = 4'h6;
- localparam MIXER_PREFIX = 4'ha;
- localparam CSPRNG_PREFIX = 4'hb;
+ localparam ENTROPY1_PREFIX = 4'h1;
+ localparam ENTROPY2_PREFIX = 4'h2;
+ localparam MIXER_PREFIX = 4'h3;
+ localparam CSPRNG_PREFIX = 4'h4;
localparam DEBUG_ENTROPY0 = 3'h0;
localparam DEBUG_ENTROPY1 = 3'h1;
diff --git a/src/rtl/trng_mixer.v b/src/rtl/trng_mixer.v
index 449dc5c..97777ac 100644
--- a/src/rtl/trng_mixer.v
+++ b/src/rtl/trng_mixer.v
@@ -97,6 +97,10 @@ module trng_mixer(
parameter CTRL_ACK = 4'h4;
parameter CTRL_NEXT = 4'h5;
+ localparam ADDR_NAME0 = 8'h00;
+ localparam ADDR_NAME1 = 8'h01;
+ localparam ADDR_VERSION = 8'h02;
+
parameter ADDR_MIXER_CTRL = 8'h10;
parameter MIXER_CTRL_ENABLE_BIT = 0;
parameter MIXER_CTRL_RESTART_BIT = 1;
@@ -105,6 +109,10 @@ module trng_mixer(
parameter DEFAULT_ENTROPY_TIMEOUT = 24'h100000;
+ parameter CORE_NAME0 = 32'h726e676d; // "rngm"
+ parameter CORE_NAME1 = 32'h69786572; // "ixer"
+ parameter CORE_VERSION = 32'h302e3530; // "0.50"
+
//----------------------------------------------------------------
// Registers including update variables and write enable.
@@ -523,6 +531,15 @@ module trng_mixer(
// Read operations.
case (address)
// Read operations.
+ ADDR_NAME0:
+ tmp_read_data = CORE_NAME0;
+
+ ADDR_NAME1:
+ tmp_read_data = CORE_NAME1;
+
+ ADDR_VERSION:
+ tmp_read_data = CORE_VERSION;
+
ADDR_MIXER_CTRL:
begin
tmp_read_data = {30'h00000000, restart_reg, enable_reg};
More information about the Commits
mailing list