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 c model drv #3

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

[nix] add sail riscv c model drv #3

wants to merge 5 commits into from

Conversation

Avimitin
Copy link

No description provided.

The `shellHook` field will only be sourced when running `nix develop`.
For other shell users that use nix-direnv, this won't work anymore.
This commit use the `env` field to expose those value to make the
devShell cross unix shells.

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

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.

Signed-off-by: Avimitin <[email protected]>
@Avimitin Avimitin force-pushed the riscv-sail branch 3 times, most recently from cbfdf3d to 3efe5da Compare October 8, 2024 13:38
Although sail support using different prefix for its model declaration
when generating C sources, I am still afraid that these global machine
state 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