From 6afba1ff3ec4b4f6f7e31f788d86206b8b53748d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Mon, 5 Oct 2015 13:11:33 +0200 Subject: (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. --- src/rtl/trng.v | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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: -- cgit v1.2.3