def propagate_bits_in_column(database, tiles_by_grid, tile_type, term_b,
                             term_t, rbrk, rclk_types, tile_frames, tile_words,
                             tile_frames_map):
    """ Propigate offsets up and down columns, based on a fixed pattern. """

    rclk_frames, rclk_words = localutil.get_entry('RCLK_INT_L', 'CLB_IO_CLK')
    _, ecc_words = localutil.get_entry('ECC', 'CLB_IO_CLK')
    seen_int = set()

    for tile_name in sorted(database.keys()):
        tile = database[tile_name]

        if tile['type'] != tile_type:
            continue

        if not tile['bits']:
            continue

        if tile_name in seen_int:
            continue

        # Walk down column
        while True:
            seen_int.add(tile_name)

            next_tile = tiles_by_grid[(tile['grid_x'], tile['grid_y'] + 1)]
            next_tile_type = database[next_tile]['type']

            if tile['bits']['CLB_IO_CLK']['offset'] == 0:
                assert next_tile_type in [term_b, rbrk], next_tile_type
                break

            baseaddr = int(tile['bits']['CLB_IO_CLK']['baseaddr'], 0)
            offset = tile['bits']['CLB_IO_CLK']['offset']

            if tile['type'] == tile_type and next_tile_type == tile['type']:
                # INT next to INT
                offset -= tile_words
                localutil.add_tile_bits(next_tile, database[next_tile],
                                        baseaddr, offset, tile_frames,
                                        tile_words, tile_frames_map)
            elif tile['type'] == tile_type:
                # INT above RCLK
                assert next_tile_type in rclk_types, next_tile_type

                offset -= rclk_words
                localutil.add_tile_bits(next_tile, database[next_tile],
                                        baseaddr, offset, rclk_frames,
                                        rclk_words, tile_frames_map)
                offset -= ecc_words
            else:
                # RCLK above INT
                assert tile['type'] in rclk_types, tile['type']
                if next_tile_type == tile_type:
                    offset -= ecc_words
                    offset -= tile_words
                    localutil.add_tile_bits(next_tile, database[next_tile],
                                            baseaddr, offset, tile_frames,
                                            tile_words, tile_frames_map)
                else:
                    assert next_tile_type in [], next_tile_type
                    break

            tile_name = next_tile
            tile = database[tile_name]

        # Walk up INT column
        while True:
            seen_int.add(tile_name)

            next_tile = tiles_by_grid[(tile['grid_x'], tile['grid_y'] - 1)]
            next_tile_type = database[next_tile]['type']

            if tile['bits']['CLB_IO_CLK']['offset'] == 183:
                assert next_tile_type in [term_t, rbrk], next_tile_type
                break

            baseaddr = int(tile['bits']['CLB_IO_CLK']['baseaddr'], 0)
            offset = tile['bits']['CLB_IO_CLK']['offset']

            if tile['type'] == tile_type and next_tile_type == tile['type']:
                # INT next to INT
                offset += tile_words
                localutil.add_tile_bits(next_tile, database[next_tile],
                                        baseaddr, offset, tile_frames,
                                        tile_words, tile_frames_map)
            elif tile['type'] == tile_type:
                # INT below RCLK
                assert next_tile_type in rclk_types, next_tile_type

                offset += tile_words
                offset += ecc_words

                localutil.add_tile_bits(next_tile, database[next_tile],
                                        baseaddr, offset, rclk_frames,
                                        rclk_words, tile_frames_map)
            else:
                # RCLK below INT
                assert tile['type'] in rclk_types, tile['type']
                assert next_tile_type == tile_type, next_tile_type

                offset += rclk_words
                localutil.add_tile_bits(next_tile, database[next_tile],
                                        baseaddr, offset, tile_frames,
                                        tile_words, tile_frames_map)

            tile_name = next_tile
            tile = database[tile_name]