Conversation
d8f83c1 to
52f4598
Compare
poemonsense
left a comment
There was a problem hiding this comment.
It's becoming more clearer now. We need to find out a better way to describe different optimization passes
src/main/scala/Gateway.scala
Outdated
| val step = IO(Output(UInt(config.stepWidth.W))) | ||
| val control = Wire(new GatewaySinkControl(config)) | ||
|
|
||
| val fpgaIO = Option.when(config.isFPGA)(IO(Output(new FpgaDiffIO(config)))) |
There was a problem hiding this comment.
Do you need to check whether isBatch is enabled? Otherwise, this fpgaIO is unconnected
| gateway | ||
| } | ||
|
|
||
| def finishFPGA(cpu: String): FpgaDiffIO = { |
There was a problem hiding this comment.
Does the user need to call this explicitly? How does the user use this?
There was a problem hiding this comment.
Previously, users would separately generate DUT and Difftest, including variuos DifftestBundle interfaces, which we should connect manually in the wrapper module, as shown below.
https://github.com/OpenXiangShan/XiangShan/blob/7e564dbbfb630d3142a5c023ab16922e0497be9d/src/main/scala/top/Top.scala#L478-L479
This modification encapsulates DUT and Difftest, exposing only fixed-length I/O as shown below.
val difftest = DifftestModule.finishFPGA("XiangShan")
This change expose FPGA IO with finishFPGA, enabling us to wrap both DUT, Difftest, and changing DiffTestBundle Interface within the same wrapper. Only the output of Batch, with width declared at DifftestMacros.v, will be exposed to FPGA.
This change expose FPGA IO with finishFPGA, enabling us to wrap both DUT, Difftest, and changing DiffTestBundle Interface within the same wrapper. Only the output of Batch, with width declared at DifftestMacros.v, will be exposed to FPGA.