diff options
| author | Richard Lin | 2018-01-02 13:51:36 -0800 |
|---|---|---|
| committer | GitHub | 2018-01-02 13:51:36 -0800 |
| commit | 678df42aa6bf2f4715be2d051c3c29f058948d0c (patch) | |
| tree | 0b3fb00565e1c442abd7885d490cd4324f02d3fe /src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala | |
| parent | cb7fcd2b18135230dc40f3c7bb98685e7ffde9d5 (diff) | |
| parent | ade792ee7c5bb718f738f5e4c3886b2e87c68756 (diff) | |
Merge pull request #723 from freechipsproject/autoclonetype
Auto clone type 🦆
Diffstat (limited to 'src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala b/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala index 457f26de..95dc87c1 100644 --- a/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala +++ b/src/test/scala/chiselTests/CompatibilityInteroperabilitySpec.scala @@ -12,6 +12,8 @@ object CompatibilityComponents { class ChiselBundle extends Bundle { val a = UInt(width = 32) val b = UInt(width = 32).flip + + override def cloneType = (new ChiselBundle).asInstanceOf[this.type] } class ChiselRecord extends Record { val elements = ListMap("a" -> UInt(width = 32), "b" -> UInt(width = 32).flip) @@ -46,6 +48,8 @@ object Chisel3Components { class Chisel3Bundle extends Bundle { val a = Output(UInt(32.W)) val b = Input(UInt(32.W)) + + override def cloneType = (new Chisel3Bundle).asInstanceOf[this.type] } class Chisel3Record extends Record { |
