From 4dddde56d0c1a66a05457c7dda409238d2de8e8a Mon Sep 17 00:00:00 2001 From: Hasan Genc Date: Mon, 29 Oct 2018 15:25:28 -0700 Subject: Turn off strong enum annotations (#916) * Turned off strong enum annotations because they weren't working with Vec indexes * Ignore annotation tests using ScalaTest's 'ignore', rather than by commenting them out--- chiselFrontend/src/main/scala/chisel3/core/StrongEnum.scala | 2 +- src/test/scala/chiselTests/StrongEnum.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chiselFrontend/src/main/scala/chisel3/core/StrongEnum.scala b/chiselFrontend/src/main/scala/chisel3/core/StrongEnum.scala index a9f51387..889e9b11 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/StrongEnum.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/StrongEnum.scala @@ -32,7 +32,7 @@ object EnumAnnotations { import EnumAnnotations._ -abstract class EnumType(private val factory: EnumFactory, selfAnnotating: Boolean = true) extends Element { +abstract class EnumType(private val factory: EnumFactory, selfAnnotating: Boolean = false) extends Element { override def cloneType: this.type = factory().asInstanceOf[this.type] private[core] def compop(sourceInfo: SourceInfo, op: PrimOp, other: EnumType): Bool = { diff --git a/src/test/scala/chiselTests/StrongEnum.scala b/src/test/scala/chiselTests/StrongEnum.scala index 98286624..15ce943b 100644 --- a/src/test/scala/chiselTests/StrongEnum.scala +++ b/src/test/scala/chiselTests/StrongEnum.scala @@ -372,11 +372,11 @@ class StrongEnumSpec extends ChiselFlatSpec { } } -class StrongEnumAnnotationSpec extends FreeSpec with Matchers { +class StrongEnumAnnotationSpec extends ChiselFlatSpec { import chisel3.experimental.EnumAnnotations._ import firrtl.annotations.ComponentName - "Test that strong enums annotate themselves appropriately" in { + ignore should "Test that strong enums annotate themselves appropriately" in { def test() = { Driver.execute(Array("--target-dir", "test_run_dir"), () => new StrongEnumFSM) match { -- cgit v1.2.3