Skip to content

Conversation

@Frankp-XNS
Copy link

Related issue:

Type of change: feature request

Impact: API addition (no impact on existing code)

Development Phase: implementation

Release Notes

Add runtime configurable BHT (Branch History Table) parameters to the Rocket core branch predictor. The branch predictor's history length and history bits can now be configured at runtime through CSR 0x7c0 instead of being fixed at compile time.

Changes

  • Extended CSR 0x7c0 with new bit fields: bits[4:1] for history length config, bits[8:5] for history bits
    config
  • Updated BHT indexing logic to use configurable parameters instead of compile-time constants
  • Added new input ports to BTB for runtime configuration
  • Maintains backward compatibility with existing configurations (defaults to 0)

Limitations:

  • History length and history bits are limited to 4-bit fields (0-15 range)
  • Configurations with history length > 15 are no longer supported
  • Runtime configuration values must not exceed the compile-time BHTParams limits
  • Shuttle BHT instantiation needs to be updated afterwards to ensure compilation at top level. Separate PR will be submitted for shuttle if this is approved.

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.

1 participant