[rtlutils] Add a utility for generating reset-less registers
This commit is contained in:
parent
d0613c8d07
commit
ab9b0c22e5
|
@ -68,3 +68,11 @@ object Or extends BinaryBooleanOp {
|
|||
object Neq extends BinaryBooleanOp {
|
||||
val op = PrimOps.Neq
|
||||
}
|
||||
|
||||
/** Generates a DefRegister with no reset, relying instead on FPGA programming
|
||||
* to preset the register to 0
|
||||
*/
|
||||
object RegZeroPreset {
|
||||
def apply(info: Info, name: String, tpe: Type, clock: Expression): DefRegister =
|
||||
DefRegister(info, name, tpe, clock, zero, WRef(name))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue