Use BundleWithConf to avoid clone method boilerplate

This commit is contained in:
Andrew Waterman
2014-05-09 19:37:16 -07:00
parent 94c1f01ec6
commit 4ca152b012
9 changed files with 29 additions and 55 deletions
+5
View File
@@ -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 = {