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

Provide a custom tsi_t implementation with loadmem support #104

Merged
merged 2 commits into from
Oct 12, 2020

Conversation

jerryz123
Copy link
Contributor

Copy link
Contributor

@colinschmidt colinschmidt left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand this implementation. There is upstream support for preloading that was used in the esp-isa-sim version of this. Why can't firesim use that as well?

src/main/resources/testchipip/csrc/testchip_fesvr.cc Outdated Show resolved Hide resolved
src/main/resources/testchipip/csrc/SimSerial.cc Outdated Show resolved Hide resolved
src/main/resources/testchipip/csrc/testchip_fesvr.h Outdated Show resolved Hide resolved
src/main/resources/testchipip/csrc/testchip_fesvr.h Outdated Show resolved Hide resolved
Copy link
Contributor

@colinschmidt colinschmidt left a comment

Choose a reason for hiding this comment

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

This is fine.
For reference:
As discussed online it is reinventing the loadmem support from htif_t a bit but using that support would require a rewrite of the firesim_tsi_t implementation that predates the htif_t support. There is no technical reason we can't do this but also a very minimal (if any) technical benefit to doing it. Directly running memcpy might be slightly faster but hard to know since the magic loadmem unit has a large chunk size (@jerryz123 This is true right?) so its only a few function calls per program. It took us a few years to think about changing firesim_fesvr_t so I think this code will live even longer (as it pushed the good enough bar even higher) but 🤷‍♂️

@jerryz123
Copy link
Contributor Author

The chunk max size appears to be 1024 bytes defined here: https://github.com/riscv/riscv-isa-sim/blob/4baf970f1b151400152c43559e601625dc03bd67/fesvr/tsi.h#L40-L41

@jerryz123 jerryz123 changed the base branch from tile-reset-ctrl to master October 8, 2020 21:40
@jerryz123 jerryz123 merged commit e88a286 into master Oct 12, 2020
@jerryz123 jerryz123 deleted the unify-fesvr branch January 23, 2024 04:46
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