Skip to content

Perfect_BP should not have an impact if USE_BRANCH_PREDICTION was set to false #69

@FanosLab

Description

@FanosLab

Hello,
Another issue in the frontend_c::predict_bpu function is that if BP was disabled but the user sets perfect_BP, it will still act as perfect.
It might be more of a usability than a correctness issue but it sounds more intuitive if BP was disabled to void the effect of the perfect_BP parameter.
In that case, this line of code:

if (*m_simBase->m_knobs->KNOB_USE_BRANCH_PREDICTION) mispredicted = false;

can be replaced by the condition of use_branch_prediction:

if ((*m_simBase->m_knobs->KNOB_USE_BRANCH_PREDICTION) && (*m_simBase->m_knobs->KNOB_PERFECT_BP)) mispredicted = false;

Mohamed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions