Git Product home page Git Product logo

Comments (5)

gmarkall avatar gmarkall commented on May 18, 2024

An update - we seem to get around the problem by reading the value of DBG_NPC and writing it back to cause a pipeline flush, as in: https://github.com/embecosm/ri5cy/blob/verilator-model/verilator-model/testbench.cpp#L279

Is this a bug somewhere, or is it always required to read/write DBG_NPC before resuming/single-stepping?

from cv32e40p.

gmarkall avatar gmarkall commented on May 18, 2024

We also noticed that the problem isn't just limited to the debug unit - whilst executing some programs that stall the pipeline with a load, the contents of the prefetch fifo become corrupted.

It turns out that we observe these issues only when INSTR_RDATA_WIDTH is 32, and the prefetch_buffer (prefetch_32) is used. When INSTR_RDATA_WIDTH is 128 and the prefetch_L0_buffer (prefetch_128) is used, we can use the debug unit without flushing the pipeline by writing to DEBUG_NPC, and the programs that stalled the pipeline don't seem to result in the contents of the fifo getting corrupted.

Is it possible that there's an issue with prefetch_buffer? I notice that the last commit to it (cc82192) was intended to address issues like the one we are seeing - could we be hitting an edge case that somehow got through?

Or maybe there's something else that needs to be done that we're not doing when using the prefetch_buffer?

from cv32e40p.

davideschiavone avatar davideschiavone commented on May 18, 2024

Hello,

thanks for reporting it!

I will try to replicate it, can you tell us more details to replicate such pipeline issue?

Maybe some waveforms or the piece of code with relative stalls would be also helpful for us.
Let us start with the example without debug :)

Thanks a lot,
Davide

from cv32e40p.

gmarkall avatar gmarkall commented on May 18, 2024

I've just tried changing INSTR_RDATA_WIDTH back to 32 in the most recent revision (was using 128 to workaround the issue as mentioned above), and I can no longer replicate the issue - I guess some of the changes recently that made fixes to the prefetcher have maybe resolved it?

from cv32e40p.

davideschiavone avatar davideschiavone commented on May 18, 2024

Hello,

I have actually fixed the prefetcher buffer in these 2 commits:

7078fa8

and here

5fb7e42

I hope this also solved your issue :)

from cv32e40p.

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.