aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2014-11-14 13:10:41 +0100
committerJoachim StroĢˆmbergson <joachim@secworks.se>2014-11-14 13:10:41 +0100
commite824aac0bcc65c877cb22a0168ffa7735ee75677 (patch)
tree95a9f62721661c330161b04cc56d89751df7bd35 /src
parentca53c8ca329ced2c983e7ffba4b41fd8da1de022 (diff)
Adding hard coded core name and version strings accessible through the core api.
Diffstat (limited to 'src')
-rw-r--r--src/rtl/avalanche_entropy.v25
1 files changed, 24 insertions, 1 deletions
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};