summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/compatibility/Main.scala
blob: a41599a33c30dcf9562dd9f4ad65e2e21de3d9e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// See LICENSE for license details.

package chisel3.compatibility

import java.io.File

import chisel3._

@deprecated("chiselMain doesn't exist in Chisel3", "3.0") object chiselMain {
  def apply[T <: Module](args: Array[String], gen: () => T): Unit =
    Predef.assert(false, "No more chiselMain in Chisel3")

  def run[T <: Module] (args: Array[String], gen: () => T): Unit = {
    val circuit = Driver.elaborate(gen)
    Driver.parseArgs(args)
    val output_file = new File(Driver.targetDir + "/" + circuit.name + ".fir")
    Driver.dumpFirrtl(circuit, Option(output_file))
  }
}