-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathFuxi.scala
39 lines (32 loc) · 976 Bytes
/
Fuxi.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
import chisel3.{Module, Bundle, Driver}
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 {
Driver.execute(args, () => new Fuxi)
}