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

[nix] add sail riscv model builder #780

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

[nix] add sail riscv model builder #780

wants to merge 2 commits into from

Conversation

Avimitin
Copy link
Contributor

No description provided.

@Avimitin Avimitin force-pushed the sail-initial branch 2 times, most recently from c3f6152 to 8125800 Compare September 29, 2024 09:05
Disambiguation:

* sail: the official sail language, library, API, headers that belongs
  to rem-project.
* sail-riscv: the riscv spec definition describe using sail.

Build step:

1. Use rust-bindgen to create Rust FFI to the sail header, so that we
   can always keep integrity of the sail library.
2. Extern declare all necessary C function define in generated model
   from sail and sail-riscv.
3. Define or override necessary functions from our Rust side.

Current issues:

* Implement our Rust emulator using above strategy inevitably create a
  programming model that functions will be called back and forth from
  both C and Rust side. This will also make the code hard to read. Hope
  this situation could be improved in upcomming rational documents.
* Although sail support using different prefix for its model declaration
  when generating C sources, I am still afraid that these global machine
  state in sail-riscv model will cause problem in our future development.

Signed-off-by: Avimitin <[email protected]>
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