improve code for ndb dump pattern table of ppu.