From 0b6f6b67f9b511468936ca30218343283071a69d Mon Sep 17 00:00:00 2001 From: ducky Date: Thu, 26 May 2016 21:43:11 -0700 Subject: Remove unsafe implicit conversions from BitPat --- src/main/scala/Chisel/BitPat.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/scala/Chisel/BitPat.scala b/src/main/scala/Chisel/BitPat.scala index cf412542..96206f63 100644 --- a/src/main/scala/Chisel/BitPat.scala +++ b/src/main/scala/Chisel/BitPat.scala @@ -54,7 +54,7 @@ object BitPat { * * @note the BitPat must not have don't care bits (will error out otherwise) */ - implicit def bitPatToUInt(x: BitPat): UInt = { + def bitPatToUInt(x: BitPat): UInt = { require(x.mask == (BigInt(1) << x.getWidth) - 1) UInt(x.value, x.getWidth) } @@ -65,7 +65,7 @@ object BitPat { * * @note the UInt must be a literal */ - implicit def apply(x: UInt): BitPat = { + def apply(x: UInt): BitPat = { require(x.isLit) BitPat("b" + x.litValue.toString(2)) } -- cgit v1.2.3