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

add version of trueDualPortBlockRam that sets the initial RAM contents #2204

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

Conversation

cuddlefishie
Copy link

@cuddlefishie cuddlefishie commented May 11, 2022

This PR renames the existing trueDualPortBlockRam function to trueDualPortBlockRamU to indicate that the initial BRAM contents are undefined.

This PR also adds a new function, trueDualPortBlockRam to the prelude which takes the initial RAM contents as an argument. This function is implemented as a blackbox for HDL targets.

Fixes #2199

Still TODO:

  • Write a changelog entry (see changelog/README.md)
  • Check copyright notices are up to date in edited files
  • Write unit-tests for trueDualPortBlockRam

Copy link
Member

@DigitalBrains1 DigitalBrains1 left a comment

Choose a reason for hiding this comment

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

Looks good! I quickly went through. I'd like to suggest slightly different documentation as indicated below.

clash-prelude/src/Clash/Explicit/BlockRam.hs Outdated Show resolved Hide resolved
clash-prelude/src/Clash/Explicit/BlockRam.hs Outdated Show resolved Hide resolved
clash-prelude/src/Clash/Prelude/BlockRam.hs Outdated Show resolved Hide resolved
clash-prelude/src/Clash/Prelude/BlockRam.hs Outdated Show resolved Hide resolved
@lmbollen
Copy link
Contributor

The currently existing unit tests don't check the correctness of the implementation, but rather that the generated HDL behaves the same as the Haskell model.

I think we should change this at some point.

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.

Can not set initial contents of trueDualPortRAM
3 participants