diff options
| author | Schuyler Eldridge | 2019-05-09 20:13:54 -0400 |
|---|---|---|
| committer | GitHub | 2019-05-09 20:13:54 -0400 |
| commit | e02d25c2d9310291a3084821713bd8d9b2325651 (patch) | |
| tree | 82453617fec3957e33724eb3a0fd25dd060d803f /src/main/scala/chisel3/util/random/LFSR.scala | |
| parent | 6be76f79f873873497e40fa647f9456391b4d59a (diff) | |
| parent | 356d5c99c233540e4d993ccc365a7069d9d2beaa (diff) | |
Merge pull request #1092 from freechipsproject/lfsr-async-reset
LFSR/PRNG Asynchronous Safety, Use Vec[Bool] to store internal state
Diffstat (limited to 'src/main/scala/chisel3/util/random/LFSR.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/random/LFSR.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/chisel3/util/random/LFSR.scala b/src/main/scala/chisel3/util/random/LFSR.scala index 6663940c..a19f40d3 100644 --- a/src/main/scala/chisel3/util/random/LFSR.scala +++ b/src/main/scala/chisel3/util/random/LFSR.scala @@ -55,8 +55,8 @@ trait LFSR extends PRNG { } case None => reduction match { - case XOR => when (reset.toBool) { state := state(width-1, 1) ## 1.U } - case XNOR => when (reset.toBool) { state := state(width-1, 1) ## 0.U } + case XOR => when (reset.toBool) { state(0) := 1.U } + case XNOR => when (reset.toBool) { state(0) := 0.U } } } |
