Skip to content

Commit

Permalink
Add seipNode similar to meipNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Solomatnikov committed Oct 13, 2020
1 parent 5c0c935 commit 01fd55d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main/scala/subsystem/HasTiles.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ trait HasTileInterruptSources
outputRequiresInput = false,
inputRequiresOutput = false))
}
val seipNode = p(PLICKey) match {
case Some(_) => None
case None => Some(IntNexusNode(
sourceFn = { _ => IntSourcePortParameters(Seq(IntSourceParameters(1))) },
sinkFn = { _ => IntSinkPortParameters(Seq(IntSinkParameters())) },
outputRequiresInput = false,
inputRequiresOutput = false))
}
}

/** These are sources of "constants" that are driven into the tile.
Expand Down Expand Up @@ -297,7 +305,7 @@ trait CanAttachTile {
if (domain.tile.tileParams.core.hasSupervisorMode) {
domain.crossIntIn(crossingParams.crossingType) :=
context.plicOpt .map { _.intnode }
.getOrElse { NullIntSource() }
.getOrElse { context.seipNode.get }
}

// 3. Local Interrupts ("lip") are required to already be synchronous to the Tile's clock.
Expand Down Expand Up @@ -404,4 +412,10 @@ trait HasTilesModuleImp extends LazyModuleImp with HasPeripheryDebugModuleImp {
(outer.meipNode.get.out(i)._1)(0) := pin
}
}
val seip = if(outer.seipNode.isDefined) Some(IO(Vec(outer.seipNode.get.out.size, Bool()).asInput)) else None
seip.foreach { s =>
s.zipWithIndex.foreach{ case (pin, i) =>
(outer.seipNode.get.out(i)._1)(0) := pin
}
}
}

0 comments on commit 01fd55d

Please sign in to comment.