diff options
author | Paul Selkirk <paul@psgd.org> | 2015-06-10 12:39:47 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2015-06-10 12:39:47 -0400 |
commit | a1c1b2afb0b437dc195b5103e3ae46395b0cd2f7 (patch) | |
tree | a07de4d196aeeaea14ec62193f2c047fadd6a176 /src | |
parent | d5974ed0d389f8953b23d98bb69b1576adad27b8 (diff) |
make cores contiguous, add mixer name/version
Diffstat (limited to 'src')
-rw-r--r-- | src/rtl/trng.v | 8 | ||||
-rw-r--r-- | 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}; |