Improving timing annotator
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
2da90889ef
commit
e45508f6c4
@ -79,6 +79,14 @@ static delay_t follow_net(Context *ctx, NetInfo *net, int path_length,
|
|||||||
void assign_budget(Context *ctx, float default_clock)
|
void assign_budget(Context *ctx, float default_clock)
|
||||||
{
|
{
|
||||||
log_info("Annotating ports with timing budgets\n");
|
log_info("Annotating ports with timing budgets\n");
|
||||||
|
// Clear delays to a very high value first
|
||||||
|
delay_t default_slack = delay_t(1.0e12 / default_clock);
|
||||||
|
for (auto net : ctx->nets) {
|
||||||
|
for (auto &usr : net.second->users) {
|
||||||
|
usr.budget = default_slack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Go through all clocked drivers and set up paths
|
||||||
for (auto cell : ctx->cells) {
|
for (auto cell : ctx->cells) {
|
||||||
for (auto port : cell.second->ports) {
|
for (auto port : cell.second->ports) {
|
||||||
if (port.second.type == PORT_OUT) {
|
if (port.second.type == PORT_OUT) {
|
||||||
@ -93,6 +101,16 @@ void assign_budget(Context *ctx, float default_clock)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Post-allocation check
|
||||||
|
for (auto net : ctx->nets) {
|
||||||
|
for (auto user : net.second->users) {
|
||||||
|
if (user.budget < 0)
|
||||||
|
log_warning("port %s.%s, connected to net '%s', has negative "
|
||||||
|
"timing budget of %fns\n",
|
||||||
|
user.cell->name.c_str(ctx), user.port.c_str(ctx),
|
||||||
|
net.first.c_str(ctx), ctx->getDelayNS(user.budget));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
@ -273,7 +273,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!pack_design(&ctx) && !ctx.force)
|
if (!pack_design(&ctx) && !ctx.force)
|
||||||
log_error("Packing design failed.\n");
|
log_error("Packing design failed.\n");
|
||||||
assign_budget(&ctx);
|
assign_budget(&ctx, 50e6);
|
||||||
print_utilisation(&ctx);
|
print_utilisation(&ctx);
|
||||||
|
|
||||||
if (!vm.count("pack-only")) {
|
if (!vm.count("pack-only")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user