diff options
| author | Albert Chen | 2020-07-23 09:39:41 -0700 |
|---|---|---|
| committer | GitHub | 2020-07-23 16:39:41 +0000 |
| commit | ea558ad79ed0e65df73b5a01ceea690e5b0479ca (patch) | |
| tree | 5413daebddf2cfa91adc1bae7c7d23fc887b985f /src/test/scala/firrtlTests/ConstantPropagationTests.scala | |
| parent | d177add0df50bfd7059557b2b648d101489b7285 (diff) | |
Update negative literal emission (#1782)
* test const prop of addition of negative literals
* Emitter: handle minimum negative values correctly
* update expected verilog in AsyncResetSpec
Diffstat (limited to 'src/test/scala/firrtlTests/ConstantPropagationTests.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/ConstantPropagationTests.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ConstantPropagationTests.scala b/src/test/scala/firrtlTests/ConstantPropagationTests.scala index 32303949..131f9466 100644 --- a/src/test/scala/firrtlTests/ConstantPropagationTests.scala +++ b/src/test/scala/firrtlTests/ConstantPropagationTests.scala @@ -1604,4 +1604,14 @@ class ConstantPropagationEquivalenceSpec extends FirrtlFlatSpec { | out <= head_temp""".stripMargin firrtlEquivalenceTest(input, transforms) } + + "addition of negative literals" should "be propagated" in { + val input = + s"""circuit AddTester : + | module AddTester : + | output ref : SInt<2> + | ref <= add(SInt<1>("h-1"), SInt<1>("h-1")) + |""".stripMargin + firrtlEquivalenceTest(input, transforms) + } } |
