Skip to content

Generic heap calculation #393

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

Open
michael-white-inspire opened this issue Mar 18, 2025 · 1 comment
Open

Generic heap calculation #393

michael-white-inspire opened this issue Mar 18, 2025 · 1 comment

Comments

@michael-white-inspire
Copy link

michael-white-inspire commented Mar 18, 2025

Perhaps not an issue, but maybe just a request for documentation or comments in the code. The 'generic' machine uses the following formula for heap calculation:

  • 0x8000 + (0x1000 * hartcount) + (SBI_TLB_INFO_SIZE * hartcount * hartcount)

What is the reason for the square of the hart count? The reason I'm asking is that for large number of harts, this square factor along with SBI_TLB_INFO_SIZE can become quite large.

Thanks.

@SiFiveHolland
Copy link
Contributor

To avoid deadlock with the current design, there needs to be space in the TLB FIFOs for all possible combinations of source and destination hart. TLB operations are synchronous -- consider what happens if every hart sends a broadcast TLB flush at the same time. If it makes more sense, one of those hart_counts could be replaced with generic_tlb_num_entries().

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

No branches or pull requests

2 participants