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

[RFC] combining memories for byte enables #3157

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mkj
Copy link

@mkj mkj commented Jan 14, 2022

Currently the RAMs inferred by GHDL are split into separate instances for byte enables. This leads to more cells being used, so I've tried this optimisation pass to combine the separate memories if they share the same input source.

Would that approach be worth pursuing? The patch currently works sufficiently to reduce resources used by Microwatt though I'd need to add better checking that memories being combined are compatible.

Or should the byte enable inference instead be done GHDL? Adding @tgingold for any thoughts.

A test example is https://gist.github.com/mkj/00f8d39c95ec9e173b3534b686a7ad2a

old
     DP16KD                          8
new
     PDPW16KD                        2

The RAMs inferred by GHDL are split into separate instances
for byte enables. This pass recombines memories that have the same
input address (and matching characteristics) allowing a single
BRAM to be used with byte enables.

Work in progress, needs more checks for memory compatibility
Briefly tested to work for microwatt
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.

None yet

1 participant