Skip to content

util: FPGA runner: rework to use asyncio#366

Open
ziuziakowska wants to merge 2 commits intolowRISC:mainfrom
ziuziakowska:util-fixes-2
Open

util: FPGA runner: rework to use asyncio#366
ziuziakowska wants to merge 2 commits intolowRISC:mainfrom
ziuziakowska:util-fixes-2

Conversation

@ziuziakowska
Copy link
Copy Markdown
Contributor

@ziuziakowska ziuziakowska commented Mar 23, 2026

Split off from: #299

This reworks the FPGA runner to use asyncio to read from the UART while the flash is being written. This was causing some problems for me locally when adding some more debugging output, as in the time between finishing flashing and opening the UART file descriptor, the receive buffer would be overflowed and the test status would be dropped.

Signed-off-by: Alice Ziuziakowska <a.ziuziakowska@lowrisc.org>
Signed-off-by: Alice Ziuziakowska <a.ziuziakowska@lowrisc.org>
@ziuziakowska ziuziakowska changed the title util: FPGA runner changes util: FPGA runner: rework to use asyncio Mar 23, 2026
@ziuziakowska ziuziakowska marked this pull request as ready for review March 23, 2026 16:09
@ziuziakowska ziuziakowska requested a review from engdoreis March 31, 2026 09:29
p = await asyncio.create_subprocess_exec(*command)
if await p.wait() != 0:
sys.exit(1)
p = await asyncio.create_subprocess_exec(*command)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please keep the workaround comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit. Changing the order of the functions in the same commit made it harder to review. It would be good to separate into different commits in the next PRs.

return 0
p = await asyncio.create_subprocess_exec(*command)
if await p.wait() != 0:
sys.exit(1)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If the load fails we would not know why? I suggest keeping the log.

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.

2 participants