From 88c5cdbeab13ce27ed793f1cae29a1dcbb216347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Thu, 20 Nov 2014 12:02:02 +0100 Subject: Updates after linting. --- src/rtl/trng_csprng.v | 100 +++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'src/rtl/trng_csprng.v') diff --git a/src/rtl/trng_csprng.v b/src/rtl/trng_csprng.v index c4576e8..f985be4 100644 --- a/src/rtl/trng_csprng.v +++ b/src/rtl/trng_csprng.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. // //====================================================================== @@ -198,40 +198,40 @@ module trng_csprng( //---------------------------------------------------------------- // core instantiation. //---------------------------------------------------------------- - chacha_core cipher( - .clk(clk), - .reset_n(reset_n), + chacha_core cipher_inst( + .clk(clk), + .reset_n(reset_n), - .init(cipher_init), - .next(cipher_next), + .init(cipher_init), + .next(cipher_next), - .key(cipher_key_reg), - .keylen(CIPHER_KEYLEN256), - .iv(cipher_iv_reg), - .ctr(cipher_ctr_reg), - .rounds(num_rounds_reg), + .key(cipher_key_reg), + .keylen(CIPHER_KEYLEN256), + .iv(cipher_iv_reg), + .ctr(cipher_ctr_reg), + .rounds(num_rounds_reg), - .data_in(cipher_block_reg), - .ready(cipher_ready), + .data_in(cipher_block_reg), + .ready(cipher_ready), - .data_out(cipher_data_out), - .data_out_valid(cipher_data_out_valid) - ); + .data_out(cipher_data_out), + .data_out_valid(cipher_data_out_valid) + ); - trng_csprng_fifo fifo( - .clk(clk), - .reset_n(reset_n), + trng_csprng_fifo fifo_inst( + .clk(clk), + .reset_n(reset_n), - .csprng_data(cipher_data_out), - .csprng_data_valid(fifo_cipher_data_valid), - .discard(fifo_discard), - .more_data(fifo_more_data), + .csprng_data(cipher_data_out), + .csprng_data_valid(fifo_cipher_data_valid), + .discard(fifo_discard), + .more_data(fifo_more_data), - .rnd_syn(rnd_syn), - .rnd_data(rnd_data), - .rnd_ack(muxed_rnd_ack) - ); + .rnd_syn(rnd_syn), + .rnd_data(rnd_data), + .rnd_ack(muxed_rnd_ack) + ); //---------------------------------------------------------------- @@ -397,7 +397,7 @@ module trng_csprng( ADDR_STATUS: begin - tmp_read_data = {ready_reg, rnd_syn}; + tmp_read_data = {30'h00000000, ready_reg, rnd_syn}; end ADDR_RND_DATA: -- cgit v1.2.3