Giter Site home page Giter Site logo

Detecting the extension about riscv-aia HOT 6 CLOSED

riscv avatar riscv commented on August 24, 2024
Detecting the extension

from riscv-aia.

Comments (6)

timsifive avatar timsifive commented on August 24, 2024

Looks like at least I need to also read mtopei because that's only readable with an IMSIC.

from riscv-aia.

ved-rivos avatar ved-rivos commented on August 24, 2024

from riscv-aia.

timsifive avatar timsifive commented on August 24, 2024

If someone could double check my logic at https://github.com/riscv/riscv-openocd/pull/815/files#diff-b4aa16f9e42cb8f0934baa7c8e0ec9c70a369bef98b99b26ae2e896c8aa95d6aR5402 that'd be very helpful.

from riscv-aia.

timsifive avatar timsifive commented on August 24, 2024

Presumably by accessing extension state you mean writing a CSR and seeing if the new value is accepted. For a debugger, that means:

  1. Read the CSR
  2. Write a new value
  3. Read it back to see if the value was accepted
  4. Write back the original value, so we don't interfere with the running code.
    That's quite a process. I much prefer a single read (and even that will grow out of control if the debugger has to do a read for every extension that adds CSRs). Hopefully some day Unified Discovery can streamline this process.

Personally I'm only interested in whether the CSRs are implemented or not (so the debugger can show them to the user or not.) Would it still be necessary to try to access the state to see which CSRs are implemented?

from riscv-aia.

ved-rivos avatar ved-rivos commented on August 24, 2024

Personally I'm only interested in whether the CSRs are implemented or not (so the debugger can show them to the user or not.) Would it still be necessary to try to access the state to see which CSRs are implemented?

It depends on what the goal is. If the goal is to show that miselect/mireg are implemented then just accessing them suffices. If the goal is to show that the IMSIC is implemented based on existence of miselect/mireg then it may not be sufficient as these may be implemented to support a different extension than IMSIC. From the PR you posted seems like you are discovering mtopi and using that to infer existence of miselect/mireg as well as AIA. That sounds okay to me.

from riscv-aia.

timsifive avatar timsifive commented on August 24, 2024

It depends on what the goal is. If the goal is to show that miselect/mireg are implemented then just accessing them suffices.

That is my goal. Thanks for looking over my PR.

I imagine a more sophisticated debugger would like to show whether IMSIC is supported.

from riscv-aia.

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.