-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,431 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2022 Jiuyang Liu <[email protected]> | ||
|
||
package org.chipsalliance.t1.rtl | ||
|
||
import chisel3.experimental.hierarchy.instantiable | ||
import chisel3._ | ||
import chisel3.experimental.{SerializableModule, SerializableModuleParameter} | ||
import chisel3.util._ | ||
import org.chipsalliance.t1.rtl.decoder.{BoolField, Decoder} | ||
|
||
object LaneZvkParam { | ||
implicit def rw: upickle.default.ReadWriter[LaneZvkParam] = upickle.default.macroRW | ||
} | ||
|
||
case class LaneZvkParam(datapathWidth: Int, latency: Int) extends VFUParameter with SerializableModuleParameter { | ||
val inputBundle = new LaneZvkRequest(datapathWidth) | ||
val decodeField: BoolField = Decoder.zvbb | ||
val outputBundle = new LaneZvkResponse(datapathWidth) | ||
override val NeedSplit: Boolean = false | ||
} | ||
|
||
class LaneZvkRequest(datapathWidth: Int) extends VFUPipeBundle { | ||
val src = Vec(3, UInt(datapathWidth.W)) | ||
val opcode = UInt(4.W) | ||
val vSew = UInt(2.W) | ||
val shifterSize = UInt(log2Ceil(datapathWidth).W) | ||
} | ||
|
||
class LaneZvkResponse(datapathWidth: Int) extends VFUPipeBundle { | ||
val data = UInt(datapathWidth.W) | ||
} | ||
|
||
@instantiable | ||
class LaneZvk(val parameter: LaneZvkParam) | ||
extends VFUModule(parameter) with SerializableModule[LaneZvkParam]{ | ||
val response: LaneZvkResponse = Wire(new LaneZvkResponse(parameter.datapathWidth)) | ||
val request : LaneZvkRequest = connectIO(response).asTypeOf(parameter.inputBundle) | ||
|
||
val zvbbSrc: UInt = request.src(1) // vs2 | ||
val zvbbRs: UInt = request.src(0) // vs1 or rs1 | ||
val vSew: UInt = UIntToOH(request.vSew) // sew = 0, 1, 2 | ||
|
||
response.data := Mux1H(UIntToOH(request.opcode), Seq( | ||
)) | ||
} | ||
|
Oops, something went wrong.