Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support vector extensions #3665

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/scala/rocket/RocketCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ case class RocketCoreParams(
override def eLen = vector.map(_.eLen).getOrElse(0)
override def vfLen = vector.map(_.vfLen).getOrElse(0)
override def vfh = vector.map(_.vfh).getOrElse(false)
override def vExts = vector.map(_.vExts).getOrElse(Nil)
override def vMemDataBits = vector.map(_.vMemDataBits).getOrElse(0)
override val customIsaExt = Option.when(haveCease)("xrocket") // CEASE instruction
override def minFLen: Int = fpu.map(_.minFLen).getOrElse(32)
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/rocket/VectorUnit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ case class RocketCoreVectorParams(
vMemDataBits: Int,
decoder: Parameters => RocketVectorDecoder,
useDCache: Boolean,
issueVConfig: Boolean
issueVConfig: Boolean,
vExts: Seq[String]
)

class VectorCoreIO(implicit p: Parameters) extends CoreBundle()(p) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/tile/BaseTile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ trait HasNonDiplomaticTileParameters {
Option.when(tileParams.core.useConditionalZero)(Seq("zicond")) ++
Some(Seq("zicsr", "zifencei", "zihpm")) ++
Option.when(tileParams.core.fpu.nonEmpty && tileParams.core.fpu.get.fLen >= 16 && tileParams.core.fpu.get.minFLen <= 16)(Seq("zfh")) ++
zvl ++ zve ++ zvfh ++
zvl ++ zve ++ zvfh ++ Some(tileParams.core.vExts) ++
tileParams.core.customIsaExt.map(Seq(_))
).flatten
val multiLetterString = multiLetterExt.mkString("_")
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/tile/Core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ trait CoreParams {
def eLen: Int = 0
def vfLen: Int = 0
def vfh: Boolean = false
def vExts: Seq[String] = Nil
def hasV: Boolean = vLen >= 128 && eLen >= 64 && vfLen >= 64
def vMemDataBits: Int = 0
}
Expand Down
Loading