module p_unpack_data_size #( parameter PipeSpec = `PS_def ) (
        inout [`P_m(PipeSpec):0]          pipe,
        output [`P_DataSize_w(PipeSpec)-1:0] data_size
    );

    generate
        if ( `P_DataSize_w( PipeSpec ) )
            assign data_size = pipe[`P_DataSize_m(PipeSpec):`P_DataSize_l(PipeSpec)];
        else
            assign data_size = 0;
    endgenerate

endmodule