Entity: arith_prng
- File: arith_prng.vhdl
Diagram
Description
EMACS settings: -- tab-width: 2; indent-tabs-mode: t -- vim: tabstop=2:shiftwidth=2:noexpandtab
kate: tab-width 2; replace-tabs off; indent-width 2;
Authors: Martin Zabel Patrick Lehmann
Entity: Pseudo-Random Number Generator (PRNG).
Description:
This module implementes a Pseudo-Random Number Generator (PRNG) with configurable bit count (BITS
). This module uses an internal list of FPGA optimized polynomials from 3 to 168 bits. The polynomials have at most 5 tap positions, so that long shift registers can be inferred instead of single flip-flops.
The generated number sequence includes the value all-zeros, but not all-ones.
License:
Copyright 2007-2014 Technische Universitaet Dresden - Germany Chair of VLSI-Design, Diagnostics and Architecture
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
limitations under the License.
Generics
Generic name | Type | Value | Description |
---|---|---|---|
BITS | positive | 32 | |
SEED | std_logic_vector | "0" |
Ports
Port name | Direction | Type | Description |
---|---|---|---|
clk | in | std_logic | |
rst | in | std_logic | reset value to initial seed |
got | in | std_logic | the current value has been got, and a new value should be calculated |
val | out | std_logic_vector(BITS - 1 downto 0) | the pseudo-random number |
Signals
Name | Type | Description |
---|---|---|
bit1_nxt | std_logic | The current value |
val_r | std_logic_vector(BITS downto 1) |
Constants
Name | Type | Value | Description |
---|---|---|---|
C_TAPPOSITION_LIST | T_TAPPOSITION_VECTOR(3 to 168) | ( 3 => (0 => 2, others => 0), 4 => (0 => 3, others => 0), 5 => (0 => 3, others => 0), 6 => (0 => 5, others => 0), 7 => (0 => 6, others => 0), 8 => (0 => 6, 1 => 5, 2 => 4, others => 0), 9 => (0 => 5, others => 0), 10 => (0 => 7, others => 0), 11 => (0 => 9, others => 0), 12 => (0 => 6, 1 => 4, 2 => 1, others => 0), 13 => (0 => 4, 1 => 3, 2 => 1, others => 0), 14 => (0 => 5, 1 => 3, 2 => 1, others => 0), 15 => (0 => 14, others => 0), 16 => (0 => 15, 1 => 13, 2 => 4, others => 0), 17 => (0 => 14, others => 0), 18 => (0 => 11, others => 0), 19 => (0 => 6, 1 => 2, 2 => 1, others => 0), 20 => (0 => 17, others => 0), 21 => (0 => 19, others => 0), 22 => (0 => 21, others => 0), 23 => (0 => 18, others => 0), 24 => (0 => 23, 1 => 22, 2 => 17, others => 0), 25 => (0 => 22, others => 0), 26 => (0 => 6, 1 => 2, 2 => 1, others => 0), 27 => (0 => 5, 1 => 2, 2 => 1, others => 0), 28 => (0 => 25, others => 0), 29 => (0 => 27, others => 0), 30 => (0 => 6, 1 => 4, 2 => 1, others => 0), 31 => (0 => 28, others => 0), 32 => (0 => 22, 1 => 2, 2 => 1, others => 0), 33 => (0 => 2, others => 0), 34 => (0 => 27, 1 => 2, 2 => 1, others => 0), 35 => (0 => 33, others => 0), 36 => (0 => 25, others => 0), 37 => (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1), 38 => (0 => 6, 1 => 5, 2 => 1, others => 0), 39 => (0 => 35, others => 0), 40 => (0 => 38, 1 => 21, 2 => 19, others => 0), 41 => (0 => 38, others => 0), 42 => (0 => 41, 1 => 20, 2 => 19, others => 0), 43 => (0 => 42, 1 => 38, 2 => 37, others => 0), 44 => (0 => 43, 1 => 18, 2 => 17, others => 0), 45 => (0 => 44, 1 => 42, 2 => 41, others => 0), 46 => (0 => 45, 1 => 26, 2 => 25, others => 0), 47 => (0 => 42, others => 0), 48 => (0 => 47, 1 => 21, 2 => 20, others => 0), 49 => (0 => 4, others => 0), 50 => (0 => 49, 1 => 24, 2 => 23, others => 0), 51 => (0 => 50, 1 => 36, 2 => 35, others => 0), 52 => (0 => 49, others => 0), 53 => (0 => 52, 1 => 38, 2 => 37, others => 0), 54 => (0 => 53, 1 => 18, 2 => 17, others => 0), 55 => (0 => 31, others => 0), 56 => (0 => 55, 1 => 35, 2 => 34, others => 0), 57 => (0 => 5, others => 0), 58 => (0 => 39, others => 0), 59 => (0 => 58, 1 => 38, 2 => 37, others => 0), 60 => (0 => 59, others => 0), 61 => (0 => 60, 1 => 46, 2 => 45, others => 0), 62 => (0 => 61, 1 => 6, 2 => 5, others => 0), 63 => (0 => 62, others => 0), 64 => (0 => 63, 1 => 61, 2 => 60, others => 0), 65 => (0 => 47, others => 0), 66 => (0 => 65, 1 => 57, 2 => 56, others => 0), 67 => (0 => 66, 1 => 58, 2 => 57, others => 0), 68 => (0 => 59, others => 0), 69 => (0 => 67, 1 => 42, 2 => 40, others => 0), 70 => (0 => 69, 1 => 55, 2 => 54, others => 0), 71 => (0 => 65, others => 0), 72 => (0 => 66, 1 => 25, 2 => 19, others => 0), 73 => (0 => 48, others => 0), 74 => (0 => 73, 1 => 59, 2 => 58, others => 0), 75 => (0 => 74, 1 => 65, 2 => 64, others => 0), 76 => (0 => 75, 1 => 41, 2 => 40, others => 0), 77 => (0 => 76, 1 => 47, 2 => 46, others => 0), 78 => (0 => 77, 1 => 59, 2 => 58, others => 0), 79 => (0 => 7, others => 0), 80 => (0 => 79, 1 => 43, 2 => 42, others => 0), 81 => (0 => 77, others => 0), 82 => (0 => 79, 1 => 47, 2 => 44, others => 0), 83 => (0 => 82, 1 => 38, 2 => 37, others => 0), 84 => (0 => 71, |