Skip to content

Branch Prediction Unit #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

dragon540
Copy link
Collaborator

This is the draft PR for the implementation of branch prediction unit.

Copy link
Collaborator

@klingaard klingaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start. Thanks!

Comment on lines 112 to 124
uint32_t ghr_size_;
uint32_t ghr_hash_bits_;
uint32_t pht_size_;
uint32_t ctr_bits_;
uint32_t btb_size_;
uint32_t ras_size_;
bool ras_enable_overwrite_;
uint32_t tage_bim_table_size_;
uint32_t tage_bim_ctr_bits_;
uint32_t tage_tagged_table_num_;
uint32_t logical_table_num_;
uint32_t loop_pred_table_size_;
uint32_t loop_pred_table_way_;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide default initializations OR make these const

Comment on lines 69 to 79
uint32_t tage_bim_table_size_;
uint8_t tage_bim_ctr_bits_;
uint16_t tage_max_index_bits_;
uint8_t tage_tagged_ctr_bits_;
uint8_t tage_tagged_useful_bits_;
uint32_t tage_global_hist_buff_len_;
uint32_t tage_min_hist_len_;
uint8_t tage_hist_alpha_;
uint32_t tage_reset_useful_interval_;
uint8_t tage_num_component_;
TageBIM tage_bim_;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default initialize or make them const

Comment on lines 51 to 53
uint32_t tage_bim_table_size_;
uint8_t tage_base_ctr_bits_;
uint8_t tage_base_max_ctr_;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default initialize or make them const

Comment on lines +84 to +94
class StatisticalCorrector
{
public:
private:
};

class LoopPredictor
{
public:
private:
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these "todo"s?

Copy link
Collaborator Author

@dragon540 dragon540 Mar 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I intend to work on these once the rest of the bpu pipeline is working. I have commented them out for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants