Skip to content
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

Improve AddressDecoder #2990

Open
sequencer opened this issue May 17, 2022 · 0 comments
Open

Improve AddressDecoder #2990

sequencer opened this issue May 17, 2022 · 0 comments
Labels

Comments

@sequencer
Copy link
Member

sequencer commented May 17, 2022

Use chisel3.util.experimental.BitSet.fromRange and chisel3.util.experimental.decode.bitset to replace freechips.rocketchip.diplomacy.AddressDecoder

Type of issue: feature request

Impact: no functional change

Development Phase: proposal

What is the current behavior?
Years(literally) ago, I reviewed AddressDecoder in RC. It uses a heuristic algorithm to solve the address space, I think it might be less efficient than espresso.
Chisel adds these two APIs, chisel3.util.experimental.BitSet.fromRange and chisel3.util.experimental.decode.bitset in chipsalliance/chisel#2449 and chipsalliance/chisel#2211, which can use logic minimizer for routing logics.
However there are two tricky things:

  1. For AddressDecoder, since the routing circuit(crossbar, ring, mesh) are routing a continues range, a better circuit should be "adder"-based logic, the generated circuit is "XOR"-based logic. However neither chisel3.util.experimental.decode.bitset nor freechips.rocketchip.diplomacy.AddressDecoder provides such functionality, which means the output circuit is somehow sub-optimal(in misaligned address, this impact is huge) But essentially we should fix this in Chisel.

  2. See std: add AddressSet from rocket-chip chisel#2434 (comment)

RC AddressSet can be unknown width, as you can see from val Everything = AddressSet(0, -1) API, while chisel BitSet doesn't support.

This means: there should be a compatibility layer specifically designed for unknown width to bridge the RC and chisel3.

What is the use case for changing the behavior?
Improve the performance of freechips.rocketchip.diplomacy.AddressDecoder, dedup logic between RC and Chisel.

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

No branches or pull requests

1 participant