Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlexandreSinger opened this issue Feb 8, 2025 · 0 comments
Open

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

AlexandreSinger opened this issue Feb 8, 2025 · 0 comments

Comments

@AlexandreSinger
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant