-
Notifications
You must be signed in to change notification settings - Fork 114
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
Reading binary files. #650
Comments
Not really, that's something you'd normally do outside Sail (i.e. in C). If you give more details about what you're trying to do exactly I could point you in the right direction. |
Thanks for the reply! I'm trying to specify the 6502 ISA in Sail. I have a few instructions specified and have implemented a basic instruction decoder and a top-level fetch and execute loop function. I wanted to test it out on actual assembled binaries. I noticed that the REPL has a |
Yeah you're right - the way this is done in RISC-V is that you load the binary into memory, set the PC to your entry point and then call your Basically you would do this:
To implement
Btw when you compile your C program you have to compile the C files in that directory - at least Probably would be good if there was a minimal example for this, but... there isn't, sorry! I guess if the REPL lets you load a binary you could skip most of that. You just need to make sure your Good luck! |
Is there a sail module to parse and read instructions from a compiled binary file? If so, are there examples of usage which I can follow from somewhere?
The text was updated successfully, but these errors were encountered: