Giter Club home page Giter Club logo

Comments (8)

poemonsense avatar poemonsense commented on August 16, 2024

B extension does not require special handling in DiffTest, since B extension uses the same general-purpose registers as the RV64GC.

Difftest requires extra bundles defined for F/D, Vector (DiffArchVecRegState, DiffVecCSRState) and Hypervisor (DiffHCSRState) extensions.

Therefore, not supporting B extension should not be related to difftest.

If you find rocket not support B ext, please refer to rocket readme/help for how to enable this extension.

If you find the simulation framework unable to test B extensions, it's most likely you are not using a reference model (NEMU/Spike) with B extension enabled. You may refer to their readme to see how to enable B extension.

from difftest.

Codemaker-1 avatar Codemaker-1 commented on August 16, 2024

Thank you for your prompt response.

I followed your suggestions and made modifications to both Rocket and Spike, and it worked for the B ext ! 😊

However, could you provide more information or approaches on how to support the V extension?

Thanks!

from difftest.

Codemaker-1 avatar Codemaker-1 commented on August 16, 2024

Never mind, it seems that Xiangshan is a good example to learn how to support other extensions. You can close this issue whenever you like.

Thank you.

from difftest.

Codemaker-1 avatar Codemaker-1 commented on August 16, 2024

After the changes, the log output at the top shows:

The first instruction of core 0 has commited. Difftest enabled. 
No instruction of core 0 commits for 500 cycles, maybe get stuck
(please also check whether a fence.i instruction requires more than 500 cycles to flush the icache)
Let REF run one more instruction.
...
> The normal instruction flow is displayed below.

May I ask if this prompt can be ignored?

from difftest.

poemonsense avatar poemonsense commented on August 16, 2024

However, could you provide more information or approaches on how to support the V extension?

Besides XiangShan, which is a good start point, I would recommend just reading the Difftest.scala. You can infer from the Bundle definitions that only DiffArchVecRegState, DiffVecCSRState are for vector (also can be seen from the commit 4ec40ea). Thus, the only thing to do is instantiting the corresponding DifftestModule in the design-under-test the same way as other bundles. I believe it would be easy for you to add these bundles in your own design.

from difftest.

poemonsense avatar poemonsense commented on August 16, 2024

After the changes, the log output at the top shows:

The first instruction of core 0 has commited. Difftest enabled. 
No instruction of core 0 commits for 500 cycles, maybe get stuck
(please also check whether a fence.i instruction requires more than 500 cycles to flush the icache)
Let REF run one more instruction.
...
> The normal instruction flow is displayed below.

May I ask if this prompt can be ignored?

It means the design-under-test may be stucked (no commits for 500 cycles) at executing some instruction.

While this cannot be ignored, this suggests something wrong with the design-under-test or how you connect them. DiffInstrCommit does not receive any commit in the last 500 cycles.

If the design does take more than 500 cycles to execute, you may need to enlarge this limit in difftest.h.

However, the more likely reason is, just as it says, the design-under-test may be stucked at some instruction. You can see from the logs displayed for the last instruction executed (marked as <-). You can check the design-under-test why this instruction does not commit in the last 500 cycles.

from difftest.

poemonsense avatar poemonsense commented on August 16, 2024

Never mind, it seems that Xiangshan is a good example to learn how to support other extensions. You can close this issue whenever you like.

I'm closing this issue to indicate the completion. However, you can still reply to this issue to track future problems.

If you encounter another problem, please feel free to raise a new issue with the corresponding title for the new problem.

from difftest.

Codemaker-1 avatar Codemaker-1 commented on August 16, 2024

Thank you for your detailed explanation and kind reminder!

from difftest.

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.