-
Notifications
You must be signed in to change notification settings - Fork 0
/
GCDMain.scala
47 lines (45 loc) · 1.28 KB
/
GCDMain.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import chisel3._
import chisel3.util._
import chisel3.iotesters.{ChiselFlatSpec, Driver, PeekPokeTester}
/**
* This provides an alternate way to run tests, by executing then as a main
* From sbt (Note: the test: prefix is because this main is under the test package hierarchy):
* {{{
* test:runMain gcd.GCDMain
* }}}
* To see all command line options use:
* {{{
* test:runMain gcd.GCDMain --help
* }}}
* To run with verilator:
* {{{
* test:runMain gcd.GCDMain --backend-name verilator
* }}}
* To run with verilator from your terminal shell use:
* {{{
* sbt 'test:runMain gcd.GCDMain --backend-name verilator'
* }}}
*/
object GCDMain extends App {
iotesters.Driver.execute(args, () => new GCD) {
c => new GCDUnitTester(c)
}
}
/**
* This provides a way to run the firrtl-interpreter REPL (or shell)
* on the lowered firrtl generated by your circuit. You will be placed
* in an interactive shell. This can be very helpful as a debugging
* technique. Type help to see a list of commands.
*
* To run from sbt
* {{{
* test:runMain gcd.GCDRepl
* }}}
* To run from sbt and see the half a zillion options try
* {{{
* test:runMain gcd.GCDRepl --help
* }}}
*/
object GCDRepl extends App {
iotesters.Driver.executeFirrtlRepl(args, () => new GCD)
}