diff options
| author | ducky | 2016-05-26 21:43:11 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2016-05-31 19:05:31 -0700 |
| commit | 0b6f6b67f9b511468936ca30218343283071a69d (patch) | |
| tree | 8247fbfd288c19f354eb64dcbd946cc638ad9511 /src/main | |
| parent | 2e2e3da0c07cd1dc873c064510f68123cae69059 (diff) | |
Remove unsafe implicit conversions from BitPat
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/scala/Chisel/BitPat.scala | 4 |
1 files changed, 2 insertions, 2 deletions
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)) } |
