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

standardizing harden_p for bsg_mem #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dpetrisko
Copy link
Contributor

Standardizing the harden_p scheme for memories.

This means

  1. removing harden_p from _synth memories
  2. Adding harden_p to all other mems
  3. In hardened directories default harden_p = 1
  4. In non-hardened directories default harden_p = 0

@dpetrisko dpetrisko added the clarity Code readability or documentation issues label Oct 18, 2022
@dpetrisko dpetrisko self-assigned this Oct 18, 2022
@dpetrisko
Copy link
Contributor Author

Doubtful that this will break anything as synth memories should never be explicitly instantiated anywhere, and not-synth mems will not be setting this unused parameter

@taylor-bsg
Copy link
Contributor

Great suggested change. Do we have an error or warning that fires when if harden_p=1 and it is going to a non-hardened module?

@taylor-bsg
Copy link
Contributor

If it is non-leaf, then it should pass harden_p along, rather than swallowing it. This way we don't have to clone the code for intermediate modules that would not be hardened, but whose children are hardened.

@dpetrisko
Copy link
Contributor Author

Do we have an error or warning that fires when if harden_p=1 and it is going to a non-hardened module?

Can add!

If it is non-leaf, then it should pass harden_p along, rather than swallowing it. This way we don't have to clone the code for intermediate modules that would not be hardened, but whose children are hardened.

Not sure what you mean here. Are you proposing

  • bsg_mem/bsg_mem_1rw_sync.v has harden and $warns if it is set
  • bsg_mem/bsg_mem_1rw_sync_synth.v has harden and $warns if set?

Aside $warn vs $error?

@dpetrisko
Copy link
Contributor Author

@taylor-bsg clarification on the above?

dpetrisko pushed a commit that referenced this pull request Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarity Code readability or documentation issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants