Jump to content

Recommended Posts

Posted

Hi there,

Not sure if this is possible with the current standards, but I'd like to create a user defined property with its type set as accesstype.

ie.

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

Thanks!

Posted

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

  • 4 weeks later...
Posted

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

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.

×
×
  • Create New...