Jump to content

Access Type with user-defined properties with SystemRDL


Recommended Posts

Thanks Erwin! Unfortunately I couldn't seem to find the particular section for SystemRDL, and decided this section of the forum is the most appropriate to post such topic; If you could point the direction as to where I can post this question that would be awesome! 

Thanks!

Huang

Link to comment
Share on other sites

  • 4 weeks later...

Hi Huang,

I tried your code example:

property some_rw_type {
  type = accesstype;
  component = reg;
};

csrCompile: ERROR: in file 'accessType.rdl' line 2:
csrCompile:        syntax error at:
csrCompile:        'accesstype'

The SystemRDL 2.0 grammar does not allow for accesstype as the data type of a user defined property.

I don't remember a specific reason that the SystemRDL committee chose not to include accesstype for user defined properties in SystemRDL 2.0 other than no member requested it and we were short on time and resources.

As a workaround I would suggest storing accesstype as a string or an enumeration:

property some_rw_type {
  type = string;
  component = reg;
};
enum AccessType_Enum {
RW; R; W; NA;
};
property another_rw_type {
  type = AccessType_Enum;
  component = reg;
};

 

Rich

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...