def delay_sequence_ld(self, delay, ld, seq_dict):
    taps = seq_dict[(('LD' + str(ld)) + '_Tap')][1]
    taps_addr = seq_dict[(('LD' + str(ld)) + '_Tap')][0]
    tap_pos = (taps & 255)
    tap_neg = ((taps & 65280) >> 8)
    (blk_pos, blk_neg) = self.get_blanking_values(ld, seq_dict)
    blk_pos_shift = 0
    blk_neg_shift = 0
    tap_pos = (tap_pos + delay)
    tap_neg = (tap_neg + delay)
    while (tap_pos >= 128):
        blk_pos_shift += 1
        tap_pos -= 128
    while (tap_neg >= 128):
        blk_neg_shift += 1
        tap_neg -= 128
    while (tap_pos < 0):
        blk_pos_shift -= 1
        tap_pos += 128
    while (tap_neg < 0):
        blk_neg_shift -= 1
        tap_neg += 128
    blk_pos = (blk_pos + blk_pos_shift)
    blk_neg = (blk_neg + blk_neg_shift)
    tap_write = {}
    tap_write[hex(taps_addr)] = ((tap_neg << 8) + tap_pos)
    blk_writes = self.set_blanking_values(blk_pos, blk_neg, ld, seq_dict)
    writes = dict(tap_write, **blk_writes)
    return writes
def delay_sequence_ld(self, delay, ld, seq_dict):
    taps = seq_dict[(('LD' + str(ld)) + '_Tap')][1]
    taps_addr = seq_dict[(('LD' + str(ld)) + '_Tap')][0]
    tap_pos = (taps & 255)
    tap_neg = ((taps & 65280) >> 8)
    (blk_pos, blk_neg) = self.get_blanking_values(ld, seq_dict)
    blk_pos_shift = 0
    blk_neg_shift = 0
    tap_pos = (tap_pos + delay)
    tap_neg = (tap_neg + delay)
    while (tap_pos >= 128):
        blk_pos_shift += 1
        tap_pos -= 128
    while (tap_neg >= 128):
        blk_neg_shift += 1
        tap_neg -= 128
    while (tap_pos < 0):
        blk_pos_shift -= 1
        tap_pos += 128
    while (tap_neg < 0):
        blk_neg_shift -= 1
        tap_neg += 128
    blk_pos = (blk_pos + blk_pos_shift)
    blk_neg = (blk_neg + blk_neg_shift)
    tap_write = {}
    tap_write[hex(taps_addr)] = ((tap_neg << 8) + tap_pos)
    blk_writes = self.set_blanking_values(blk_pos, blk_neg, ld, seq_dict)
    writes = dict(tap_write, **blk_writes)
    return writes