Creates a register with optional next and initialization values.
this may result in a type error if called from a type parameterized
function, since the Scala compiler isn't smart enough to know that null
is a valid value. In those cases, you can either use the outType only Reg
constructor or pass in