Skip to content

Commit

Permalink
typedef: Add APB_TYPEDEF_ALL macro (#10)
Browse files Browse the repository at this point in the history
typedef: `Add APB_TYPEDEF_ALL` macro
  • Loading branch information
niwis authored Mar 4, 2023
1 parent 56ca84b commit e75aac6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/apb/typedef.svh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,18 @@
} apb_resp_t;
////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////
// All APB request/response structs in one macro.
//
// Usage Example:
// `APB_TYPEDEF_ALL(my_apb, addr_t, data_t, strb_t)
//
// This defines the `my_apb_req_t` and `my_apb_resp_t` request/response structs.
`define APB_TYPEDEF_ALL(__name, __addr_t, __data_t, __strb_t) \
`APB_TYPEDEF_REQ_T(__name``_req_t, __addr_t, __data_t, __strb_t) \
`APB_TYPEDEF_RESP_T(__name``_resp_t, __data_t)
////////////////////////////////////////////////////////////////////////////////////////////////////


`endif

0 comments on commit e75aac6

Please sign in to comment.