From 9a209b82022a18542260715bc7db777f68ab079f Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 10 Feb 2020 12:28:06 -0800 Subject: Printf: Add support for tabs, and give helpful error messages (#1323) (#1326) Co-authored-by: Megan Wachs Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- src/test/scala/chiselTests/PrintableSpec.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/test/scala/chiselTests/PrintableSpec.scala b/src/test/scala/chiselTests/PrintableSpec.scala index aeb92532..4ecc073e 100644 --- a/src/test/scala/chiselTests/PrintableSpec.scala +++ b/src/test/scala/chiselTests/PrintableSpec.scala @@ -95,6 +95,16 @@ class PrintableSpec extends FlatSpec with Matchers { case e => fail() } } + it should "correctly emit tab" in { + class MyModule extends BasicTester { + printf(p"\t") + } + val firrtl = Driver.emit(() => new MyModule) + getPrintfs(firrtl) match { + case Seq(Printf("\\t", Seq())) => + case e => fail() + } + } it should "support names of circuit elements including submodule IO" in { // Submodule IO is a subtle issue because the Chisel element has a different // parent module -- cgit v1.2.3