From e824aac0bcc65c877cb22a0168ffa7735ee75677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Fri, 14 Nov 2014 13:10:41 +0100 Subject: Adding hard coded core name and version strings accessible through the core api. --- src/rtl/avalanche_entropy.v | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/rtl/avalanche_entropy.v b/src/rtl/avalanche_entropy.v index bbaa770..a9f69c9 100644 --- a/src/rtl/avalanche_entropy.v +++ b/src/rtl/avalanche_entropy.v @@ -72,6 +72,10 @@ module avalanche_entropy( //---------------------------------------------------------------- // Internal constant and parameter definitions. //---------------------------------------------------------------- + parameter ADDR_NAME0 = 8'h00; + parameter ADDR_NAME1 = 8'h01; + parameter ADDR_VERSION = 8'h02; + parameter ADDR_CTRL = 8'h10; parameter CTRL_ENABLE_BIT = 0; @@ -82,6 +86,11 @@ module avalanche_entropy( parameter ADDR_DELTA = 8'h30; + parameter CORE_NAME0 = 32'h6578746e; // "extn" + parameter CORE_NAME1 = 32'h6f697365; // "oise" + parameter CORE_VERSION = 32'h302e3130; // "0.10" + + //---------------------------------------------------------------- // Registers including update variables and write enable. //---------------------------------------------------------------- @@ -178,10 +187,24 @@ module avalanche_entropy( end endcase // case (address) end // if (we) - else begin case (address) + ADDR_NAME0: + begin + tmp_read_data = CORE_NAME0; + end + + ADDR_NAME1: + begin + tmp_read_data = CORE_NAME1; + end + + ADDR_VERSION: + begin + tmp_read_data = CORE_VERSION; + end + ADDR_CTRL: begin tmp_read_data = {31'h00000000, enable_reg}; -- cgit v1.2.3