aboutsummaryrefslogtreecommitdiff
path: root/src/rtl/trng.v
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtl/trng.v')
-rw-r--r--src/rtl/trng.v176
1 files changed, 88 insertions, 88 deletions
diff --git a/src/rtl/trng.v b/src/rtl/trng.v
index e2b9212..7a63f50 100644
--- a/src/rtl/trng.v
+++ b/src/rtl/trng.v
@@ -6,33 +6,33 @@
//
//
// Author: Joachim Strombergson
-// Copyright (c) 2014, NORDUnet A/S All rights reserved.
+// Copyright (c) 2014, SUNET
+// All rights reserved.
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// - Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
//
-// - Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
//
-// - Neither the name of the NORDUnet nor the names of its contributors may
-// be used to endorse or promote products derived from this software
-// without specific prior written permission.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in
+// the documentation and/or other materials provided with the
+// distribution.
//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//======================================================================
@@ -107,7 +107,7 @@ module trng(
reg [2 : 0] debug_mux_reg;
reg [2 : 0] debug_mux_new;
- reg [2 : 0] debug_mux_we;
+ reg debug_mux_we;
reg [31 : 0] debug_delay_ctr_reg;
reg [31 : 0] debug_delay_ctr_new;
@@ -202,70 +202,70 @@ module trng(
//----------------------------------------------------------------
// core instantiations.
//----------------------------------------------------------------
- trng_mixer mixer(
- .clk(clk),
- .reset_n(reset_n),
-
- .cs(mixer_api_cs),
- .we(mixer_api_we),
- .address(api_address),
- .write_data(write_data),
- .read_data(mixer_api_read_data),
- .error(mixer_api_error),
-
- .discard(discard_reg),
- .test_mode(test_mode_reg),
- .security_error(mixer_security_error),
-
- .more_seed(csprng_more_seed),
-
- .entropy0_enabled(entropy0_entropy_enabled),
- .entropy0_syn(entropy0_entropy_syn),
- .entropy0_data(entropy0_entropy_data),
- .entropy0_ack(entropy0_entropy_ack),
-
- .entropy1_enabled(entropy1_entropy_enabled),
- .entropy1_syn(entropy1_entropy_syn),
- .entropy1_data(entropy1_entropy_data),
- .entropy1_ack(entropy1_entropy_ack),
-
- .entropy2_enabled(entropy2_entropy_enabled),
- .entropy2_syn(entropy2_entropy_syn),
- .entropy2_data(entropy2_entropy_data),
- .entropy2_ack(entropy2_entropy_ack),
-
- .seed_data(mixer_seed_data),
- .seed_syn(mixer_seed_syn),
- .seed_ack(csprng_seed_ack),
-
- .debug(mixer_debug),
- .debug_update(mixer_debug_update)
- );
-
- trng_csprng csprng(
- .clk(clk),
- .reset_n(reset_n),
-
- .cs(csprng_api_cs),
- .we(csprng_api_we),
- .address(api_address),
- .write_data(write_data),
- .read_data(csprng_api_read_data),
- .error(csprng_api_error),
-
- .discard(discard_reg),
- .test_mode(test_mode_reg),
- .security_error(csprng_security_error),
-
- .more_seed(csprng_more_seed),
-
- .seed_data(mixer_seed_data),
- .seed_syn(mixer_seed_syn),
- .seed_ack(csprng_seed_ack),
-
- .debug(csprng_debug),
- .debug_update(csprng_debug_update)
- );
+ trng_mixer mixer_inst(
+ .clk(clk),
+ .reset_n(reset_n),
+
+ .cs(mixer_api_cs),
+ .we(mixer_api_we),
+ .address(api_address),
+ .write_data(write_data),
+ .read_data(mixer_api_read_data),
+ .error(mixer_api_error),
+
+ .discard(discard_reg),
+ .test_mode(test_mode_reg),
+ .security_error(mixer_security_error),
+
+ .more_seed(csprng_more_seed),
+
+ .entropy0_enabled(entropy0_entropy_enabled),
+ .entropy0_syn(entropy0_entropy_syn),
+ .entropy0_data(entropy0_entropy_data),
+ .entropy0_ack(entropy0_entropy_ack),
+
+ .entropy1_enabled(entropy1_entropy_enabled),
+ .entropy1_syn(entropy1_entropy_syn),
+ .entropy1_data(entropy1_entropy_data),
+ .entropy1_ack(entropy1_entropy_ack),
+
+ .entropy2_enabled(entropy2_entropy_enabled),
+ .entropy2_syn(entropy2_entropy_syn),
+ .entropy2_data(entropy2_entropy_data),
+ .entropy2_ack(entropy2_entropy_ack),
+
+ .seed_data(mixer_seed_data),
+ .seed_syn(mixer_seed_syn),
+ .seed_ack(csprng_seed_ack),
+
+ .debug(mixer_debug),
+ .debug_update(mixer_debug_update)
+ );
+
+ trng_csprng csprng_inst(
+ .clk(clk),
+ .reset_n(reset_n),
+
+ .cs(csprng_api_cs),
+ .we(csprng_api_we),
+ .address(api_address),
+ .write_data(write_data),
+ .read_data(csprng_api_read_data),
+ .error(csprng_api_error),
+
+ .discard(discard_reg),
+ .test_mode(test_mode_reg),
+ .security_error(csprng_security_error),
+
+ .more_seed(csprng_more_seed),
+
+ .seed_data(mixer_seed_data),
+ .seed_syn(mixer_seed_syn),
+ .seed_ack(csprng_seed_ack),
+
+ .debug(csprng_debug),
+ .debug_update(csprng_debug_update)
+ );
avalanche_entropy entropy1(
.clk(clk),