diff options
author | Joachim StroĢmbergson <joachim@secworks.se> | 2015-10-05 13:11:33 +0200 |
---|---|---|
committer | Joachim StroĢmbergson <joachim@secworks.se> | 2015-10-05 13:11:33 +0200 |
commit | 6afba1ff3ec4b4f6f7e31f788d86206b8b53748d (patch) | |
tree | 5a9eb22f22f8c3e726a971b2881029809cf4ddb6 /src | |
parent | 8dcb4d016e3f6fe18da0e00ddb21f3bf5859cd5b (diff) |
(1) Changed API addresses for ctrl and status registers - HEADSUP: this might break SW that tries to do discard. Updated core version to reflect api changes. (2) Added support for reading discard and test mode bits in control register.
Diffstat (limited to 'src')
-rw-r--r-- | src/rtl/trng.v | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rtl/trng.v b/src/rtl/trng.v index 728fa39..06af515 100644 --- a/src/rtl/trng.v +++ b/src/rtl/trng.v @@ -76,17 +76,18 @@ module trng( localparam ADDR_NAME1 = 8'h01; localparam ADDR_VERSION = 8'h02; - localparam ADDR_TRNG_CTRL = 8'h10; + localparam ADDR_TRNG_CTRL = 8'h08; localparam TRNG_CTRL_DISCARD_BIT = 0; localparam TRNG_CTRL_TEST_MODE_BIT = 1; - localparam ADDR_TRNG_STATUS = 8'h11; + localparam ADDR_TRNG_STATUS = 8'h09; + localparam ADDR_DEBUG_CTRL = 8'h12; localparam ADDR_DEBUG_DELAY = 8'h13; localparam TRNG_NAME0 = 32'h74726e67; // "trng" localparam TRNG_NAME1 = 32'h20202020; // " " - localparam TRNG_VERSION = 32'h302e3530; // "0.50" + localparam TRNG_VERSION = 32'h302e3531; // "0.51" // 20x/s @ 50 MHz. localparam DEFAULT_DEBUG_DELAY = 32'h002625a0; @@ -556,6 +557,7 @@ module trng( ADDR_TRNG_CTRL: begin + trng_api_read_data = {30'h0000000, test_mode_reg, discard_reg}; end ADDR_TRNG_STATUS: |