I was attempting to write a struct compatible with DPI-C for Verilog.
The struct is as follows:
/* Microcontroller FW config */
struct ucode_image_config {
uintptr_t src_addr;
uint32_t size;
};
In DPI-C the code is as follows:
/* Microcontroller FW configuration */
typedef struct {
int unsigned src_addr;
int unsigned size;
} ucode_image_config_t;
I assume this is not a 1-1 equivalence because of the variable size of uintptr_t
, so I'm wondering if there's a better solution.