中断接入
This commit is contained in:
@@ -117,7 +117,7 @@ class BackSysImp(outer: BackSys) extends LazyModuleImp(outer) with HasBackParame
|
|||||||
val cdr = for( i <- 0 until 2 ) yield { Module(new TLCDR(cdr_edge)) }
|
val cdr = for( i <- 0 until 2 ) yield { Module(new TLCDR(cdr_edge)) }
|
||||||
|
|
||||||
// val trap = Output(Bool())
|
// val trap = Output(Bool())
|
||||||
pico.io.irq := 0.U
|
pico.io.irq := Cat( cdr(1).io.interrupt.asUInt, cdr(0).io.interrupt.asUInt )
|
||||||
// val eoi = Output(UInt(32.W))
|
// val eoi = Output(UInt(32.W))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ abstract class TLCDRBase(val edge: TLEdgeIn)(implicit p: Parameters) extends Bac
|
|||||||
|
|
||||||
val tla = Flipped(new DecoupledIO(new TLBundleA(edge.bundle)))
|
val tla = Flipped(new DecoupledIO(new TLBundleA(edge.bundle)))
|
||||||
val tld = new DecoupledIO(new TLBundleD(edge.bundle))
|
val tld = new DecoupledIO(new TLBundleD(edge.bundle))
|
||||||
|
|
||||||
|
val interrupt = Output(Vec(5, Bool()))
|
||||||
}
|
}
|
||||||
|
|
||||||
val io: TLCDRIO = IO(new TLCDRIO)
|
val io: TLCDRIO = IO(new TLCDRIO)
|
||||||
@@ -190,6 +192,16 @@ class TLCDR(edge: TLEdgeIn)(implicit p: Parameters) extends TLCDRBase(edge) with
|
|||||||
io.tla.ready := tlAReady
|
io.tla.ready := tlAReady
|
||||||
io.tld.valid := tlDValid
|
io.tld.valid := tlDValid
|
||||||
|
|
||||||
|
io.interrupt(0) := intTxError
|
||||||
|
io.interrupt(1) := intTxFifoFull
|
||||||
|
io.interrupt(2) := intTxFinish
|
||||||
|
|
||||||
|
io.interrupt(3) := intRxError
|
||||||
|
io.interrupt(4) := intRxValid
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
when( io.tla.fire ) {
|
when( io.tla.fire ) {
|
||||||
tlaInfo := io.tla.bits
|
tlaInfo := io.tla.bits
|
||||||
|
|||||||
Reference in New Issue
Block a user