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

Manage NCRISC IRAM transfer on NCRISC on Wormhole #17805

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jbaumanTT
Copy link
Contributor

Ticket

#17307

Problem description

Currently brisc triggers loading the NCRISC kernel into IRAM, and later polls until it's complete before starting the NCRISC firmware and telling it to load the kernel.

What's changed

We can instead move the NCRISC firmware into L1 to allow it to manage loading the kernel. This is only possible on wormhole, because blackhole runs the kernel from L1 and grayskull has a bug that prevents NCRISC from safely running code from L1. We still need to reset the RISC to switch from executing in L1 to executing in IRAM, but that's a quick operation.

This allows NCRISC to load CBs at the same time as it loads the kernel into IRAM, which saves time. In a future patch it will also allow NCRISC to start loading the next kernel before BRISC finishes cleanup for the previous kernel.

Checklist

@jbaumanTT jbaumanTT force-pushed the jbauman/ncrisccopies2 branch from 1adc9bf to 5f315d1 Compare February 10, 2025 21:18
This saves IRAM space for the kernel, and allows later patches to optimize
NCRISC initialization more.

This is only enabled on Wormhole because a memory arbiter bug prevents NCRISC
from safely reading instructions from L1 on Grayskull.

We need to reset NCRISC when switching from executing in L1 to executing in
IRAM, because otehrwise we were seeing odd behavior where it was sometimes
misexecuting kernel code.
By moving the NCRISC kernel copy into the NCRISC firmware (on wormhole) we can do it in parallel with setting up CBs.
@jbaumanTT jbaumanTT force-pushed the jbauman/ncrisccopies2 branch from ee37db8 to 3d40658 Compare February 10, 2025 22:32
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.

1 participant