Skip to content

22sauravt/riscvdecode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sail RISC-V extractor

A tool to extract information from the sail-riscv spec.

Build

make

This will build a riscv_decode.cmxs for use as a sail plugin. Example use below.

Usage

In general:

sail -plugin riscv_decode.cmxs -riscv_decode <files>

A specific example follows. To ensure the various RISC-V Sail files are all included and in the correct order, leverage the sail-riscv/Makefile:

  1. Clone the sail-riscv repository:

    $ git clone https://github.com/riscv/sail-riscv.git
    
  2. Add a decode target to the Makefile, providing the path to the plugin built above:

    @@ -178,6 +178,10 @@ endif
      
     .PHONY:
      
     +decode: $(SAIL_SRCS) model/main.sail Makefile
     +       sail -dno_cast -no_warn -plugin $(replace with path to)/riscvdecode/riscv_decode.cmxs -riscv_decode $(SAIL_SRCS)
     +
    
  3. Run it:

    $ make decode
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 98.8%
  • Makefile 1.2%