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

Would default values for reg_file make sense to you? #17

Open
cweickhmann opened this issue Jun 13, 2024 · 0 comments
Open

Would default values for reg_file make sense to you? #17

cweickhmann opened this issue Jun 13, 2024 · 0 comments

Comments

@cweickhmann
Copy link

cweickhmann commented Jun 13, 2024

I'm using reg_file (in its 2008) version and realised that setting default values isn't straightforward.
Imho, adding generics

USE_DEFAULT_VALS: boolean := false;
DEFAULT_VALS: reg_array;

and extending the reset branch by

if USE_DEFAULT_VALS then
        registers_loc <= DEFAULT_VALS;
      else
        registers_loc <= (others            => (others => '0'));
      end if;

would solve this and the block would still function identically for anyone happy with default values at all 0.

Have you considered this? Am I totally off in terms of use-case?

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

No branches or pull requests

1 participant