1
0

unit tests: do not use LFSR16 which has a common seed!

We want each LFSR to generate independent noise.
This commit is contained in:
Wesley W. Terpstra
2017-10-30 15:01:17 -07:00
parent ec70e5fb02
commit e8ed450f13
3 changed files with 6 additions and 4 deletions

View File

@ -14,7 +14,7 @@ class TLDelayer(q: Double)(implicit p: Parameters) extends LazyModule
lazy val module = new LazyModuleImp(this) {
def feed[T <: Data](sink: DecoupledIO[T], source: DecoupledIO[T], noise: T) {
val allow = UInt((q * 65535.0).toInt) <= LFSR16(source.valid)
val allow = UInt((q * 65535.0).toInt) <= LFSRNoiseMaker(16, source.valid)
sink.valid := source.valid && allow
source.ready := sink.ready && allow
sink.bits := source.bits