Giter Club home page Giter Club logo

Comments (2)

spruett avatar spruett commented on July 21, 2024

Hi, thanks for the question.

I think you are correct about a slight inaccuracy in Scarab. To my knowledge, what is typically done here is there are actually two structures: let's call them the Branch Buffer and the Target Buffer. The Branch Buffer holds static information about the branch (e.g., that it is a branch, what kind of branch it is call/return/indirect/etc, and any other static information about the branch that may assist with fetch or prediction). The Target Buffer holds the target of the branch in the case of direct branches.

An indirect branch would require a Branch Buffer entry, but not a Target Buffer entry (as the target would be supplied by the iBTB structure).

Now in Scarab, we only model one structure: the Branch Target Buffer (BTB). This means when we allocate the required BTB entry to track static branch information (things the Branch Buffer would have tracked in my earlier example) we are also allocating a target entry, which is technically a waste of space.

I believe from a performance modeling perspective, there is nothing to be concerned about here. However, with added complexity, the BTB could be split into two structures to improve space efficiency.

Does this answer your question?

from scarab.

takhandipu avatar takhandipu commented on July 21, 2024

It does. Thanks for your answer. That also explains why IPC falls when I add the following check before the BTB entry update even with ENABLE_CRS and ENABLE_IBP.

if(op->oracle_info.btb_miss && (op->table_info->cf_type == CF_CBR || op->table_info->cf_type == CF_CALL || op->table_info->cf_type == CF_BR))
    bp_data->bp_btb->update_func(bp_data, op);

Seems like branch static information is much more important than few wasted bytes in the BTB. I was assuming that branch static information is stored in the branch predictor instead of BTB. That is because, Scarab already uses cf_type (one of the static information) to determine whether to look at BTB, IBTB, or handle special case syscall (as seen in the code snippets below). Thanks anyways for your answer.
image
and
image

from scarab.

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.