1
0
Fork 0

syncregs: Use synchronizer primitives for IntXing

This commit is contained in:
Megan Wachs 2017-08-24 17:39:07 -07:00
parent 8b462d1595
commit 130b24355f
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import Chisel._
import chisel3.internal.sourceinfo.SourceInfo
import freechips.rocketchip.config.Parameters
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.util.SynchronizerShiftReg
import scala.collection.mutable.ListBuffer
import scala.math.max
@ -139,7 +140,7 @@ class IntXing(sync: Int = 3)(implicit p: Parameters) extends LazyModule
}
(io.in zip io.out) foreach { case (in, out) =>
out := (0 to sync).foldLeft(in) { case (a, _) => RegNext(a) }
out := SynchronizerShiftReg(in, sync)
}
}
}