Use BundleWithConf to avoid clone method boilerplate
This commit is contained in:
@ -21,6 +21,11 @@ object Util {
|
||||
|
||||
import Util._
|
||||
|
||||
abstract trait BundleWithConf extends Bundle {
|
||||
val conf: AnyRef
|
||||
override def clone = this.getClass.getConstructors.head.newInstance(conf).asInstanceOf[this.type]
|
||||
}
|
||||
|
||||
object Str
|
||||
{
|
||||
def apply(s: String): UInt = {
|
||||
|
Reference in New Issue
Block a user