-
Notifications
You must be signed in to change notification settings - Fork 4
Split struct and type definition to allow parameterized types #12
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update to the typedefs is not consistent, please check the comments and make sure the defines are set in a consistent way.
|
||
} | ||
`define OBI_TYPEDEF_ATOP_A_OPTIONAL \ | ||
typedef OBI_ATOP_A_OPTIONAL a_optional_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typedef OBI_ATOP_A_OPTIONAL a_optional_t; | |
typedef `OBI_ATOP_A_OPTIONAL a_optional_t; |
`define OBI_MINIMAL_R_OPTIONAL(r_optional_t) \ | ||
logic r_optional_t; | ||
`define OBI_TYPEDEF_MINIMAL_R_OPTIONAL(r_optional_t) \ | ||
typedef logic r_optional_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`define OBI_MINIMAL_R_OPTIONAL(r_optional_t) \ | |
logic r_optional_t; | |
`define OBI_TYPEDEF_MINIMAL_R_OPTIONAL(r_optional_t) \ | |
typedef logic r_optional_t; | |
`define OBI_MINIMAL_R_OPTIONAL \ | |
logic | |
`define OBI_TYPEDEF_MINIMAL_R_OPTIONAL(r_optional_t) \ | |
typedef `OBI_MINIMAL_R_OPTIONAL r_optional_t; |
`define OBI_MINIMAL_A_OPTIONAL(a_optional_t) \ | ||
logic a_optional_t; | ||
`define OBI_TYPEDEF_MINIMAL_A_OPTIONAL(a_optional_t) \ | ||
typedef logic a_optional_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`define OBI_MINIMAL_A_OPTIONAL(a_optional_t) \ | |
logic a_optional_t; | |
`define OBI_TYPEDEF_MINIMAL_A_OPTIONAL(a_optional_t) \ | |
typedef logic a_optional_t; | |
`define OBI_MINIMAL_A_OPTIONAL \ | |
logic | |
`define OBI_TYPEDEF_MINIMAL_A_OPTIONAL(a_optional_t) \ | |
typedef `OBI_MINIMAL_A_OPTIONAL a_optional_t; |
`define OBI_TYPEDEF_MINIMAL_A_OPTIONAL(a_optional_t) \ | ||
typedef logic a_optional_t; | ||
|
||
`define OBI_TYPEDEF_ATOP_A_OPTIONAL(a_optional_t) \ | ||
typedef struct packed { \ | ||
`define OBI_ATOP_A_OPTIONAL(a_optional_t) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`define OBI_ATOP_A_OPTIONAL(a_optional_t) \ | |
`define OBI_ATOP_A_OPTIONAL \ |
|
||
`define OBI_DEFAULT_REQ_T(req_t, a_chan_t) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`define OBI_DEFAULT_REQ_T(req_t, a_chan_t) \ | |
`define OBI_DEFAULT_REQ_T(a_chan_t) \ |
logic req; \ | ||
} req_t; | ||
|
||
typedef `OBI_DEFAULT_REQ_T(req_t, a_chan_t) req_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typedef `OBI_DEFAULT_REQ_T(req_t, a_chan_t) req_t; | |
typedef `OBI_DEFAULT_REQ_T(a_chan_t) req_t; |
|
||
typedef `OBI_DEFAULT_REQ_T(req_t, a_chan_t) req_t; | ||
|
||
`define OBI_REQ_T(req_t, a_chan_t) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`define OBI_REQ_T(req_t, a_chan_t) \ | |
`define OBI_REQ_T(a_chan_t) \ |
logic rready; \ | ||
} req_t; | ||
|
||
typedef `OBI_REQ_T(req_t, a_chan_t) req_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typedef `OBI_REQ_T(req_t, a_chan_t) req_t; | |
typedef `OBI_REQ_T(a_chan_t) req_t; |
|
||
typedef `OBI_REQ_T(req_t, a_chan_t) req_t; | ||
|
||
`define OBI_RSP_T(rsp_t, r_chan_t) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`define OBI_RSP_T(rsp_t, r_chan_t) \ | |
`define OBI_RSP_T(r_chan_t) \ |
logic rvalid; \ | ||
} rsp_t; | ||
|
||
typedef `OBI_RSP_T(rsp_t, r_chan_t) rsp_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typedef `OBI_RSP_T(rsp_t, r_chan_t) rsp_t; | |
typedef `OBI_RSP_T(r_chan_t) rsp_t; |
My modification consist in defined macros for the different OBI structures.
In some cases, notably passing type by parameter, the typedef is not useful and it is convenient to have the struct
It should be backward compatible, the old types are not changed but use the new macros