Is there a way to get the size of a field in a structure? For instance, $bits does not work. any other approach?
localparam L_DATA_BITS = $bits(pkt_char_t.length);
typedef struct packed {
logic [15:0] checksum;
logic [3:0] offload_flags;
logic length_err;
logic [13:0] length;
} pkt_char_t;