val path = System.getProperty("user.dir") + "/source/load-ivy.sc" interp.load.module(ammonite.ops.Path(java.nio.file.FileSystems.getDefault().getPath(path))) import chisel3._ import chisel3.util._ import chisel3.iotesters.{ChiselFlatSpec, Driver, PeekPokeTester} import firrtl._ class DelayBy2(width: Int) extends Module { val io = IO(new Bundle { val in = Input(UInt(width.W)) val out = Output(UInt(width.W)) }) val r0 = RegNext(io.in) val r1 = RegNext(r0) io.out := r1 } println(chisel3.Driver.emit(() => new DelayBy2(4))) val firrtlSerialization = chisel3.Driver.emit(() => new DelayBy2(4)) val firrtlAST = firrtl.Parser.parse(firrtlSerialization.split("\n").toIterator, Parser.GenInfo("file.fir")) println(firrtlAST) println(stringifyAST(firrtlAST)) println(stringifyAST(firrtlAST))