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: export FPGA IO width macro and merge output data for connection #579

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

xiaokamikami
Copy link
Collaborator

When using fpga, the IO width information is exported to the macro definition file, and the info and data in the out are merged to facilitate direct connection to the transmission module

Copy link
Member

@klin02 klin02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def batchBitWidth in Line 59. Use it for vMacros and IO width

@xiaokamikami xiaokamikami force-pushed the fpga_ba branch 2 times, most recently from b1e1e5c to 8cedc99 Compare February 24, 2025 07:38
@@ -271,12 +273,12 @@ object GatewaySink {
}
val out = Option.when(config.isFPGA) {
IO(new Bundle {
val batch = Output(chiselTypeOf(io))
val data = Output(UInt())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explicitly use width calculted in config

@@ -55,7 +55,8 @@ case class GatewayConfig(
def maxStep: Int = if (isBatch) batchSize else 1
def stepWidth: Int = log2Ceil(maxStep + 1)
def replayWidth: Int = log2Ceil(replaySize + 1)
def batchArgByteLen: (Int, Int) = if (isNonBlock || isFPGA) (3600, 400) else (7200, 800)
def batchArgByteLen: (Int, Int) = if (isFPGA) (1900, 100) else if (isNonBlock) (3600, 400) else (7200, 800)
def batchBitWidth: Int = if (isFPGA) 16000 else if (isNonBlock) 32000 else 64000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calculated by byteLen above to make sure consistency

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

When using fpga, the IO width information is exported to the macro definition file, and the info and data in the out are merged to facilitate direct connection to the transmission module
@poemonsense poemonsense merged commit ec582c2 into master Feb 25, 2025
5 checks passed
@poemonsense poemonsense deleted the fpga_ba branch February 25, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants