def create_layers_range(config):
    """
    Calculate the router id range for each layer of NoC.

    Parameters
    ----------
    config : [type]
        Configuration

    Returns
    -------
    [type]
        list of router id range
    """

    layers_range = []
    router_counter = 0
    for x, y in zip(config.x, config.y):
        layers_range.append(range(router_counter, router_counter+x*y))
        router_counter += x*y
    return layers_range