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

Commits on Oct 8, 2024

  1. [nix] add sail riscv model builder

    Signed-off-by: Avimitin <[email protected]>
    Avimitin committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    80f4038 View commit details
    Browse the repository at this point in the history
  2. [sail-riscv] add sail-riscv Rust binder

    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]>
    Avimitin committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    ab28447 View commit details
    Browse the repository at this point in the history