timing: Produce plausible Fmax figure
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
541376f8cc
commit
296e6d10c2
@ -34,6 +34,7 @@ void TimingAnalyser::setup()
|
|||||||
{
|
{
|
||||||
init_ports();
|
init_ports();
|
||||||
get_cell_delays();
|
get_cell_delays();
|
||||||
|
get_route_delays();
|
||||||
topo_sort();
|
topo_sort();
|
||||||
setup_port_domains();
|
setup_port_domains();
|
||||||
reset_times();
|
reset_times();
|
||||||
@ -129,6 +130,15 @@ void TimingAnalyser::get_cell_delays()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TimingAnalyser::get_route_delays()
|
||||||
|
{
|
||||||
|
for (auto net : sorted(ctx->nets)) {
|
||||||
|
NetInfo *ni = net.second;
|
||||||
|
for (auto &usr : ni->users)
|
||||||
|
ports.at(CellPortKey(usr)).route_delay = DelayPair(ctx->getNetinfoRouteDelay(ni, usr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TimingAnalyser::topo_sort()
|
void TimingAnalyser::topo_sort()
|
||||||
{
|
{
|
||||||
TopoSort<CellPortKey> topo;
|
TopoSort<CellPortKey> topo;
|
||||||
@ -396,7 +406,7 @@ void TimingAnalyser::print_fmax()
|
|||||||
for (auto &req : pd.required) {
|
for (auto &req : pd.required) {
|
||||||
if (pd.arrival.count(req.first)) {
|
if (pd.arrival.count(req.first)) {
|
||||||
auto &arr = pd.arrival.at(req.first);
|
auto &arr = pd.arrival.at(req.first);
|
||||||
double fmax = 1000.0 / (arr.value.maxDelay() - req.second.value.minDelay());
|
double fmax = 1000.0 / ctx->getDelayNS(arr.value.maxDelay() - req.second.value.minDelay());
|
||||||
if (!domain_fmax.count(req.first) || domain_fmax.at(req.first) > fmax)
|
if (!domain_fmax.count(req.first) || domain_fmax.at(req.first) > fmax)
|
||||||
domain_fmax[req.first] = fmax;
|
domain_fmax[req.first] = fmax;
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,7 @@ struct TimingAnalyser
|
|||||||
private:
|
private:
|
||||||
void init_ports();
|
void init_ports();
|
||||||
void get_cell_delays();
|
void get_cell_delays();
|
||||||
|
void get_route_delays();
|
||||||
void topo_sort();
|
void topo_sort();
|
||||||
void setup_port_domains();
|
void setup_port_domains();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user