add reverse-diag-chip function