Skip to content

[Pack] Estimating Inter-Cluster Delay Before Packing #2890

@AlexandreSinger

Description

@AlexandreSinger

There is code that occurs just before packing which estimates the inter-cluster delay as a single floating point number. This is used in timing analysis to better inform the cost of going between clusters:

static float approximate_inter_cluster_delay(const t_arch& arch,
const t_det_routing_arch& routing_arch,
const std::string& device_layout) {
/* If needed, estimate inter-cluster delay. Assume the average routing hop goes out of
* a block through an opin switch to a length-4 wire, then through a wire switch to another
* length-4 wire, then through a wire-to-ipin-switch into another block. */
constexpr int wire_segment_length = 4;
/* We want to determine a reasonable fan-in to the opin, wire, and ipin switches, based
* on which the intercluster delays can be estimated. The fan-in of a switch influences its
* delay.
*
* The fan-in of the switch depends on the architecture (unidirectional/bidirectional), as
* well as Fc_in/out and Fs */
int opin_switch_fanin, wire_switch_fanin, ipin_switch_fanin;
get_intercluster_switch_fanin_estimates(arch, routing_arch, device_layout, wire_segment_length, &opin_switch_fanin,
&wire_switch_fanin, &ipin_switch_fanin);
float Tdel_opin_switch, R_opin_switch, Cout_opin_switch;
float opin_switch_del = get_arch_switch_info(arch.Segments[0].arch_opin_switch, opin_switch_fanin,
Tdel_opin_switch, R_opin_switch, Cout_opin_switch);
float Tdel_wire_switch, R_wire_switch, Cout_wire_switch;
float wire_switch_del = get_arch_switch_info(arch.Segments[0].arch_wire_switch, wire_switch_fanin,
Tdel_wire_switch, R_wire_switch, Cout_wire_switch);
float Tdel_wtoi_switch, R_wtoi_switch, Cout_wtoi_switch;
float wtoi_switch_del = get_arch_switch_info(routing_arch.wire_to_arch_ipin_switch, ipin_switch_fanin,
Tdel_wtoi_switch, R_wtoi_switch, Cout_wtoi_switch);
float Rmetal = arch.Segments[0].Rmetal;
float Cmetal = arch.Segments[0].Cmetal;
/* The delay of a wire with its driving switch is the switch delay plus the
* product of the equivalent resistance and capacitance experienced by the wire. */
float first_wire_seg_delay = opin_switch_del
+ (R_opin_switch + Rmetal * (float)wire_segment_length / 2)
* (Cout_opin_switch + Cmetal * (float)wire_segment_length);
float second_wire_seg_delay = wire_switch_del
+ (R_wire_switch + Rmetal * (float)wire_segment_length / 2)
* (Cout_wire_switch + Cmetal * (float)wire_segment_length);
/* multiply by 4 to get a more conservative estimate */
return 4 * (first_wire_seg_delay + second_wire_seg_delay + wtoi_switch_del);
}

This is using relatively complicated RRGraph related computations; however, it is hard to get an estimate of this number this early on. This code can probably be simplified without any affect on QoR.

See PR #2881 for more info. Specifcally, Vaughn's comment here: #2881 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions