projects
/
sifive-blocks.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial commit.
[sifive-blocks.git]
/
src
/
main
/
scala
/
util
/
ShiftReg.scala
1
// See LICENSE for license details.
2
package sifive.blocks.util
3
4
import Chisel._
5
6
object ShiftRegisterInit {
7
def apply[T <: Data](in: T, n: Int, init: T): T =
8
(0 until n).foldLeft(in) {
9
case (next, _) => Reg(next, next = next, init = init)
10
}
11
}