module p_unpack_pssdvr #( parameter PipeSpec = `PS_def ) (
        inout [`P_w(PipeSpec)-1:0]           pipe,

        output                               start,
        output                               stop,
        output [`P_Data_w(PipeSpec)-1:0]     data,
        output                               valid,
        input                                ready
    );

    generate
        if ( `P_Start_w( PipeSpec ) )
            assign start = pipe[ `P_Start_b(PipeSpec) ];
        if ( `P_Stop_w( PipeSpec ) )
            assign stop  = pipe[ `P_Stop_b(PipeSpec) ];
    endgenerate

    assign data  = pipe[ `P_Data_m(PipeSpec):`P_Data_l(PipeSpec) ];
    assign valid = pipe[ `P_Valid_b(PipeSpec) ];
    assign pipe[ `P_Ready_b(PipeSpec) ] = ready;

endmodule