-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathFuxi.scala
More file actions
53 lines (45 loc) · 1.54 KB
/
Copy pathFuxi.scala
File metadata and controls
53 lines (45 loc) · 1.54 KB
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
48
49
50
51
52
53
import chisel3.{Bundle, Module}
import chisel3.stage.ChiselGeneratorAnnotation
import circt.stage.ChiselStage
import io._
import axi.AxiMaster
import consts.Parameters.{ADDR_WIDTH, DATA_WIDTH}
import core.Core
import bus.CoreBus
class Fuxi extends Module {
val io = IO(new Bundle {
// interrupt request
val irq = new InterruptIO
// for trace generating
val debug = new DebugIO
// AXI interfaces
val inst = new AxiMaster(ADDR_WIDTH, DATA_WIDTH)
val data = new AxiMaster(ADDR_WIDTH, DATA_WIDTH)
val uncached = new AxiMaster(ADDR_WIDTH, DATA_WIDTH)
})
val core = Module(new Core)
val coreBus = Module(new CoreBus)
core.io.irq <> io.irq
core.io.tlb <> coreBus.io.tlb
core.io.cache <> coreBus.io.cache
core.io.rom <> coreBus.io.rom
core.io.ram <> coreBus.io.ram
core.io.debug <> io.debug
coreBus.io.inst <> io.inst
coreBus.io.data <> io.data
coreBus.io.uncached <> io.uncached
}
object Fuxi extends App {
private val firtoolOptions = Array(
"--firtool-option", "-disable-all-randomization",
"--firtool-option", "-strip-debug-info",
"--firtool-option", "-default-layer-specialization=enable",
"--firtool-option", "-lowering-options=disallowLocalVariables,disallowPackedArrays," +
"disallowPackedStructAssignments,disallowDeclAssignments,noAlwaysComb," +
"mitigateVivadoArrayIndexConstPropBug"
)
(new ChiselStage).execute(
Array("--target", "verilog") ++ firtoolOptions ++ args,
Seq(ChiselGeneratorAnnotation(() => new Fuxi))
)
}