diff --git a/design_dump.cc b/design_dump.cc index 34551f4d2..016cc5b6d 100644 --- a/design_dump.cc +++ b/design_dump.cc @@ -128,7 +128,7 @@ void NetDelaySrc::dump(ostream&o, unsigned ind) const << "/" << transition_delays_[IVL_PE_x0] << "," << transition_delays_[IVL_PE_xz] << "," << transition_delays_[IVL_PE_zx] - << "): " << endl; + << ") scope=" << scope_path(scope()) << endl; dump_node_pins(o, ind+4); } diff --git a/ivl.def b/ivl.def index 65a0e7cbf..ba7b44444 100644 --- a/ivl.def +++ b/ivl.def @@ -111,6 +111,7 @@ ivl_parameter_expr ivl_path_condit ivl_path_delay +ivl_path_scope ivl_path_source ivl_path_source_negedge ivl_path_source_posedge diff --git a/ivl_target.h b/ivl_target.h index 7b06582ae..5d75dd150 100644 --- a/ivl_target.h +++ b/ivl_target.h @@ -385,6 +385,10 @@ typedef const struct ivl_attribute_s*ivl_attribute_t; * block in the verilog source file. The destination signal references * the path object, which in turn points to the source for the path. * + * ivl_path_scope + * This returns the scope of the delay path. This scope corresponds + * to the scope of the specify-block that led to this path. + * * ivl_path_source * This returns the nexus that is the source end of the delay * path. Transitions on the source are the start of the delay time @@ -398,6 +402,7 @@ typedef const struct ivl_attribute_s*ivl_attribute_t; * ivl_path_source_negedge * These functions return true if the source is edge sensitive. */ +extern ivl_scope_t ivl_path_scope(ivl_delaypath_t obj); extern ivl_nexus_t ivl_path_source(ivl_delaypath_t obj); extern uint64_t ivl_path_delay(ivl_delaypath_t obj, ivl_path_edge_t pt); extern ivl_nexus_t ivl_path_condit(ivl_delaypath_t obj); diff --git a/t-dll-api.cc b/t-dll-api.cc index 0d74ef637..191e130e8 100644 --- a/t-dll-api.cc +++ b/t-dll-api.cc @@ -1264,6 +1264,13 @@ extern uint64_t ivl_path_delay(ivl_delaypath_t obj, ivl_path_edge_t edg) return obj->delay[edg]; } +extern ivl_scope_t ivl_path_scope(ivl_delaypath_t obj) +{ + assert(obj); + assert(obj->scope); + return obj->scope; +} + extern ivl_nexus_t ivl_path_source(ivl_delaypath_t net) { return net->src; diff --git a/t-dll.cc b/t-dll.cc index b8d068669..b44e4e5f3 100644 --- a/t-dll.cc +++ b/t-dll.cc @@ -2242,6 +2242,7 @@ bool dll_target::signal_paths(const NetNet*net) << "." << endl; } assert(nex->t_cookie()); + obj->path[ptr].scope = lookup_scope_(src->scope()); obj->path[ptr].src = nex->t_cookie(); obj->path[ptr].condit = path_condit; obj->path[ptr].posedge = src->is_posedge(); diff --git a/t-dll.h b/t-dll.h index b1e0a1949..faea12b63 100644 --- a/t-dll.h +++ b/t-dll.h @@ -175,6 +175,7 @@ struct dll_target : public target_t, public expr_scan_t { */ struct ivl_delaypath_s { + ivl_scope_t scope; ivl_nexus_t src; ivl_nexus_t condit; bool posedge; diff --git a/tgt-stub/stub.c b/tgt-stub/stub.c index 468b7dd05..fd1bd3b42 100644 --- a/tgt-stub/stub.c +++ b/tgt-stub/stub.c @@ -1141,7 +1141,7 @@ static void show_signal(ivl_signal_t net) fprintf(out, " %" PRIu64 ",%" PRIu64 ",%" PRIu64 " %" PRIu64 ",%" PRIu64 ",%" PRIu64 " %" PRIu64 ",%" PRIu64 ",%" PRIu64 - " %" PRIu64 ",%" PRIu64 ",%" PRIu64 "\n", + " %" PRIu64 ",%" PRIu64 ",%" PRIu64, ivl_path_delay(path, IVL_PE_01), ivl_path_delay(path, IVL_PE_10), ivl_path_delay(path, IVL_PE_0z), @@ -1154,6 +1154,7 @@ static void show_signal(ivl_signal_t net) ivl_path_delay(path, IVL_PE_x0), ivl_path_delay(path, IVL_PE_xz), ivl_path_delay(path, IVL_PE_zx)); + fprintf(out, " scope=%s\n", ivl_scope_name(ivl_path_scope(path))); } for (idx = 0 ; idx < ivl_signal_attr_cnt(net) ; idx += 1) {