Git Product home page Git Product logo

Comments (4)

neelgala avatar neelgala commented on August 26, 2024

@ZenithalHourlyRate even prior to #106 the slli instruction was considered a pseudo op of the RV64 slli instruction (here). I have simply maintained that relationship here.

Right now the parse.py script is not going to dump any pseudo-ops into the code if the original instruction is already present. This is because there are instructions like slli in RV32 which have the same mnemonics as the original instruction in RV64 but vary in encodings. This makes it difficult to create unique entries in the instruction yaml (even some code for that matter) for each instruction.

If you want to build a decoder for rv32 you can use the following command : make EXTENSIONS="rv32* unratified/rv32*" which would generate the correct encoding for the use-case you have defined.

from riscv-opcodes.

ZenithalHourlyRate avatar ZenithalHourlyRate commented on August 26, 2024

If you want to build a decoder for rv32 you can use the following command : make EXTENSIONS="rv32* unratified/rv32*" which would generate the correct encoding for the use-case you have defined.

Thanks for this information! Unfortunately rocket chip uses the same inst.chisel for both RV32 and RV64, so if I want to make rocket chip work I need to generate both file and merge them, which is painful and not maintainable.

Right now the parse.py script is not going to dump any pseudo-ops into the code if the original instruction is already present.

Is it possible that the parse.py script could detect the difference in encoding and generate different entries when output encoding related codes. For mnemonics they could be the same.

from riscv-opcodes.

neelgala avatar neelgala commented on August 26, 2024

for both RV32 and RV64, so if I want to make rocket chip work I need to generate both file and merge them, which is painful and not maintainable.

If you are maintaining a single decoder for both RV32 and RV64 , then it would make sense to include the xlen checks in your decoder itself instead of overloading it in the inst.chisel. For example in rocket maybe moving this check inside this class would solve the problem ? This is similar to what spike does when encodings vary based on XLEN - it has further explicit encoding checks based on XLEN.

Is it possible that the parse.py script could detect the difference in encoding and generate different entries when output encoding related codes. For mnemonics they could be the same.

This is achievable but this would affect other artifacts as well - like the latex table generation. The instruction names in those tables will also change to SLLI_RV32_I which is not acceptable by the spec.

from riscv-opcodes.

ZenithalHourlyRate avatar ZenithalHourlyRate commented on August 26, 2024

For example in rocket maybe moving this check inside this class would solve the problem ?

Thanks! I will try to refactor that. Closing this issue now as it is deemed as an API change instead of a bug.

from riscv-opcodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.