Skip to content

Commit e9a73eb

Browse files
Add PrintfIntf implementation (#5086)
1 parent d473fdf commit e9a73eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/scala-3/chisel3/PrintfIntf.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
package chisel3
44

5-
import scala.language.experimental.macros
5+
import chisel3.experimental.SourceInfo
66

77
private[chisel3] trait PrintfIntf { self: printf.type =>
8-
// TODO add printf with format String macro
8+
def apply(fmt: String, data: Bits*)(implicit sourceInfo: SourceInfo): chisel3.printf.Printf =
9+
Printf.apply(Printable.pack(fmt, data: _*))
910
}

0 commit comments

Comments
 (0)