Skip to content

Commit 84a8af9

Browse files
committed
fpga: rm temporary fix and USE_THREAD fix
1 parent 5fb792a commit 84a8af9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/test/csrc/fpga/xdma.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ void FpgaXdma::stop_thansmit_thread() {
138138

139139
void FpgaXdma::read_xdma_thread(int channel) {
140140
FpgaPackgeHead *packge = (FpgaPackgeHead *)malloc(sizeof(FpgaPackgeHead));
141-
// TODO: The first packet may be repeated twice, and if it is, drop the first packet
142-
size_t size = read(xdma_c2h_fd[channel], packge->diff_packge, DMA_DIFF_PACKGE_LEN);
143141
while (running) {
144142
memset(packge, 0, sizeof(FpgaPackgeHead));
145143
size_t size = read(xdma_c2h_fd[channel], packge->diff_packge, DMA_DIFF_PACKGE_LEN);
@@ -148,13 +146,13 @@ void FpgaXdma::read_xdma_thread(int channel) {
148146
printf("It should not be the case that no available block can be found\n");
149147
assert(0);
150148
}
151-
#endif // USE_THREAD_MEMPOOL
152-
149+
#else
153150
#ifdef CONFIG_DIFFTEST_BATCH
154151
v_difftest_Batch(packge->diff_packge);
155152
#elif defined(CONFIG_DIFFTEST_SQUASH)
156153
//TODO: need automatically generates squash data parsing implementations
157-
#endif
154+
#endif // CONFIG_DIFFTEST_BATCH
155+
#endif // USE_THREAD_MEMPOOL
158156
}
159157
free(packge);
160158
}

0 commit comments

Comments
 (0)