summaryrefslogtreecommitdiff
path: root/src/main/scala/Chisel/Main.scala
blob: 349f8b18a3289bf28bdcb85d1e32215383eb3b01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// See LICENSE for 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) =
    Predef.assert(false)

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