Algorithms And Low Cost Architectures For Trace Buffer-Based Silicon Debug