Connect the UART interruption to the CPU
This commit is contained in:
parent
568c7d1365
commit
0c9a39d3ce
|
@ -186,7 +186,8 @@ case class Murax(config : MuraxConfig) extends Component{
|
||||||
)
|
)
|
||||||
|
|
||||||
//Checkout plugins used to instanciate the CPU to connect them to the SoC
|
//Checkout plugins used to instanciate the CPU to connect them to the SoC
|
||||||
val timerInterrupt = Bool
|
val timerInterrupt = False
|
||||||
|
val externalInterrupt = False
|
||||||
var iBus : IBusSimpleBus = null
|
var iBus : IBusSimpleBus = null
|
||||||
var dBus : DBusSimpleBus = null
|
var dBus : DBusSimpleBus = null
|
||||||
var debugBus : DebugExtensionBus = null
|
var debugBus : DebugExtensionBus = null
|
||||||
|
@ -202,7 +203,7 @@ case class Murax(config : MuraxConfig) extends Component{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case plugin : CsrPlugin => {
|
case plugin : CsrPlugin => {
|
||||||
plugin.externalInterrupt := False
|
plugin.externalInterrupt := externalInterrupt
|
||||||
plugin.timerInterrupt := timerInterrupt
|
plugin.timerInterrupt := timerInterrupt
|
||||||
}
|
}
|
||||||
case plugin : DebugPlugin => plugin.debugClockDomain{
|
case plugin : DebugPlugin => plugin.debugClockDomain{
|
||||||
|
@ -315,7 +316,7 @@ case class Murax(config : MuraxConfig) extends Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
val specification = List[(SimpleBus,SizeMapping)](
|
val specification = List[(SimpleBus,SizeMapping)](
|
||||||
ram.bus -> (0x00000000l, onChipRamSize kB),
|
ram.bus -> (0x00000000l, onChipRamSize kB),
|
||||||
apbBridge.simpleBus -> (0xF0000000l, 1 MB)
|
apbBridge.simpleBus -> (0xF0000000l, 1 MB)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -365,8 +366,10 @@ case class Murax(config : MuraxConfig) extends Component{
|
||||||
txFifoDepth = 16,
|
txFifoDepth = 16,
|
||||||
rxFifoDepth = 16
|
rxFifoDepth = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
val uartCtrl = Apb3UartCtrl(uartCtrlConfig)
|
val uartCtrl = Apb3UartCtrl(uartCtrlConfig)
|
||||||
uartCtrl.io.uart <> io.uart
|
uartCtrl.io.uart <> io.uart
|
||||||
|
externalInterrupt setWhen(uartCtrl.io.interrupt)
|
||||||
|
|
||||||
val timer = new Area{
|
val timer = new Area{
|
||||||
val apb = Apb3(
|
val apb = Apb3(
|
||||||
|
@ -394,7 +397,7 @@ case class Murax(config : MuraxConfig) extends Component{
|
||||||
val interruptCtrlBridge = interruptCtrl.driveFrom(busCtrl,0x10)
|
val interruptCtrlBridge = interruptCtrl.driveFrom(busCtrl,0x10)
|
||||||
interruptCtrl.io.inputs(0) := timerA.io.full
|
interruptCtrl.io.inputs(0) := timerA.io.full
|
||||||
interruptCtrl.io.inputs(1) := timerB.io.full
|
interruptCtrl.io.inputs(1) := timerB.io.full
|
||||||
timerInterrupt := interruptCtrl.io.pendings.orR
|
timerInterrupt setWhen(interruptCtrl.io.pendings.orR)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue