VLSI Design of a Multi Functional Adaptive Trellis Decoder for Block Codes