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

Batch: expose extra GatewayIO for FPGA #513

Merged
merged 3 commits into from
Nov 25, 2024
Merged
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
13 changes: 12 additions & 1 deletion src/main/scala/Gateway.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ case class GatewayConfig(
def dutBufLen: Int = if (isBatch) batchSize else 1
def maxStep: Int = if (isBatch) batchSize else 1
def stepWidth: Int = log2Ceil(maxStep + 1)
def batchArgByteLen: (Int, Int) = if (isNonBlock) (3600, 400) else (7200, 800)
def batchArgByteLen: (Int, Int) = if (isNonBlock || isFPGA) (3600, 400) else (7200, 800)
def hasDeferredResult: Boolean = isNonBlock || hasInternalStep
def needTraceInfo: Boolean = hasReplay
def needEndpoint: Boolean =
Expand Down Expand Up @@ -266,6 +266,17 @@ object GatewaySink {
case "dpic" => DPIC.batch(template, control, io, config)
case _ => DPIC.batch(template, control, io, config) // Default: DPI-C
}
val out = Option.when(config.isFPGA) {
IO(new Bundle {
val batch = Output(chiselTypeOf(io))
val enable = Output(Bool())
})
}
if (config.isFPGA) {
out.get.batch := io
out.get.enable := control.enable
dontTouch(out.get)
}
}

def collect(config: GatewayConfig): GatewayResult = {
Expand Down