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

package Chisel

import java.io.File

@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))
  }
}