diff options
| author | Schuyler Eldridge | 2019-05-06 23:44:20 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-05-09 12:47:32 -0400 |
| commit | 7ce0f10f6c4723b99e6fdf20b37b706c8ae51c2e (patch) | |
| tree | c93cd3ad841a2ff7a5735a6d49b71716f07d811c /src/test | |
| parent | 723cfb0cbe5e20db02637c194f129e57d4071ee2 (diff) | |
Add chisel3.util.random lib w/ LFSR generator
Builds out PRNG and LFSR type hierarchy. PRNG is the base class of
LFSR of which Galois and Fibonacci are concrete implementations.
PRNGs contain state (a UInt) and an update (delta) function. They have
a compile-time optional seed to set the PRNG state. The seed/state can
also be set at run-time. PRNGs can be run-time parameterized based on
how many updates they should do per cycle and whether or not to send
the seed through step-count state updates before loading it. (h/t
@jwright6323)
LFSRs are parameterized in a reduction operation (XOR or XNOR). An
LFSR that does NOT have a seed will be automatically initialized to a
minimally safe state (set/reset one bit) based on their reduction
operation. (h/t @aswaterman)
Adds Galois and Fibonacci LFSRs that define appropriate update
functions. Companion objects provide helpers to automatically generate
maximal period variants. Taps are provide for a very large set of
widths. The LFSR companion object provides an apply method to generate
a Fibonacci LFSR random variable (like the old LFSR16).
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/chiselTests/InstanceNameSpec.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/InstanceNameSpec.scala b/src/test/scala/chiselTests/InstanceNameSpec.scala index 30dc46ba..7bb91b94 100644 --- a/src/test/scala/chiselTests/InstanceNameSpec.scala +++ b/src/test/scala/chiselTests/InstanceNameSpec.scala @@ -3,6 +3,7 @@ package chiselTests import chisel3._ +import chisel3.util.Queue import chisel3.experimental.{DataMirror, FixedPoint} import chisel3.testers.BasicTester @@ -17,7 +18,7 @@ class InstanceNameModule extends Module { val foo = UInt(8.W) } - val q = Module(new util.Queue(UInt(32.W), 4)) + val q = Module(new Queue(UInt(32.W), 4)) io.bar := io.foo + x } |
