diff --git a/include/apb/typedef.svh b/include/apb/typedef.svh index 462cf3c..9b15132 100644 --- a/include/apb/typedef.svh +++ b/include/apb/typedef.svh @@ -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