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

fix vendorid and marchid #152

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

davideschiavone
Copy link

No description provided.

@@ -555,10 +555,10 @@ Machine Architecture ID (marchid)

CSR Address: ``0xF12``

Reset Value: ``0x0000_0016``
Reset Value: ``CSR_MARCHID_VALUE``

Use the ``CSR_MARCHID_VALUE`` parameter in :file:`rtl/cve2_pkg.sv` to change the fixed value.

Choose a reason for hiding this comment

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

I guess this should now be the MARCHID parameter of the package

Copy link
Author

Choose a reason for hiding this comment

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

yes but MARCHID_VALUE is equal to MARCHID, see https://github.com/davideschiavone/cve2/blob/fix12/rtl/cve2_pkg.sv#L564

Choose a reason for hiding this comment

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

right, but would you think a user should change MARCHID or CSR_MARCHID_VALUE definition? To me it seems they should use MARCHID

Copy link
Author

Choose a reason for hiding this comment

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

MARCHID and MARCHID_VALUE are the same value, and it's a read only register. If it is easier for the user to read "35" or MARCHID I can change it - let me know

Choose a reason for hiding this comment

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

my point is, if an integrator wants a different value for MARCHID, this will be done like:

module cve2_top import cve2_pkg::*; #(
  parameter MARCHID = 32'd99,
  ...
)

You essentially added a parameter, which is good, but it was not reflected in the documentation. There shouldn't be a need to modify inside the pkg anymore

Copy link
Author

Choose a reason for hiding this comment

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

Oh I see, I can move it to localparam , what do you think?

Choose a reason for hiding this comment

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

i think its cool as a parameter, Somebody who instantiates the core might want to have their own value, then this is an easy way

Copy link
Author

Choose a reason for hiding this comment

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

Ok then as soon as you approve the PR I merge :) thanks

Copy link

@christian-herber-nxp christian-herber-nxp left a comment

Choose a reason for hiding this comment

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

fix documentation

@christian-herber-nxp christian-herber-nxp merged commit 45e97c2 into openhwgroup:main Sep 26, 2023
1 check passed
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.

JEDEC manufacturer ID for CV32E20 Values for MVENDORID, MARCHID and MIMPID
2 participants