中断接入

This commit is contained in:
RuigeLee
2024-10-28 15:51:31 +08:00
parent c29ca8dd27
commit ce18e90304
2 changed files with 13 additions and 1 deletions

View File

@@ -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 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))

View File

@@ -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 tld = new DecoupledIO(new TLBundleD(edge.bundle))
val interrupt = Output(Vec(5, Bool()))
}
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.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 ) {
tlaInfo := io.tla.bits